@validol4ik/uikit 0.10.2 → 0.11.2
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/AppButtonCopy-BjQVrYEH.js +58 -0
- package/dist/AppButtonCopy-CJCsQ2Zc.cjs +1 -0
- package/dist/AppSelect-DC8-TTlX.cjs +1 -0
- package/dist/AppSelect-pGQF24bM.js +166 -0
- package/dist/{BottomSheet-PinLAITZ.js → BottomSheet-BV1JZxic.js} +12 -11
- package/dist/BottomSheet-CLZ7f05J.cjs +1 -0
- package/dist/DropdownButton-BXievAey.cjs +1 -0
- package/dist/DropdownButton-BYc2A5TU.js +101 -0
- package/dist/index-CpG13Bfr.cjs +1 -0
- package/dist/index-qX2ysQuM.js +616 -0
- package/dist/style.css +1 -1
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +6 -6
- package/package.json +3 -2
- package/dist/AppButtonCopy-66cFhDuo.cjs +0 -1
- package/dist/AppButtonCopy-QvkjU_h4.js +0 -103
- package/dist/AppSelect-0p8QDBZ9.js +0 -1985
- package/dist/AppSelect-D0gQOyMy.cjs +0 -1
- package/dist/BottomSheet-CUWjgAeZ.cjs +0 -1
- package/dist/DropdownButton-Cz1xTcUt.cjs +0 -1
- package/dist/DropdownButton-Dhvb9D_L.js +0 -292
- package/dist/QDialog-Cy2w4ntF.js +0 -264
- package/dist/QDialog-tGGvOIPj.cjs +0 -1
- package/dist/QMenu-k3AStoLY.js +0 -536
- package/dist/QMenu-lZpXWLnn.cjs +0 -1
- package/dist/escape-key-BlsDwJUQ.js +0 -281
- package/dist/escape-key-CRpXNCKN.cjs +0 -1
- package/dist/focusout-DjvPXP_b.js +0 -135
- package/dist/focusout-DzWGke-4.cjs +0 -1
- package/dist/index-BB31xQaa.cjs +0 -1
- package/dist/index-DFNWQp-Z.js +0 -1878
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent as c, ref as i, openBlock as s, createBlock as d, unref as u, withCtx as a, createVNode as f, mergeProps as m, withModifiers as C, renderSlot as y } from "vue";
|
|
2
|
+
import B from "quasar/src/utils/copy-to-clipboard/copy-to-clipboard.js";
|
|
3
|
+
import O from "quasar/src/components/no-ssr/QNoSsr.js";
|
|
4
|
+
import { C as _, A as h } from "./index-qX2ysQuM.js";
|
|
5
|
+
const t = {
|
|
6
|
+
COPY: "copy_o",
|
|
7
|
+
COPIED: "copied_o"
|
|
8
|
+
}, I = /* @__PURE__ */ c({
|
|
9
|
+
__name: "AppButtonCopy",
|
|
10
|
+
props: {
|
|
11
|
+
text: {},
|
|
12
|
+
size: {},
|
|
13
|
+
transparent: { type: Boolean, default: !0 },
|
|
14
|
+
flat: { type: Boolean },
|
|
15
|
+
rounded: { type: Boolean },
|
|
16
|
+
color: { default: _.INFO },
|
|
17
|
+
iconLeft: {},
|
|
18
|
+
iconRight: {},
|
|
19
|
+
iconMiddle: {},
|
|
20
|
+
disabled: { type: Boolean },
|
|
21
|
+
loading: { type: Boolean },
|
|
22
|
+
to: {},
|
|
23
|
+
href: {},
|
|
24
|
+
target: {},
|
|
25
|
+
submit: { type: Boolean },
|
|
26
|
+
ariaLabel: {},
|
|
27
|
+
label: {},
|
|
28
|
+
download: {}
|
|
29
|
+
},
|
|
30
|
+
setup(l) {
|
|
31
|
+
const n = l, o = i(t.COPY), r = () => {
|
|
32
|
+
o.value = t.COPIED, setTimeout(() => {
|
|
33
|
+
o.value = t.COPY;
|
|
34
|
+
}, 2e3);
|
|
35
|
+
}, p = () => {
|
|
36
|
+
B(n.text).then(r).catch((e) => {
|
|
37
|
+
console.log(e);
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
return (e, P) => (s(), d(u(O), null, {
|
|
41
|
+
default: a(() => [
|
|
42
|
+
f(h, m(n, {
|
|
43
|
+
"icon-middle": o.value,
|
|
44
|
+
onClick: C(p, ["prevent"])
|
|
45
|
+
}), {
|
|
46
|
+
default: a(() => [
|
|
47
|
+
y(e.$slots, "default")
|
|
48
|
+
]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 16, ["icon-middle"])
|
|
51
|
+
]),
|
|
52
|
+
_: 3
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
I as default
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("quasar/src/utils/copy-to-clipboard/copy-to-clipboard.js"),u=require("quasar/src/components/no-ssr/QNoSsr.js"),r=require("./index-CpG13Bfr.cjs"),n={COPY:"copy_o",COPIED:"copied_o"},d=e.defineComponent({__name:"AppButtonCopy",props:{text:{},size:{},transparent:{type:Boolean,default:!0},flat:{type:Boolean},rounded:{type:Boolean},color:{default:r.COLORS.INFO},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},setup(c){const l=c,o=e.ref(n.COPY),a=()=>{o.value=n.COPIED,setTimeout(()=>{o.value=n.COPY},2e3)},i=()=>{s(l.text).then(a).catch(t=>{console.log(t)})};return(t,p)=>(e.openBlock(),e.createBlock(e.unref(u),null,{default:e.withCtx(()=>[e.createVNode(r.AppButton,e.mergeProps(l,{"icon-middle":o.value,onClick:e.withModifiers(i,["prevent"])}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["icon-middle"])]),_:3}))}});exports.default=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("./index-CpG13Bfr.cjs"),B=require("quasar/src/components/select/QSelect.js"),c=s=>s?!0:"Обовʼязкове поле",C={class:"app-select__amount"},A=e.defineComponent({__name:"AppSelect",props:{modelValue:{},size:{default:p.SIZES.MD},options:{},multiple:{type:Boolean},label:{},placeholder:{},required:{type:Boolean},clearable:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},filtering:{type:Boolean},autofocus:{type:Boolean},rules:{},lazyRules:{type:[Boolean,String]},menuClass:{},glass:{type:Boolean},isMobile:{type:Boolean}},emits:["update:modelValue","popupShow","popupHide"],setup(s,{emit:m}){const o=s,n=m,u=e.ref(!1),i=e.ref(""),a=e.computed({get(){if(o.modelValue){if(o.multiple&&Array.isArray(o.modelValue))return o.options.filter(l=>o.modelValue.includes(l.value));if(!Array.isArray(o.modelValue))return o.options.find(l=>l.value===o.modelValue)}},set(l){if(!l){n("update:modelValue",void 0);return}if(o.multiple&&Array.isArray(l)){const r=l.map(t=>t.value);n("update:modelValue",r)}else Array.isArray(l)||n("update:modelValue",l.value)}}),f=e.computed(()=>{var l;if(Array.isArray(a.value)){if(o.multiple&&a.value.length==0)return o.placeholder}else return((l=a.value)==null?void 0:l.label)||o.placeholder||"";return""}),y=e.computed(()=>!(!o.clearable||!o.modelValue||o.modelValue&&Array.isArray(o.modelValue)&&!o.modelValue.length)),v=e.computed(()=>i.value?o.options.filter(l=>l.label.toLowerCase().includes(i.value.toLowerCase())):o.options),k=e.computed(()=>{if(o.rules)return o.required?[...o.rules,c]:o.rules;if(o.required)return[c]}),g=()=>{u.value=!0,n("popupShow")},b=()=>{u.value=!1,n("popupHide")},h=()=>{a.value=void 0},V=(l,r)=>{r(()=>{i.value=l})};return(l,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["app-select",[{"app-select_opened":u.value},`app-select_${l.size}`]])},[l.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:e.normalizeClass(["app-select__label",{"app-select__label_bold":l.required}])},e.toDisplayString(l.required?`${l.label} *`:l.label),3)):e.createCommentVNode("",!0),e.createVNode(e.unref(B),{standout:"","hide-bottom-space":"","hide-dropdown-icon":"","no-error-icon":"",behavior:"menu","popup-no-route-dismiss":"","popup-content-class":`kl-menu ${l.glass?"glass-menu":""} app-select-menu app-select-menu_${l.size} ${l.menuClass}`,placeholder:l.filtering&&"Почніть вводити","input-debounce":"50",modelValue:a.value,"onUpdate:modelValue":r[0]||(r[0]=t=>a.value=t),options:v.value,multiple:l.multiple,"use-input":l.filtering&&(Array.isArray(a.value)||!a.value),rules:k.value,"lazy-rules":l.lazyRules,autofocus:l.autofocus,disable:l.disabled,loading:l.loading,"menu-offset":[0,2],onFilter:V,onPopupShow:g,onPopupHide:b},{append:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("i",{key:0,class:"icon-kl icon-kl-circle-close app-select__clear",onClick:e.withModifiers(h,["stop","prevent"])})):e.createCommentVNode("",!0),r[1]||(r[1]=e.createElementVNode("i",{class:"icon-kl icon-kl-arrow-down app-select__drop-icon"},null,-1))]),selected:e.withCtx(()=>{var t,d;return[Array.isArray(a.value)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[!l.filtering||a.value.length?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["app-select__selected",{"app-select__placeholder":!((t=a.value)!=null&&t.length)&&l.placeholder}])},[(d=a.value)!=null&&d.length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[r[2]||(r[2]=e.createTextVNode(" Вибрано ",-1)),e.createElementVNode("span",C,e.toDisplayString(a.value.length),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.placeholder),1)],64))],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[!l.filtering||a.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["app-select__selected",{"app-select__placeholder":!a.value&&l.placeholder}])},e.toDisplayString(f.value),3)):e.createCommentVNode("",!0)],64))]}),option:e.withCtx(t=>[e.createVNode(p.PopupItem,e.mergeProps({"no-arrow":"",label:t.opt.label,checked:t.opt.done,active:t.selected,"is-mobile":l.isMobile,checkbox:o.multiple,"model-value":t.selected},o.multiple?{...t.itemProps,onClick:void 0}:t.itemProps,{"onUpdate:modelValue":()=>t.toggleOption(t.opt)}),null,16,["label","checked","active","is-mobile","checkbox","model-value","onUpdate:modelValue"])]),_:1},8,["popup-content-class","placeholder","modelValue","options","multiple","use-input","rules","lazy-rules","autofocus","disable","loading"])],2))}}),S=p._export_sfc(A,[["__scopeId","data-v-21482233"]]);exports.default=S;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { defineComponent as $, ref as h, computed as n, openBlock as t, createElementBlock as s, normalizeClass as i, toDisplayString as p, createCommentVNode as d, createVNode as g, unref as H, withCtx as v, mergeProps as N, Fragment as c, createTextVNode as V, createElementVNode as k, withModifiers as R } from "vue";
|
|
2
|
+
import { S as E, P as F, _ as I } from "./index-qX2ysQuM.js";
|
|
3
|
+
import O from "quasar/src/components/select/QSelect.js";
|
|
4
|
+
const A = (m) => m ? !0 : "Обовʼязкове поле", U = { class: "app-select__amount" }, D = /* @__PURE__ */ $({
|
|
5
|
+
__name: "AppSelect",
|
|
6
|
+
props: {
|
|
7
|
+
modelValue: {},
|
|
8
|
+
size: { default: E.MD },
|
|
9
|
+
options: {},
|
|
10
|
+
multiple: { type: Boolean },
|
|
11
|
+
label: {},
|
|
12
|
+
placeholder: {},
|
|
13
|
+
required: { type: Boolean },
|
|
14
|
+
clearable: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
loading: { type: Boolean },
|
|
17
|
+
filtering: { type: Boolean },
|
|
18
|
+
autofocus: { type: Boolean },
|
|
19
|
+
rules: {},
|
|
20
|
+
lazyRules: { type: [Boolean, String] },
|
|
21
|
+
menuClass: {},
|
|
22
|
+
glass: { type: Boolean },
|
|
23
|
+
isMobile: { type: Boolean }
|
|
24
|
+
},
|
|
25
|
+
emits: ["update:modelValue", "popupShow", "popupHide"],
|
|
26
|
+
setup(m, { emit: w }) {
|
|
27
|
+
const l = m, u = w, f = h(!1), y = h(""), o = n({
|
|
28
|
+
get() {
|
|
29
|
+
if (l.modelValue) {
|
|
30
|
+
if (l.multiple && Array.isArray(l.modelValue))
|
|
31
|
+
return l.options.filter(
|
|
32
|
+
(e) => l.modelValue.includes(e.value)
|
|
33
|
+
);
|
|
34
|
+
if (!Array.isArray(l.modelValue))
|
|
35
|
+
return l.options.find(
|
|
36
|
+
(e) => e.value === l.modelValue
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
set(e) {
|
|
41
|
+
if (!e) {
|
|
42
|
+
u("update:modelValue", void 0);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (l.multiple && Array.isArray(e)) {
|
|
46
|
+
const r = e.map((a) => a.value);
|
|
47
|
+
u("update:modelValue", r);
|
|
48
|
+
} else Array.isArray(e) || u("update:modelValue", e.value);
|
|
49
|
+
}
|
|
50
|
+
}), B = n(() => {
|
|
51
|
+
var e;
|
|
52
|
+
if (Array.isArray(o.value)) {
|
|
53
|
+
if (l.multiple && o.value.length == 0)
|
|
54
|
+
return l.placeholder;
|
|
55
|
+
} else return ((e = o.value) == null ? void 0 : e.label) || l.placeholder || "";
|
|
56
|
+
return "";
|
|
57
|
+
}), S = n(() => !(!l.clearable || !l.modelValue || l.modelValue && Array.isArray(l.modelValue) && !l.modelValue.length)), C = n(() => y.value ? l.options.filter(
|
|
58
|
+
(e) => e.label.toLowerCase().includes(y.value.toLowerCase())
|
|
59
|
+
) : l.options), _ = n(() => {
|
|
60
|
+
if (l.rules)
|
|
61
|
+
return l.required ? [...l.rules, A] : l.rules;
|
|
62
|
+
if (l.required)
|
|
63
|
+
return [A];
|
|
64
|
+
}), z = () => {
|
|
65
|
+
f.value = !0, u("popupShow");
|
|
66
|
+
}, P = () => {
|
|
67
|
+
f.value = !1, u("popupHide");
|
|
68
|
+
}, q = () => {
|
|
69
|
+
o.value = void 0;
|
|
70
|
+
}, M = (e, r) => {
|
|
71
|
+
r(() => {
|
|
72
|
+
y.value = e;
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
return (e, r) => (t(), s("div", {
|
|
76
|
+
class: i(["app-select", [{ "app-select_opened": f.value }, `app-select_${e.size}`]])
|
|
77
|
+
}, [
|
|
78
|
+
e.label ? (t(), s("label", {
|
|
79
|
+
key: 0,
|
|
80
|
+
class: i(["app-select__label", { "app-select__label_bold": e.required }])
|
|
81
|
+
}, p(e.required ? `${e.label} *` : e.label), 3)) : d("", !0),
|
|
82
|
+
g(H(O), {
|
|
83
|
+
standout: "",
|
|
84
|
+
"hide-bottom-space": "",
|
|
85
|
+
"hide-dropdown-icon": "",
|
|
86
|
+
"no-error-icon": "",
|
|
87
|
+
behavior: "menu",
|
|
88
|
+
"popup-no-route-dismiss": "",
|
|
89
|
+
"popup-content-class": `kl-menu ${e.glass ? "glass-menu" : ""} app-select-menu app-select-menu_${e.size} ${e.menuClass}`,
|
|
90
|
+
placeholder: e.filtering && "Почніть вводити",
|
|
91
|
+
"input-debounce": "50",
|
|
92
|
+
modelValue: o.value,
|
|
93
|
+
"onUpdate:modelValue": r[0] || (r[0] = (a) => o.value = a),
|
|
94
|
+
options: C.value,
|
|
95
|
+
multiple: e.multiple,
|
|
96
|
+
"use-input": e.filtering && (Array.isArray(o.value) || !o.value),
|
|
97
|
+
rules: _.value,
|
|
98
|
+
"lazy-rules": e.lazyRules,
|
|
99
|
+
autofocus: e.autofocus,
|
|
100
|
+
disable: e.disabled,
|
|
101
|
+
loading: e.loading,
|
|
102
|
+
"menu-offset": [0, 2],
|
|
103
|
+
onFilter: M,
|
|
104
|
+
onPopupShow: z,
|
|
105
|
+
onPopupHide: P
|
|
106
|
+
}, {
|
|
107
|
+
append: v(() => [
|
|
108
|
+
S.value ? (t(), s("i", {
|
|
109
|
+
key: 0,
|
|
110
|
+
class: "icon-kl icon-kl-circle-close app-select__clear",
|
|
111
|
+
onClick: R(q, ["stop", "prevent"])
|
|
112
|
+
})) : d("", !0),
|
|
113
|
+
r[1] || (r[1] = k("i", { class: "icon-kl icon-kl-arrow-down app-select__drop-icon" }, null, -1))
|
|
114
|
+
]),
|
|
115
|
+
selected: v(() => {
|
|
116
|
+
var a, b;
|
|
117
|
+
return [
|
|
118
|
+
Array.isArray(o.value) ? (t(), s(c, { key: 0 }, [
|
|
119
|
+
!e.filtering || o.value.length ? (t(), s("span", {
|
|
120
|
+
key: 0,
|
|
121
|
+
class: i([
|
|
122
|
+
"app-select__selected",
|
|
123
|
+
{
|
|
124
|
+
"app-select__placeholder": !((a = o.value) != null && a.length) && e.placeholder
|
|
125
|
+
}
|
|
126
|
+
])
|
|
127
|
+
}, [
|
|
128
|
+
(b = o.value) != null && b.length ? (t(), s(c, { key: 0 }, [
|
|
129
|
+
r[2] || (r[2] = V(" Вибрано ", -1)),
|
|
130
|
+
k("span", U, p(o.value.length), 1)
|
|
131
|
+
], 64)) : (t(), s(c, { key: 1 }, [
|
|
132
|
+
V(p(l.placeholder), 1)
|
|
133
|
+
], 64))
|
|
134
|
+
], 2)) : d("", !0)
|
|
135
|
+
], 64)) : (t(), s(c, { key: 1 }, [
|
|
136
|
+
!e.filtering || o.value ? (t(), s("span", {
|
|
137
|
+
key: 0,
|
|
138
|
+
class: i([
|
|
139
|
+
"app-select__selected",
|
|
140
|
+
{ "app-select__placeholder": !o.value && e.placeholder }
|
|
141
|
+
])
|
|
142
|
+
}, p(B.value), 3)) : d("", !0)
|
|
143
|
+
], 64))
|
|
144
|
+
];
|
|
145
|
+
}),
|
|
146
|
+
option: v((a) => [
|
|
147
|
+
g(F, N({
|
|
148
|
+
"no-arrow": "",
|
|
149
|
+
label: a.opt.label,
|
|
150
|
+
checked: a.opt.done,
|
|
151
|
+
active: a.selected,
|
|
152
|
+
"is-mobile": e.isMobile,
|
|
153
|
+
checkbox: l.multiple,
|
|
154
|
+
"model-value": a.selected
|
|
155
|
+
}, l.multiple ? { ...a.itemProps, onClick: void 0 } : a.itemProps, {
|
|
156
|
+
"onUpdate:modelValue": () => a.toggleOption(a.opt)
|
|
157
|
+
}), null, 16, ["label", "checked", "active", "is-mobile", "checkbox", "model-value", "onUpdate:modelValue"])
|
|
158
|
+
]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["popup-content-class", "placeholder", "modelValue", "options", "multiple", "use-input", "rules", "lazy-rules", "autofocus", "disable", "loading"])
|
|
161
|
+
], 2));
|
|
162
|
+
}
|
|
163
|
+
}), Z = /* @__PURE__ */ I(D, [["__scopeId", "data-v-21482233"]]);
|
|
164
|
+
export {
|
|
165
|
+
Z as default
|
|
166
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as N, useModel as R, ref as c, computed as m, openBlock as p, createBlock as X, unref as M, normalizeStyle as S, normalizeClass as P, withCtx as L, createElementVNode as u, renderSlot as f, createElementBlock as V, createTextVNode as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as N, useModel as R, ref as c, computed as m, openBlock as p, createBlock as X, unref as M, normalizeStyle as S, normalizeClass as P, withCtx as L, createElementVNode as u, renderSlot as f, createElementBlock as V, createTextVNode as U, toDisplayString as A, createCommentVNode as Q, createVNode as k, mergeModels as C } from "vue";
|
|
2
|
+
import G from "quasar/src/components/dialog/QDialog.js";
|
|
3
|
+
import O from "quasar/src/components/spinner/QSpinner.js";
|
|
4
|
+
import { a as j, _ as q } from "./index-qX2ysQuM.js";
|
|
5
|
+
const F = { class: "bottom-sheet__header" }, J = {
|
|
5
6
|
key: 0,
|
|
6
7
|
class: "bottom-sheet__title"
|
|
7
8
|
}, K = { class: "bottom-sheet__body" }, W = {
|
|
@@ -79,7 +80,7 @@ const q = { class: "bottom-sheet__header" }, J = {
|
|
|
79
80
|
}, E = () => {
|
|
80
81
|
l.value = !1, a = null, r = null, n.value = 0, b("hide");
|
|
81
82
|
};
|
|
82
|
-
return (e, t) => (p(), X(M(
|
|
83
|
+
return (e, t) => (p(), X(M(G), {
|
|
83
84
|
modelValue: d.value,
|
|
84
85
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => d.value = o),
|
|
85
86
|
position: "bottom",
|
|
@@ -105,16 +106,16 @@ const q = { class: "bottom-sheet__header" }, J = {
|
|
|
105
106
|
onPointercancel: B,
|
|
106
107
|
onTouchmove: z
|
|
107
108
|
}, [
|
|
108
|
-
u("div",
|
|
109
|
+
u("div", F, [
|
|
109
110
|
t[2] || (t[2] = u("div", { class: "bottom-sheet__grabber" }, null, -1)),
|
|
110
111
|
u("div", null, [
|
|
111
112
|
f(e.$slots, "header", {}, void 0, !0)
|
|
112
113
|
]),
|
|
113
114
|
e.title ? (p(), V("div", J, [
|
|
114
|
-
|
|
115
|
+
U(A(e.title), 1),
|
|
115
116
|
f(e.$slots, "title", {}, void 0, !0)
|
|
116
|
-
])) :
|
|
117
|
-
k(
|
|
117
|
+
])) : Q("", !0),
|
|
118
|
+
k(j, {
|
|
118
119
|
class: "bottom-sheet__close",
|
|
119
120
|
size: "xl",
|
|
120
121
|
onClick: _
|
|
@@ -134,7 +135,7 @@ const q = { class: "bottom-sheet__header" }, J = {
|
|
|
134
135
|
_: 3
|
|
135
136
|
}, 8, ["modelValue", "persistent", "class", "style"]));
|
|
136
137
|
}
|
|
137
|
-
}),
|
|
138
|
+
}), se = /* @__PURE__ */ q(ee, [["__scopeId", "data-v-e565b67f"]]);
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
se as default
|
|
140
141
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),H=require("quasar/src/components/dialog/QDialog.js"),N=require("quasar/src/components/spinner/QSpinner.js"),y=require("./index-CpG13Bfr.cjs"),w={class:"bottom-sheet__header"},$={key:0,class:"bottom-sheet__title"},z={class:"bottom-sheet__body"},T={key:0,class:"bottom-sheet__loading"},b=6,Y=12,x=e.defineComponent({__name:"BottomSheet",props:e.mergeModels({modelValue:{type:Boolean},title:{},loading:{type:Boolean},persistent:{type:Boolean},maxHeight:{default:"95vh"},glass:{type:Boolean},noBlur:{type:Boolean},splitContent:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["hide","beforeShow"],["update:modelValue"]),setup(c,{emit:_}){const m=c,d=e.useModel(c,"modelValue"),p=_,r=e.ref(null),n=e.ref(!1),s=e.ref(0);let f=0,h=0,a=null,i=null;const B=e.computed(()=>({maxHeight:`${m.maxHeight} !important`,transform:s.value?`translateY(${s.value}px)`:void 0})),S=e.computed(()=>{var o;const t=((o=r.value)==null?void 0:o.offsetHeight)??0;return t?Math.min(1,s.value/t):0}),V=e.computed(()=>m.noBlur?{}:{"--bs-backdrop-blur":`${Y*(1-S.value)}px`,"--bs-backdrop-blur-dur":n.value?"0s":"0.32s"}),v=()=>d.value=!1,M=t=>{let o=t instanceof HTMLElement?t:null;for(;o&&o!==r.value;){const{overflowY:l}=getComputedStyle(o);if((l==="auto"||l==="scroll")&&o.scrollHeight>o.clientHeight)return o;o=o.parentElement}return null},k=t=>{if(t.button>0)return;const o=t.target;o.closest(".bottom-sheet__close, input, textarea, [contenteditable]")||(a=t.pointerId,f=t.clientX,h=t.clientY,i=M(o),n.value=!1)},P=t=>{var l;if(t.pointerId!==a)return;const o=t.clientY-h;if(!n.value){const u=t.clientX-f;if(Math.abs(o)<b&&Math.abs(u)<b)return;if(o<=0||Math.abs(u)>Math.abs(o)||((i==null?void 0:i.scrollTop)??0)>0){a=null;return}n.value=!0,typeof((l=r.value)==null?void 0:l.setPointerCapture)=="function"&&r.value.setPointerCapture(t.pointerId)}s.value=Math.max(0,o)},C=t=>{n.value&&t.cancelable&&t.preventDefault()},g=t=>{var u;if(t.pointerId!==a||(a=null,!n.value))return;n.value=!1;const o=((u=r.value)==null?void 0:u.offsetHeight)??0,l=Math.min(120,o*.25||120);if(s.value>l){v();return}s.value=0},E=()=>{n.value=!1,a=null,i=null,s.value=0,p("hide")};return(t,o)=>(e.openBlock(),e.createBlock(e.unref(H),{modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=l=>d.value=l),position:"bottom",persistent:t.persistent,class:e.normalizeClass(["bottom-sheet-dialog",{"bottom-sheet-dialog_blur":!t.noBlur}]),style:e.normalizeStyle(V.value),onHide:E,onBeforeShow:o[1]||(o[1]=l=>p("beforeShow"))},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"sheetRef",ref:r,class:e.normalizeClass(["bottom-sheet",{"bottom-sheet_dragging":n.value,"bottom-sheet_glass":t.glass,"bottom-sheet_splited":t.splitContent}]),style:e.normalizeStyle(B.value),onPointerdown:k,onPointermove:P,onPointerup:g,onPointercancel:g,onTouchmove:C},[e.createElementVNode("div",w,[o[2]||(o[2]=e.createElementVNode("div",{class:"bottom-sheet__grabber"},null,-1)),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"header",{},void 0,!0)]),t.title?(e.openBlock(),e.createElementBlock("div",$,[e.createTextVNode(e.toDisplayString(t.title),1),e.renderSlot(t.$slots,"title",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(y.CloseButton,{class:"bottom-sheet__close",size:"xl",onClick:v})]),e.createElementVNode("div",z,[t.loading?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(e.unref(N),{size:"55px",thickness:3,color:"grey-5"})])):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)])],38)]),_:3},8,["modelValue","persistent","class","style"]))}}),D=y._export_sfc(x,[["__scopeId","data-v-e565b67f"]]);exports.default=D;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),l=require("./index-CpG13Bfr.cjs"),m=require("quasar/src/components/btn-dropdown/QBtnDropdown.js"),f={[l.SIZES.SM]:"3px 9px",[l.SIZES.MD]:"5px 12px",[l.SIZES.LG]:"6px 15px",[l.SIZES.XL]:"9px 20px"},b={key:1,class:"dropdown-btn__label"},S=n.defineComponent({__name:"DropdownButton",props:{size:{default:l.SIZES.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:l.COLORS.PRIMARY},iconLeft:{},iconMiddle:{},hideDropIcon:{type:Boolean},disabled:{type:Boolean},loading:{type:Boolean},ariaLabel:{},label:{},menuOffset:{},menuAnchor:{},menuSelf:{},menuClass:{},glass:{type:Boolean}},emits:["menuShown","menuHidden"],setup(i,{emit:u}){const o=i,t=u,d=n.ref(!1),p=n.computed(()=>["dropdown-btn",{"dropdown-btn_default":!o.transparent&&!o.flat,"dropdown-btn_trans":o.transparent,"dropdown-btn_flat":o.flat,"dropdown-btn_rounded":o.rounded,"dropdown-btn_icon-left":o.iconLeft,"dropdown-btn_icon-middle":o.iconMiddle,"dropdown-btn_no-drop":o.hideDropIcon},`dropdown-btn_${o.size}`,`dropdown-btn_${o.color}`]),a=()=>{d.value=!0,t("menuShown")},r=()=>{d.value=!1,t("menuHidden")};return(e,s)=>(n.openBlock(),n.createBlock(n.unref(m),{"no-caps":"",unelevated:"",modelValue:d.value,"onUpdate:modelValue":s[0]||(s[0]=c=>d.value=c),class:n.normalizeClass(p.value),padding:n.unref(f)[e.size||n.unref(l.SIZES).MD],loading:e.loading,disable:e.disabled||void 0,"aria-label":e.ariaLabel,"menu-offset":e.menuOffset,"menu-anchor":e.menuAnchor,"menu-self":e.menuSelf,"content-class":["kl-menu dropdown-menu",{"glass-menu":e.glass},e.menuClass],"dropdown-icon":"icon-kl icon-kl-arrow-down",onBeforeShow:a,onBeforeHide:r},{label:n.withCtx(()=>[e.iconLeft||e.iconMiddle?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass(["icon-kl",e.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${e.iconLeft||e.iconMiddle}`,e.transparent||e.flat?`text-${e.color}`:"text-secondary"])},null,2)):n.createCommentVNode("",!0),e.label?(n.openBlock(),n.createElementBlock("span",b,n.toDisplayString(e.label),1)):n.createCommentVNode("",!0),n.renderSlot(e.$slots,"label",{},void 0,!0)]),default:n.withCtx(()=>[n.renderSlot(e.$slots,"default",{},void 0,!0),n.renderSlot(e.$slots,"options",{hideMenu:r,showMenu:a},void 0,!0)]),_:3},8,["modelValue","class","padding","loading","disable","aria-label","menu-offset","menu-anchor","menu-self","content-class"]))}}),w=l._export_sfc(S,[["__scopeId","data-v-9ad6865d"]]);exports.default=w;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineComponent as S, ref as k, computed as g, openBlock as a, createBlock as v, unref as d, normalizeClass as u, withCtx as m, renderSlot as t, createElementBlock as f, createCommentVNode as c, toDisplayString as y } from "vue";
|
|
2
|
+
import { S as n, C as M, _ as L } from "./index-qX2ysQuM.js";
|
|
3
|
+
import C from "quasar/src/components/btn-dropdown/QBtnDropdown.js";
|
|
4
|
+
const D = {
|
|
5
|
+
[n.SM]: "3px 9px",
|
|
6
|
+
[n.MD]: "5px 12px",
|
|
7
|
+
[n.LG]: "6px 15px",
|
|
8
|
+
[n.XL]: "9px 20px"
|
|
9
|
+
}, $ = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "dropdown-btn__label"
|
|
12
|
+
}, I = /* @__PURE__ */ S({
|
|
13
|
+
__name: "DropdownButton",
|
|
14
|
+
props: {
|
|
15
|
+
size: { default: n.MD },
|
|
16
|
+
transparent: { type: Boolean },
|
|
17
|
+
flat: { type: Boolean },
|
|
18
|
+
rounded: { type: Boolean },
|
|
19
|
+
color: { default: M.PRIMARY },
|
|
20
|
+
iconLeft: {},
|
|
21
|
+
iconMiddle: {},
|
|
22
|
+
hideDropIcon: { type: Boolean },
|
|
23
|
+
disabled: { type: Boolean },
|
|
24
|
+
loading: { type: Boolean },
|
|
25
|
+
ariaLabel: {},
|
|
26
|
+
label: {},
|
|
27
|
+
menuOffset: {},
|
|
28
|
+
menuAnchor: {},
|
|
29
|
+
menuSelf: {},
|
|
30
|
+
menuClass: {},
|
|
31
|
+
glass: { type: Boolean }
|
|
32
|
+
},
|
|
33
|
+
emits: ["menuShown", "menuHidden"],
|
|
34
|
+
setup(b, { emit: w }) {
|
|
35
|
+
const o = b, s = w, l = k(!1), B = g(() => [
|
|
36
|
+
"dropdown-btn",
|
|
37
|
+
{
|
|
38
|
+
"dropdown-btn_default": !o.transparent && !o.flat,
|
|
39
|
+
"dropdown-btn_trans": o.transparent,
|
|
40
|
+
"dropdown-btn_flat": o.flat,
|
|
41
|
+
"dropdown-btn_rounded": o.rounded,
|
|
42
|
+
"dropdown-btn_icon-left": o.iconLeft,
|
|
43
|
+
"dropdown-btn_icon-middle": o.iconMiddle,
|
|
44
|
+
"dropdown-btn_no-drop": o.hideDropIcon
|
|
45
|
+
},
|
|
46
|
+
`dropdown-btn_${o.size}`,
|
|
47
|
+
`dropdown-btn_${o.color}`
|
|
48
|
+
]), r = () => {
|
|
49
|
+
l.value = !0, s("menuShown");
|
|
50
|
+
}, i = () => {
|
|
51
|
+
l.value = !1, s("menuHidden");
|
|
52
|
+
};
|
|
53
|
+
return (e, p) => (a(), v(d(C), {
|
|
54
|
+
"no-caps": "",
|
|
55
|
+
unelevated: "",
|
|
56
|
+
modelValue: l.value,
|
|
57
|
+
"onUpdate:modelValue": p[0] || (p[0] = (h) => l.value = h),
|
|
58
|
+
class: u(B.value),
|
|
59
|
+
padding: d(D)[e.size || d(n).MD],
|
|
60
|
+
loading: e.loading,
|
|
61
|
+
disable: e.disabled || void 0,
|
|
62
|
+
"aria-label": e.ariaLabel,
|
|
63
|
+
"menu-offset": e.menuOffset,
|
|
64
|
+
"menu-anchor": e.menuAnchor,
|
|
65
|
+
"menu-self": e.menuSelf,
|
|
66
|
+
"content-class": [
|
|
67
|
+
"kl-menu dropdown-menu",
|
|
68
|
+
{ "glass-menu": e.glass },
|
|
69
|
+
e.menuClass
|
|
70
|
+
],
|
|
71
|
+
"dropdown-icon": "icon-kl icon-kl-arrow-down",
|
|
72
|
+
onBeforeShow: r,
|
|
73
|
+
onBeforeHide: i
|
|
74
|
+
}, {
|
|
75
|
+
label: m(() => [
|
|
76
|
+
e.iconLeft || e.iconMiddle ? (a(), f("i", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: u([
|
|
79
|
+
"icon-kl",
|
|
80
|
+
e.iconLeft ? "icon-kl_left" : "icon-kl_middle",
|
|
81
|
+
`icon-kl-${e.iconLeft || e.iconMiddle}`,
|
|
82
|
+
e.transparent || e.flat ? `text-${e.color}` : "text-secondary"
|
|
83
|
+
])
|
|
84
|
+
}, null, 2)) : c("", !0),
|
|
85
|
+
e.label ? (a(), f("span", $, y(e.label), 1)) : c("", !0),
|
|
86
|
+
t(e.$slots, "label", {}, void 0, !0)
|
|
87
|
+
]),
|
|
88
|
+
default: m(() => [
|
|
89
|
+
t(e.$slots, "default", {}, void 0, !0),
|
|
90
|
+
t(e.$slots, "options", {
|
|
91
|
+
hideMenu: i,
|
|
92
|
+
showMenu: r
|
|
93
|
+
}, void 0, !0)
|
|
94
|
+
]),
|
|
95
|
+
_: 3
|
|
96
|
+
}, 8, ["modelValue", "class", "padding", "loading", "disable", "aria-label", "menu-offset", "menu-anchor", "menu-self", "content-class"]));
|
|
97
|
+
}
|
|
98
|
+
}), A = /* @__PURE__ */ L(I, [["__scopeId", "data-v-9ad6865d"]]);
|
|
99
|
+
export {
|
|
100
|
+
A as default
|
|
101
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),S=require("quasar/wrappers"),w=require("quasar/src/components/btn/QBtn.js"),N=require("quasar/src/components/checkbox/QCheckbox.js"),I=require("quasar/src/directives/close-popup/ClosePopup.js"),A=require("quasar/src/components/spinner/QSpinner.js"),R=require("quasar/src/components/linear-progress/QLinearProgress.js"),D=require("quasar/src/components/item/QItem.js"),L=S.boot(({app:c})=>{const n=c.config.globalProperties.$q;n.iconMapFn=a=>{if(a.startsWith("icon-kl:"))return{cls:`icon-kl icon-kl-${a.slice(8)}`}}}),V={PRIMARY:"primary",INFO:"info"},g={SM:"sm",MD:"md",LG:"lg",XL:"xl"},P={[g.SM]:"3px 9px",[g.MD]:"5px 12px",[g.LG]:"6px 15px",[g.XL]:"9px 20px"},T=e.defineComponent({__name:"AppButton",props:{size:{default:g.MD},transparent:{type:Boolean},flat:{type:Boolean},rounded:{type:Boolean},color:{default:V.PRIMARY},iconLeft:{},iconRight:{},iconMiddle:{},disabled:{type:Boolean},loading:{type:Boolean},to:{},href:{},target:{},submit:{type:Boolean},ariaLabel:{},label:{},download:{}},emits:["click"],setup(c){const n=c,a=e.computed(()=>["app-btn",{"app-btn_default":!n.transparent&&!n.flat,"app-btn_trans":n.transparent,"app-btn_flat":n.flat,"app-btn_rounded":n.rounded,"app-btn_icon-left":n.iconLeft,"app-btn_icon-right":n.iconRight,"app-btn_icon-middle":n.iconMiddle},`app-btn_${n.size}`,`app-btn_${n.color}`]);return(o,i)=>(e.openBlock(),e.createBlock(e.unref(w),{"no-caps":"",unelevated:"",class:e.normalizeClass(a.value),padding:e.unref(P)[o.size||e.unref(g).MD],loading:o.loading,disable:o.disabled||void 0,to:o.to,href:o.href,target:o.target,type:o.submit?"submit":void 0,"aria-label":o.ariaLabel,download:o.download,onClick:i[0]||(i[0]=t=>o.$emit("click",t))},{default:e.withCtx(()=>[o.iconLeft||o.iconMiddle?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["icon-kl",o.iconLeft?"icon-kl_left":"icon-kl_middle",`icon-kl-${o.iconLeft||o.iconMiddle}`,o.transparent||o.flat?`text-${o.color}`:"text-secondary"])},null,2)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0),o.label?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.label),1)],64)):e.createCommentVNode("",!0),o.iconRight?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["icon-kl","icon-kl_right",`icon-kl-${o.iconRight}`,o.transparent?`text-${o.color}`:"text-secondary"])},null,2)):e.createCommentVNode("",!0)]),_:3},8,["class","padding","loading","disable","to","href","target","type","aria-label","download"]))}}),k=(c,n)=>{const a=c.__vccOpts||c;for(const[o,i]of n)a[o]=i;return a},q=k(T,[["__scopeId","data-v-c9951ab6"]]),O=e.defineComponent({__name:"CloseButton",props:{size:{default:g.MD}},setup(c){const n=c,a=e.computed(()=>["close-btn",`close-btn_${n.size}`]);return(o,i)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(a.value),type:"button","aria-label":"Close"},[...i[0]||(i[0]=[e.createElementVNode("i",{class:"icon-kl icon-kl-close"},null,-1)])],2))}}),W=k(O,[["__scopeId","data-v-7cc56d51"]]),F={key:0,class:"app-toggle__label app-toggle__label_left"},U={class:"app-toggle__container"},Q=["checked","disabled"],Y={class:"app-toggle__thumb"},G={key:1,class:"app-toggle__label"},K=e.defineComponent({__name:"AppToggle",props:{modelValue:{type:Boolean},size:{default:g.MD},label:{},disabled:{type:Boolean},color:{default:V.PRIMARY},iconColor:{},icon:{},iconActive:{},labelLeft:{type:Boolean}},emits:["update:modelValue"],setup(c,{emit:n}){const a=c,o=n,i=e.computed({get:()=>a.modelValue,set:l=>{o("update:modelValue",l)}}),t=e.computed(()=>["app-toggle",{"app-toggle_active":i.value,"app-toggle_disabled":a.disabled},`app-toggle_${a.size}`,`app-toggle_${a.color}`]);return(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(t.value),onClick:u[1]||(u[1]=e.withModifiers(()=>{},["stop"]))},[l.label&&l.labelLeft?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("label",U,[e.createElementVNode("input",{type:"checkbox",checked:i.value,onChange:u[0]||(u[0]=b=>i.value=!i.value),disabled:l.disabled,class:"app-toggle__input"},null,40,Q),e.createElementVNode("span",{class:e.normalizeClass(["app-toggle__slider",i.value?`bg-${l.color}`:""])},[e.createElementVNode("span",Y,[l.icon&&!l.modelValue?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(["icon-kl",`icon-kl-${l.icon}`,"app-toggle__icon"])},null,2)):e.createCommentVNode("",!0),l.modelValue&&(l.iconActive||l.icon)?(e.openBlock(),e.createElementBlock("i",{key:1,class:e.normalizeClass(["icon-kl",`icon-kl-${l.iconActive||l.icon}`,"app-toggle__icon",i.value?`text-${l.iconColor}`:""])},null,2)):e.createCommentVNode("",!0)])],2),e.renderSlot(l.$slots,"default",{},void 0,!0)]),l.label&&!l.labelLeft?(e.openBlock(),e.createElementBlock("span",G,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0)],2))}}),E=k(K,[["__scopeId","data-v-ba49356e"]]),X={key:0,class:"menu-item__loading"},j={key:0,class:"menu-item__checked"},Z={key:2,class:"menu-item__icon"},H={class:"menu-item__label"},J={key:3,class:"menu-item__icon-right icon-kl icon-kl-arrow-right"},x=e.defineComponent({__name:"PopupItem",props:{label:{},icon:{},iconSize:{},color:{},iconRight:{},arrow:{type:Boolean},toggle:{type:Boolean},checkbox:{type:Boolean},active:{type:Boolean},modelValue:{type:Boolean},persistent:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},gap:{type:Boolean},checked:{type:Boolean},isMobile:{type:Boolean}},emits:["update:modelValue","closePopup"],setup(c,{emit:n}){const a=c,o=n,i=()=>{a.disabled||(a.toggle||a.checkbox?o("update:modelValue",!a.modelValue):a.persistent||o("closePopup"))};return(t,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["menu-item",[{"menu-item_gap":t.gap},{"menu-item_disabled":t.disabled},{"menu-item_active":t.active},{"menu-item_mobile":t.isMobile}]]),onClick:i},[e.createElementVNode("div",{class:e.normalizeClass(["row items-center no-wrap",`text-${t.color?t.color:"dark"}`])},[t.loading?(e.openBlock(),e.createElementBlock("div",X,[e.createVNode(e.unref(A),{size:"19px",color:t.color?t.color:"dark"},null,8,["color"])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.checked?(e.openBlock(),e.createElementBlock("div",j,[...l[3]||(l[3]=[e.createElementVNode("i",{class:"icon-kl icon-kl-check"},null,-1)])])):e.createCommentVNode("",!0),t.checkbox?(e.openBlock(),e.createBlock(N,{key:1,class:"menu-item__checkbox",size:"34px","model-value":t.modelValue,"onUpdate:modelValue":l[0]||(l[0]=u=>o("update:modelValue",u)),onClick:l[1]||(l[1]=e.withModifiers(()=>{},["stop"]))},null,8,["model-value"])):e.createCommentVNode("",!0),t.icon?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("i",{class:e.normalizeClass(`icon-kl icon-kl-${t.icon}`),style:e.normalizeStyle({fontSize:t.iconSize||"27px"})},null,6)])):e.createCommentVNode("",!0)],64)),e.createElementVNode("span",H,e.toDisplayString(t.label),1)],2),t.$slots.right?e.renderSlot(t.$slots,"right",{key:0},void 0,!0):t.toggle?(e.openBlock(),e.createBlock(E,{key:1,class:"menu-item__toggle","model-value":t.modelValue,disabled:t.disabled||t.loading,"onUpdate:modelValue":l[2]||(l[2]=u=>o("update:modelValue",u))},null,8,["model-value","disabled"])):t.iconRight?(e.openBlock(),e.createElementBlock("i",{key:2,class:e.normalizeClass(["menu-item__icon-right menu-item__icon-right_custom icon-kl",`icon-kl-${t.iconRight}`])},null,2)):t.arrow?(e.openBlock(),e.createElementBlock("i",J)):e.createCommentVNode("",!0)],2)),[[I,!t.toggle&&!t.checkbox&&!t.persistent&&!t.disabled]])}}),ee=k(x,[["__scopeId","data-v-4b2a03b5"]]),oe=e.defineComponent({__name:"AppIcon",props:{name:{},size:{},color:{}},setup(c){return(n,a)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["icon-kl",`icon-kl-${n.name}`,n.color?`text-${n.color}`:""]),style:e.normalizeStyle(n.size?`font-size: ${n.size}`:void 0)},null,6))}}),$=k(oe,[["__scopeId","data-v-941765ee"]]),le={key:0,class:"code-field__label"},te={class:"code-field__inputs"},ne=["onUpdate:modelValue","disabled","onInput","onKeydown","onPaste"],ae=e.defineComponent({__name:"AppCodeInput",props:{length:{default:5},size:{default:g.MD},label:{},disabled:{type:Boolean},loading:{type:Boolean},autofocus:{type:Boolean},color:{}},emits:["update:modelValue","completed"],setup(c,{expose:n,emit:a}){const o=c,i=a,t=e.ref(Array(o.length).fill("")),l=e.ref([]),u=e.computed(()=>["code-field",{"code-field_disabled":o.disabled||o.loading},`code-field_${o.size}`,`code-field_${o.color}`]),b=e.computed(()=>{let s="";return o.size==g.SM&&(s+=`width: ${o.length*26+(o.length-1)*5}px`),o.size==g.MD&&(s+=`width: ${o.length*32+(o.length-1)*8}px`),o.size==g.LG&&(s+=`width: ${o.length*44+(o.length-1)*10}px`),s}),z=(s,d)=>{var p;const m=s.target.value;if(m.length===1)d<o.length-1&&l.value&&((p=l.value[d+1])==null||p.focus());else if(m.length>1){const r=m.slice(0,o.length-d).split("");r.forEach((f,v)=>{t.value[d+v]=f}),e.nextTick(()=>{var f;l.value&&((f=l.value[Math.min(d+r.length,o.length-1)])==null||f.focus())})}},B=s=>{var d;t.value[s]===""&&l.value&&s>0&&((d=l.value[s-1])==null||d.focus())},M=(s,d)=>{var p;s.preventDefault();const h=((p=s.clipboardData)==null?void 0:p.getData("text"))??"";if(!h)return;const m=h.slice(0,o.length-d).split("");m.forEach((r,f)=>{t.value[d+f]=r}),e.nextTick(()=>{var r;l.value&&((r=l.value[Math.min(d+m.length,o.length-1)])==null||r.focus())})};e.watch(t,s=>{const d=s.join("");y(d)},{deep:!0});const y=s=>{i("update:modelValue",s),s.length===o.length&&!s.includes(" ")&&i("completed",s)},_=s=>{s&&(t.value=s.split("").slice(0,o.length))};return e.onMounted(()=>{o.autofocus&&l.value&&l.value[0]&&l.value[0].focus()}),n({injectCode:_}),(s,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(u.value),style:e.normalizeStyle(b.value)},[s.label?(e.openBlock(),e.createElementBlock("label",le,e.toDisplayString(s.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.length,(h,m)=>e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:m,"onUpdate:modelValue":p=>t.value[m]=p,ref_for:!0,ref_key:"inputRefs",ref:l,type:"number",maxlength:"1",class:"code-field__input",disabled:s.disabled||s.loading,onInput:p=>z(p,m),onKeydown:e.withKeys(p=>B(m),["backspace"]),onPaste:p=>M(p,m)},null,40,ne)),[[e.vModelText,t.value[m]]])),128))]),s.loading?(e.openBlock(),e.createBlock(R,{key:1,indeterminate:"",rounded:"",color:s.color,class:"code-field__loading"},null,8,["color"])):e.createCommentVNode("",!0)],6))}}),se=k(ae,[["__scopeId","data-v-4e11db87"]]),ie=["onClick","disabled"],ce=e.defineComponent({__name:"AppSegment",props:e.mergeModels({options:{},disabled:{type:Boolean},size:{default:g.MD},color:{default:V.PRIMARY},glass:{type:Boolean},blur:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(c){const n=e.useModel(c,"modelValue"),a=c,o=e.useTemplateRef("scroller"),i=e.useTemplateRef("content"),t=e.useTemplateRef("buttons"),l=e.ref(!1),u=e.ref(!1),b=e.ref({left:0,width:0}),z=e.computed(()=>["app-segment",{"app-segment_disabled":a.disabled,"app-segment_scrollable":u.value,"app-segment_glass":a.glass,"app-segment_blur":a.blur},`app-segment_${a.size}`,`app-segment_${a.color}`]),B=e.computed(()=>a.options.findIndex(r=>r.value===n.value)),M=e.computed(()=>({width:`${b.value.width}px`,transform:`translateX(${b.value.left}px)`,opacity:b.value.width?1:0}));function y(){var f;const r=(f=t.value)==null?void 0:f[B.value];b.value=r?{left:r.offsetLeft,width:r.offsetWidth}:{left:0,width:0},o.value&&(u.value=o.value.scrollWidth-o.value.clientWidth>1)}function _(r="smooth"){var v,C;const f=(v=t.value)==null?void 0:v[B.value];!f||!((C=o.value)!=null&&C.scrollTo)||o.value.scrollTo({left:f.offsetLeft+f.offsetWidth/2-o.value.clientWidth/2,behavior:r})}function s(r){a.disabled||(n.value=r)}let d=!0;function h(){d=!1}function m(){y(),d&&_()}let p;return e.onMounted(async()=>{y(),await e.nextTick(),_("auto"),l.value=!0,typeof ResizeObserver<"u"&&o.value&&i.value&&(p=new ResizeObserver(m),p.observe(o.value),p.observe(i.value))}),e.onBeforeUnmount(()=>p==null?void 0:p.disconnect()),e.watch([B,u,()=>a.options,()=>a.size],()=>e.nextTick(y)),e.watch(B,()=>{d=!0,e.nextTick(()=>_())}),(r,f)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"scroller",ref:o,class:e.normalizeClass(z.value),onWheelPassive:h,onTouchstartPassive:h},[e.createElementVNode("div",{ref_key:"content",ref:i,class:"app-segment__content"},[e.createElementVNode("div",{class:e.normalizeClass(["app-segment__thumb",{"app-segment__thumb_animated":l.value}]),style:e.normalizeStyle(M.value)},null,6),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.options,(v,C)=>(e.openBlock(),e.createElementBlock("button",{ref_for:!0,ref_key:"buttons",ref:t,key:C,class:e.normalizeClass(["app-segment__btn",{"app-segment__btn_active":n.value===v.value}]),onClick:_e=>s(v.value),disabled:r.disabled},[e.renderSlot(r.$slots,"option",{option:v},()=>[e.createTextVNode(e.toDisplayString(v.label),1)],!0)],10,ie))),128))],512)],34))}}),re=k(ce,[["__scopeId","data-v-ae0383f8"]]),de={},pe={class:"system-menu"};function ue(c,n){return e.openBlock(),e.createElementBlock("div",pe,[e.renderSlot(c.$slots,"default",{},void 0,!0)])}const me=k(de,[["render",ue],["__scopeId","data-v-5649b2f4"]]),fe={class:"menu-item__content"},ge={key:0,class:"menu-item__value"},ke=e.defineComponent({__name:"MenuItem",props:e.mergeModels({label:{},icon:{},iconRight:{},arrow:{type:Boolean},color:{},to:{},href:{},target:{},disabled:{type:Boolean},toggle:{type:Boolean},isMobile:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["click"],["update:modelValue"]),setup(c,{emit:n}){const a=c,o=n,i=e.useModel(c,"modelValue"),t=async()=>{a.toggle&&(i.value=!i.value),o("click")};return(l,u)=>(e.openBlock(),e.createBlock(e.unref(D),{class:e.normalizeClass(["menu-item",{"menu-item_disabled":l.disabled,"menu-item_mobile":l.isMobile}]),to:l.to,href:l.href,target:l.target,disable:l.disabled,clickable:"",onClick:t},{default:e.withCtx(()=>[l.icon?(e.openBlock(),e.createBlock(e.unref($),{key:0,name:l.icon.name,class:e.normalizeClass(["menu-item__icon",`bg-${l.icon.color}`])},null,8,["name","class"])):e.createCommentVNode("",!0),e.createElementVNode("div",fe,[e.createElementVNode("span",{class:e.normalizeClass(["app-menu-item__label",l.color?`text-${l.color}`:""])},[e.createTextVNode(e.toDisplayString(l.label)+" ",1),e.renderSlot(l.$slots,"default",{},void 0,!0)],2),l.$slots.value?(e.openBlock(),e.createElementBlock("span",ge,[e.renderSlot(l.$slots,"value",{},void 0,!0)])):e.createCommentVNode("",!0),l.toggle?(e.openBlock(),e.createBlock(e.unref(E),{key:1,modelValue:i.value,"onUpdate:modelValue":u[0]||(u[0]=b=>i.value=b)},null,8,["modelValue"])):e.createCommentVNode("",!0),l.iconRight?(e.openBlock(),e.createBlock(e.unref($),{key:2,class:"menu-item__icon-right",name:l.iconRight.name,color:l.iconRight.color},null,8,["name","color"])):e.createCommentVNode("",!0),l.arrow?(e.openBlock(),e.createBlock(e.unref($),{key:3,class:"menu-item__icon-right menu-item__arrow",name:"arrow-right"})):e.createCommentVNode("",!0)])]),_:3},8,["class","to","href","target","disable"]))}}),be=k(ke,[["__scopeId","data-v-b9907ab7"]]),ve=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppButtonCopy-CJCsQ2Zc.cjs"))),he=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./AppSelect-DC8-TTlX.cjs"))),Be=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./DropdownButton-BXievAey.cjs"))),ye=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./BottomSheet-CLZ7f05J.cjs")));exports.AppButton=q;exports.AppButtonCopy=ve;exports.AppCodeInput=se;exports.AppIcon=$;exports.AppSegment=re;exports.AppSelect=he;exports.AppToggle=E;exports.BottomSheet=ye;exports.COLORS=V;exports.CloseButton=W;exports.DropdownButton=Be;exports.MenuItem=be;exports.PopupItem=ee;exports.SIZES=g;exports.SystemMenu=me;exports._export_sfc=k;exports.iconSet=L;
|