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