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