@dskripchenko/ui 0.0.1 → 0.2.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/components/Code/UidCode.vue.d.ts +36 -0
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/Combobox/UidCombobox.vue.d.ts +49 -0
- package/dist/components/Combobox/index.d.ts +2 -0
- package/dist/components/DateRangePicker/UidDateRangePicker.vue.d.ts +34 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/FileUpload/UidFileUpload.vue.d.ts +46 -0
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/NumberInput/UidNumberInput.vue.d.ts +46 -0
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/Stack/UidStack.vue.d.ts +1 -1
- package/dist/components/TagsInput/UidTagsInput.vue.d.ts +39 -0
- package/dist/components/TagsInput/index.d.ts +2 -0
- package/dist/components/TimePicker/UidTimePicker.vue.d.ts +33 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/Timeline/UidTimeline.vue.d.ts +24 -0
- package/dist/components/Timeline/UidTimelineItem.vue.d.ts +33 -0
- package/dist/components/Timeline/index.d.ts +4 -0
- package/dist/components/TreeView/UidTreeItem.vue.d.ts +7 -0
- package/dist/components/TreeView/UidTreeView.vue.d.ts +35 -0
- package/dist/components/TreeView/context.d.ts +26 -0
- package/dist/components/TreeView/index.d.ts +4 -0
- package/dist/index.cjs +2 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.mjs +2250 -648
- package/dist/styles/index.css +1 -1
- package/package.json +13 -13
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { t as e } from "./UidIcon-5947kXOj.js";
|
|
2
2
|
import { Fragment as t, Teleport as n, Transition as r, TransitionGroup as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, inject as p, mergeModels as m, mergeProps as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onMounted as y, onUnmounted as b, openBlock as x, provide as S, readonly as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, toDisplayString as k, toValue as A, unref as j, useId as M, useModel as N, useSlots as P, vModelDynamic as F, vModelText as I, watch as L, withCtx as R, withDirectives as z, withModifiers as B } from "vue";
|
|
3
|
-
import { AlertCircle as V, AlertTriangle as H, ArrowDown as U, ArrowLeft as W, ArrowUp as G, ArrowUpDown as ee, Check as
|
|
3
|
+
import { AlertCircle as V, AlertTriangle as H, ArrowDown as U, ArrowLeft as W, ArrowUp as G, ArrowUpDown as ee, Calendar as K, Check as q, CheckCircle2 as J, ChevronDown as te, ChevronLeft as Y, ChevronRight as X, Clock as ne, Copy as re, FileText as ie, FolderOpen as ae, Info as oe, Minus as se, Plus as ce, Search as le, ServerCrash as ue, Upload as de, WifiOff as fe, X as Z } from "lucide-vue-next";
|
|
4
4
|
//#region src/components/Button/UidButton.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var pe = [
|
|
6
6
|
"type",
|
|
7
7
|
"disabled",
|
|
8
8
|
"aria-disabled",
|
|
9
9
|
"data-loading"
|
|
10
|
-
],
|
|
10
|
+
], me = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "uid-button__prepend"
|
|
13
|
-
},
|
|
13
|
+
}, he = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "uid-button__append"
|
|
16
|
-
},
|
|
16
|
+
}, ge = /* @__PURE__ */ f({
|
|
17
17
|
__name: "UidButton",
|
|
18
18
|
props: {
|
|
19
19
|
variant: { default: "primary" },
|
|
@@ -42,12 +42,12 @@ var se = [
|
|
|
42
42
|
"data-loading": e.loading ? "true" : void 0,
|
|
43
43
|
onClick: i
|
|
44
44
|
}, [
|
|
45
|
-
t.$slots.prepend ? (x(), c("span",
|
|
45
|
+
t.$slots.prepend ? (x(), c("span", me, [E(t.$slots, "prepend")])) : s("", !0),
|
|
46
46
|
E(t.$slots, "default"),
|
|
47
|
-
t.$slots.append ? (x(), c("span",
|
|
48
|
-
], 10,
|
|
47
|
+
t.$slots.append ? (x(), c("span", he, [E(t.$slots, "append")])) : s("", !0)
|
|
48
|
+
], 10, pe));
|
|
49
49
|
}
|
|
50
|
-
}),
|
|
50
|
+
}), _e = {
|
|
51
51
|
required: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`,
|
|
52
52
|
email: () => "Введите корректный email",
|
|
53
53
|
url: () => "Введите корректный URL",
|
|
@@ -62,59 +62,59 @@ var se = [
|
|
|
62
62
|
same_as: () => "Значения не совпадают",
|
|
63
63
|
required_if: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`,
|
|
64
64
|
required_unless: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`
|
|
65
|
-
},
|
|
66
|
-
function
|
|
67
|
-
|
|
68
|
-
...
|
|
65
|
+
}, ve = {};
|
|
66
|
+
function ye(e) {
|
|
67
|
+
ve = {
|
|
68
|
+
...ve,
|
|
69
69
|
...e
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
let n =
|
|
74
|
-
return n ? typeof n == "function" ? n(t) : n :
|
|
72
|
+
function Q(e, t) {
|
|
73
|
+
let n = ve[e];
|
|
74
|
+
return n ? typeof n == "function" ? n(t) : n : _e[e]?.(t) ?? `Ошибка валидации: ${e}`;
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/utils/validation/rules.ts
|
|
78
|
-
var
|
|
79
|
-
function
|
|
78
|
+
var be = "__uid_nullable__";
|
|
79
|
+
function $(e) {
|
|
80
80
|
return e == null || String(e).trim() === "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function xe(e, t) {
|
|
83
83
|
return t ? {
|
|
84
84
|
...e,
|
|
85
85
|
params: t
|
|
86
86
|
} : e;
|
|
87
87
|
}
|
|
88
|
-
var
|
|
89
|
-
if (
|
|
88
|
+
var Se = (e) => (t, n) => !$(t) || (e ?? Q("required", n)), Ce = () => (e) => $(e) ? be : !0, we = (e) => (t, n) => $(t) || /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(String(t)) || (e ?? Q("email", n)), Te = (e) => (t, n) => {
|
|
89
|
+
if ($(t)) return !0;
|
|
90
90
|
try {
|
|
91
91
|
return new URL(String(t)), !0;
|
|
92
92
|
} catch {
|
|
93
|
-
return e ??
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
required: () =>
|
|
97
|
-
nullable: () =>
|
|
98
|
-
email: () =>
|
|
99
|
-
url: () =>
|
|
100
|
-
numeric: () =>
|
|
101
|
-
integer: () =>
|
|
102
|
-
min: ([e]) =>
|
|
103
|
-
max: ([e]) =>
|
|
104
|
-
min_value: ([e]) =>
|
|
105
|
-
max_value: ([e]) =>
|
|
106
|
-
regex: ([e]) =>
|
|
107
|
-
in: (e) =>
|
|
108
|
-
same_as: ([e]) =>
|
|
93
|
+
return e ?? Q("url", n);
|
|
94
|
+
}
|
|
95
|
+
}, Ee = (e) => (t, n) => $(t) || !isNaN(Number(t)) || (e ?? Q("numeric", n)), De = (e) => (t, n) => $(t) || Number.isInteger(Number(t)) || (e ?? Q("integer", n)), Oe = (e, t) => (n, r) => $(n) || String(n).length >= e || (t ?? Q("min", xe(r, [String(e)]))), ke = (e, t) => (n, r) => $(n) || String(n).length <= e || (t ?? Q("max", xe(r, [String(e)]))), Ae = (e, t) => (n, r) => $(n) || Number(n) >= e || (t ?? Q("min_value", xe(r, [String(e)]))), je = (e, t) => (n, r) => $(n) || Number(n) <= e || (t ?? Q("max_value", xe(r, [String(e)]))), Me = (e, t) => (n, r) => $(n) ? !0 : (typeof e == "string" ? new RegExp(e) : e).test(String(n)) || (t ?? Q("regex", r)), Ne = (e, t) => (n, r) => $(n) || e.includes(String(n)) || (t ?? Q("in", r)), Pe = (e, t) => (n, r) => r.form ? n === r.form[e] || (t ?? Q("same_as", r)) : !0, Fe = (e, t, n) => (r, i) => !i.form || i.form[e] !== t ? !0 : !$(r) || (n ?? Q("required_if", i)), Ie = (e, t, n) => (r, i) => !i.form || i.form[e] === t ? !0 : !$(r) || (n ?? Q("required_unless", i)), Le = {
|
|
96
|
+
required: () => Se(),
|
|
97
|
+
nullable: () => Ce(),
|
|
98
|
+
email: () => we(),
|
|
99
|
+
url: () => Te(),
|
|
100
|
+
numeric: () => Ee(),
|
|
101
|
+
integer: () => De(),
|
|
102
|
+
min: ([e]) => Oe(Number(e)),
|
|
103
|
+
max: ([e]) => ke(Number(e)),
|
|
104
|
+
min_value: ([e]) => Ae(Number(e)),
|
|
105
|
+
max_value: ([e]) => je(Number(e)),
|
|
106
|
+
regex: ([e]) => Me(e),
|
|
107
|
+
in: (e) => Ne(e),
|
|
108
|
+
same_as: ([e]) => Pe(e)
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function Re(e) {
|
|
111
111
|
return e ? (Array.isArray(e) ? e : [e]).flatMap((e) => typeof e == "function" ? [e] : e.split("|").map((e) => {
|
|
112
|
-
let t = e.indexOf(":"), n = t === -1 ? e.trim() : e.slice(0, t).trim(), r = t === -1 ? "" : e.slice(t + 1), i = r ? r.split(",") : [], a =
|
|
112
|
+
let t = e.indexOf(":"), n = t === -1 ? e.trim() : e.slice(0, t).trim(), r = t === -1 ? "" : e.slice(t + 1), i = r ? r.split(",") : [], a = Le[n];
|
|
113
113
|
if (!a) throw Error(`Unknown validation rule: "${n}"`);
|
|
114
114
|
return a(i);
|
|
115
115
|
})) : [];
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ze(e, t, n) {
|
|
118
118
|
for (let r of t) {
|
|
119
119
|
let t = r(e, n);
|
|
120
120
|
if (t === "__uid_nullable__") return "";
|
|
@@ -124,15 +124,15 @@ function Me(e, t, n) {
|
|
|
124
124
|
}
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/composables/useField.ts
|
|
127
|
-
function
|
|
127
|
+
function Be(e, t, n) {
|
|
128
128
|
let r = w(""), i = w(!1);
|
|
129
129
|
function a() {
|
|
130
|
-
let i =
|
|
130
|
+
let i = Re(t && "value" in t ? t.value : t), a = {
|
|
131
131
|
field: n?.name ?? "",
|
|
132
132
|
label: n?.label,
|
|
133
133
|
form: n?.form?.value
|
|
134
134
|
};
|
|
135
|
-
return r.value =
|
|
135
|
+
return r.value = ze(e.value, i, a), !r.value;
|
|
136
136
|
}
|
|
137
137
|
function o() {
|
|
138
138
|
i.value = !0, a();
|
|
@@ -152,14 +152,14 @@ function Ne(e, t, n) {
|
|
|
152
152
|
}
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/components/Input/UidInput.vue?vue&type=script&setup=true&lang.ts
|
|
155
|
-
var
|
|
155
|
+
var Ve = ["for"], He = {
|
|
156
156
|
key: 0,
|
|
157
157
|
class: "uid-input-field__required",
|
|
158
158
|
"aria-hidden": "true"
|
|
159
|
-
},
|
|
159
|
+
}, Ue = { class: "uid-input-field__control" }, We = {
|
|
160
160
|
key: 0,
|
|
161
161
|
class: "uid-input-field__prepend"
|
|
162
|
-
},
|
|
162
|
+
}, Ge = [
|
|
163
163
|
"id",
|
|
164
164
|
"type",
|
|
165
165
|
"name",
|
|
@@ -170,10 +170,10 @@ var Pe = ["for"], Fe = {
|
|
|
170
170
|
"autocomplete",
|
|
171
171
|
"aria-invalid",
|
|
172
172
|
"aria-describedby"
|
|
173
|
-
],
|
|
173
|
+
], Ke = {
|
|
174
174
|
key: 1,
|
|
175
175
|
class: "uid-input-field__append"
|
|
176
|
-
},
|
|
176
|
+
}, qe = ["id"], Je = /* @__PURE__ */ f({
|
|
177
177
|
__name: "UidInput",
|
|
178
178
|
props: /* @__PURE__ */ m({
|
|
179
179
|
type: { default: "text" },
|
|
@@ -204,7 +204,7 @@ var Pe = ["for"], Fe = {
|
|
|
204
204
|
}),
|
|
205
205
|
emits: /* @__PURE__ */ m(["blur", "focus"], ["update:modelValue"]),
|
|
206
206
|
setup(e, { expose: t, emit: n }) {
|
|
207
|
-
let r = e, i = n, o = N(e, "modelValue"), d = r.id ?? M(), { error: f, validate: p, onBlur: m } =
|
|
207
|
+
let r = e, i = n, o = N(e, "modelValue"), d = r.id ?? M(), { error: f, validate: p, onBlur: m } = Be(o, a(() => r.rules), {
|
|
208
208
|
name: r.name,
|
|
209
209
|
label: r.label
|
|
210
210
|
}), h = a(() => r.error || f.value), g = a(() => !!h.value), v = a(() => h.value || r.hint);
|
|
@@ -221,9 +221,9 @@ var Pe = ["for"], Fe = {
|
|
|
221
221
|
key: 0,
|
|
222
222
|
for: j(d),
|
|
223
223
|
class: "uid-input-field__label"
|
|
224
|
-
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span",
|
|
225
|
-
l("div",
|
|
226
|
-
t.$slots.prepend ? (x(), c("span",
|
|
224
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", He, "*")) : s("", !0)], 8, Ve)) : s("", !0),
|
|
225
|
+
l("div", Ue, [
|
|
226
|
+
t.$slots.prepend ? (x(), c("span", We, [E(t.$slots, "prepend")])) : s("", !0),
|
|
227
227
|
z(l("input", {
|
|
228
228
|
id: j(d),
|
|
229
229
|
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
@@ -239,21 +239,21 @@ var Pe = ["for"], Fe = {
|
|
|
239
239
|
"aria-describedby": v.value ? `${j(d)}-hint` : void 0,
|
|
240
240
|
onBlur: y,
|
|
241
241
|
onFocus: n[1] ||= (e) => i("focus", e)
|
|
242
|
-
}, null, 40,
|
|
243
|
-
t.$slots.append ? (x(), c("span",
|
|
242
|
+
}, null, 40, Ge), [[F, o.value]]),
|
|
243
|
+
t.$slots.append ? (x(), c("span", Ke, [E(t.$slots, "append")])) : s("", !0)
|
|
244
244
|
]),
|
|
245
245
|
v.value ? (x(), c("p", {
|
|
246
246
|
key: 1,
|
|
247
247
|
id: `${j(d)}-hint`,
|
|
248
248
|
class: _(["uid-input-field__hint", g.value && "uid-input-field__hint--error"])
|
|
249
|
-
}, k(v.value), 11,
|
|
249
|
+
}, k(v.value), 11, qe)) : s("", !0)
|
|
250
250
|
], 2));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), Ye = ["for"], Xe = {
|
|
253
253
|
key: 0,
|
|
254
254
|
class: "uid-textarea-field__required",
|
|
255
255
|
"aria-hidden": "true"
|
|
256
|
-
},
|
|
256
|
+
}, Ze = [
|
|
257
257
|
"id",
|
|
258
258
|
"name",
|
|
259
259
|
"placeholder",
|
|
@@ -263,7 +263,7 @@ var Pe = ["for"], Fe = {
|
|
|
263
263
|
"rows",
|
|
264
264
|
"aria-invalid",
|
|
265
265
|
"aria-describedby"
|
|
266
|
-
],
|
|
266
|
+
], Qe = ["id"], $e = /* @__PURE__ */ f({
|
|
267
267
|
__name: "UidTextarea",
|
|
268
268
|
props: /* @__PURE__ */ m({
|
|
269
269
|
placeholder: { default: void 0 },
|
|
@@ -306,7 +306,7 @@ var Pe = ["for"], Fe = {
|
|
|
306
306
|
}),
|
|
307
307
|
emits: /* @__PURE__ */ m(["blur", "focus"], ["update:modelValue"]),
|
|
308
308
|
setup(e, { expose: t, emit: n }) {
|
|
309
|
-
let r = e, i = n, o = N(e, "modelValue"), d = w(null), f = M(), p = r.id ?? f, { error: m, validate: h, onBlur: b } =
|
|
309
|
+
let r = e, i = n, o = N(e, "modelValue"), d = w(null), f = M(), p = r.id ?? f, { error: m, validate: h, onBlur: b } = Be(o, a(() => r.rules), {
|
|
310
310
|
name: r.name,
|
|
311
311
|
label: r.label
|
|
312
312
|
}), S = a(() => r.error || m.value), C = a(() => !!S.value), T = a(() => S.value || r.hint);
|
|
@@ -340,7 +340,7 @@ var Pe = ["for"], Fe = {
|
|
|
340
340
|
key: 0,
|
|
341
341
|
for: j(p),
|
|
342
342
|
class: "uid-textarea-field__label"
|
|
343
|
-
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span",
|
|
343
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", Xe, "*")) : s("", !0)], 8, Ye)) : s("", !0),
|
|
344
344
|
z(l("textarea", {
|
|
345
345
|
id: j(p),
|
|
346
346
|
ref_key: "textareaRef",
|
|
@@ -361,15 +361,15 @@ var Pe = ["for"], Fe = {
|
|
|
361
361
|
} : { resize: e.resize }),
|
|
362
362
|
onBlur: D,
|
|
363
363
|
onFocus: n[1] ||= (e) => i("focus", e)
|
|
364
|
-
}, null, 44,
|
|
364
|
+
}, null, 44, Ze), [[I, o.value]]),
|
|
365
365
|
T.value ? (x(), c("p", {
|
|
366
366
|
key: 1,
|
|
367
367
|
id: `${j(p)}-hint`,
|
|
368
368
|
class: _(["uid-textarea-field__hint", C.value && "uid-textarea-field__hint--error"])
|
|
369
|
-
}, k(T.value), 11,
|
|
369
|
+
}, k(T.value), 11, Qe)) : s("", !0)
|
|
370
370
|
], 2));
|
|
371
371
|
}
|
|
372
|
-
}),
|
|
372
|
+
}), et = { class: "uid-checkbox__label" }, tt = [
|
|
373
373
|
"id",
|
|
374
374
|
"name",
|
|
375
375
|
"checked",
|
|
@@ -377,14 +377,14 @@ var Pe = ["for"], Fe = {
|
|
|
377
377
|
"required",
|
|
378
378
|
"aria-describedby",
|
|
379
379
|
"aria-invalid"
|
|
380
|
-
],
|
|
380
|
+
], nt = {
|
|
381
381
|
key: 0,
|
|
382
382
|
class: "uid-checkbox__text"
|
|
383
|
-
},
|
|
383
|
+
}, rt = {
|
|
384
384
|
key: 0,
|
|
385
385
|
class: "uid-checkbox__required",
|
|
386
386
|
"aria-hidden": "true"
|
|
387
|
-
},
|
|
387
|
+
}, it = /* @__PURE__ */ f({
|
|
388
388
|
__name: "UidCheckbox",
|
|
389
389
|
props: /* @__PURE__ */ m({
|
|
390
390
|
label: { default: void 0 },
|
|
@@ -422,7 +422,7 @@ var Pe = ["for"], Fe = {
|
|
|
422
422
|
let t = e.target.checked;
|
|
423
423
|
i.value = t, r("change", t);
|
|
424
424
|
}
|
|
425
|
-
return (t, n) => (x(), c("div", { class: _(["uid-checkbox", [m.value && "uid-checkbox--error", e.disabled && "uid-checkbox--disabled"]]) }, [l("label",
|
|
425
|
+
return (t, n) => (x(), c("div", { class: _(["uid-checkbox", [m.value && "uid-checkbox--error", e.disabled && "uid-checkbox--disabled"]]) }, [l("label", et, [
|
|
426
426
|
l("input", {
|
|
427
427
|
id: j(f),
|
|
428
428
|
ref_key: "inputRef",
|
|
@@ -436,27 +436,27 @@ var Pe = ["for"], Fe = {
|
|
|
436
436
|
"aria-describedby": h.value ? p : void 0,
|
|
437
437
|
"aria-invalid": m.value ? "true" : void 0,
|
|
438
438
|
onChange: v
|
|
439
|
-
}, null, 40,
|
|
439
|
+
}, null, 40, tt),
|
|
440
440
|
n[0] ||= l("span", {
|
|
441
441
|
class: "uid-checkbox__box",
|
|
442
442
|
"aria-hidden": "true"
|
|
443
443
|
}, null, -1),
|
|
444
|
-
e.label ? (x(), c("span",
|
|
444
|
+
e.label ? (x(), c("span", nt, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", rt, "*")) : s("", !0)])) : s("", !0)
|
|
445
445
|
]), h.value ? (x(), c("p", {
|
|
446
446
|
key: 0,
|
|
447
447
|
id: p,
|
|
448
448
|
class: _(["uid-checkbox__hint", m.value && "uid-checkbox__hint--error"])
|
|
449
449
|
}, k(h.value), 3)) : s("", !0)], 2));
|
|
450
450
|
}
|
|
451
|
-
}),
|
|
451
|
+
}), at = Symbol("uid-radio-group"), ot = [
|
|
452
452
|
"id",
|
|
453
453
|
"name",
|
|
454
454
|
"checked",
|
|
455
455
|
"disabled"
|
|
456
|
-
],
|
|
456
|
+
], st = {
|
|
457
457
|
key: 0,
|
|
458
458
|
class: "uid-radio__text"
|
|
459
|
-
},
|
|
459
|
+
}, ct = /* @__PURE__ */ f({
|
|
460
460
|
__name: "UidRadio",
|
|
461
461
|
props: /* @__PURE__ */ m({
|
|
462
462
|
value: { type: [
|
|
@@ -483,7 +483,7 @@ var Pe = ["for"], Fe = {
|
|
|
483
483
|
}),
|
|
484
484
|
emits: ["update:modelValue"],
|
|
485
485
|
setup(e) {
|
|
486
|
-
let t = e, n = N(e, "modelValue"), r = p(
|
|
486
|
+
let t = e, n = N(e, "modelValue"), r = p(at, null), i = M(), o = t.id ?? i, u = a(() => r ? r.modelValue.value === t.value : n.value === t.value), d = a(() => r?.name ?? t.name ?? ""), f = a(() => (r?.disabled.value ?? !1) || (t.disabled ?? !1));
|
|
487
487
|
function m() {
|
|
488
488
|
r ? r.update(t.value) : n.value = t.value;
|
|
489
489
|
}
|
|
@@ -496,25 +496,25 @@ var Pe = ["for"], Fe = {
|
|
|
496
496
|
checked: u.value,
|
|
497
497
|
disabled: f.value,
|
|
498
498
|
onChange: m
|
|
499
|
-
}, null, 40,
|
|
499
|
+
}, null, 40, ot),
|
|
500
500
|
n[0] ||= l("span", {
|
|
501
501
|
class: "uid-radio__circle",
|
|
502
502
|
"aria-hidden": "true"
|
|
503
503
|
}, null, -1),
|
|
504
|
-
e.label ? (x(), c("span",
|
|
504
|
+
e.label ? (x(), c("span", st, k(e.label), 1)) : s("", !0)
|
|
505
505
|
], 2));
|
|
506
506
|
}
|
|
507
|
-
}),
|
|
507
|
+
}), lt = [
|
|
508
508
|
"aria-labelledby",
|
|
509
509
|
"aria-describedby",
|
|
510
510
|
"aria-required",
|
|
511
511
|
"aria-invalid",
|
|
512
512
|
"aria-disabled"
|
|
513
|
-
],
|
|
513
|
+
], ut = ["id"], dt = {
|
|
514
514
|
key: 0,
|
|
515
515
|
class: "uid-radio-group__required",
|
|
516
516
|
"aria-hidden": "true"
|
|
517
|
-
},
|
|
517
|
+
}, ft = { class: "uid-radio-group__options" }, pt = ["id"], mt = /* @__PURE__ */ f({
|
|
518
518
|
__name: "UidRadioGroup",
|
|
519
519
|
props: /* @__PURE__ */ m({
|
|
520
520
|
name: { default: void 0 },
|
|
@@ -542,7 +542,7 @@ var Pe = ["for"], Fe = {
|
|
|
542
542
|
emits: ["update:modelValue"],
|
|
543
543
|
setup(e) {
|
|
544
544
|
let t = e, n = N(e, "modelValue"), r = M(), i = t.name ?? r, o = M(), d = M(), f = a(() => !!t.error), p = a(() => t.error || t.hint);
|
|
545
|
-
return S(
|
|
545
|
+
return S(at, {
|
|
546
546
|
modelValue: n,
|
|
547
547
|
update: (e) => {
|
|
548
548
|
n.value = e;
|
|
@@ -566,16 +566,16 @@ var Pe = ["for"], Fe = {
|
|
|
566
566
|
key: 0,
|
|
567
567
|
id: j(o),
|
|
568
568
|
class: "uid-radio-group__legend"
|
|
569
|
-
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span",
|
|
570
|
-
l("div",
|
|
569
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", dt, "*")) : s("", !0)], 8, ut)) : s("", !0),
|
|
570
|
+
l("div", ft, [E(t.$slots, "default")]),
|
|
571
571
|
p.value ? (x(), c("p", {
|
|
572
572
|
key: 1,
|
|
573
573
|
id: j(d),
|
|
574
574
|
class: _(["uid-radio-group__hint", f.value && "uid-radio-group__hint--error"])
|
|
575
|
-
}, k(p.value), 11,
|
|
576
|
-
], 10,
|
|
575
|
+
}, k(p.value), 11, pt)) : s("", !0)
|
|
576
|
+
], 10, lt));
|
|
577
577
|
}
|
|
578
|
-
}),
|
|
578
|
+
}), ht = { class: "uid-switch__label" }, gt = [
|
|
579
579
|
"id",
|
|
580
580
|
"name",
|
|
581
581
|
"checked",
|
|
@@ -583,14 +583,14 @@ var Pe = ["for"], Fe = {
|
|
|
583
583
|
"required",
|
|
584
584
|
"aria-describedby",
|
|
585
585
|
"aria-invalid"
|
|
586
|
-
],
|
|
586
|
+
], _t = {
|
|
587
587
|
key: 0,
|
|
588
588
|
class: "uid-switch__text"
|
|
589
|
-
},
|
|
589
|
+
}, vt = {
|
|
590
590
|
key: 0,
|
|
591
591
|
class: "uid-switch__required",
|
|
592
592
|
"aria-hidden": "true"
|
|
593
|
-
},
|
|
593
|
+
}, yt = /* @__PURE__ */ f({
|
|
594
594
|
__name: "UidSwitch",
|
|
595
595
|
props: /* @__PURE__ */ m({
|
|
596
596
|
label: { default: void 0 },
|
|
@@ -625,7 +625,7 @@ var Pe = ["for"], Fe = {
|
|
|
625
625
|
`uid-switch--${e.size}`,
|
|
626
626
|
p.value && "uid-switch--error",
|
|
627
627
|
e.disabled && "uid-switch--disabled"
|
|
628
|
-
]]) }, [l("label",
|
|
628
|
+
]]) }, [l("label", ht, [
|
|
629
629
|
l("input", {
|
|
630
630
|
id: j(d),
|
|
631
631
|
type: "checkbox",
|
|
@@ -638,23 +638,23 @@ var Pe = ["for"], Fe = {
|
|
|
638
638
|
"aria-describedby": m.value ? f : void 0,
|
|
639
639
|
"aria-invalid": p.value ? "true" : void 0,
|
|
640
640
|
onChange: h
|
|
641
|
-
}, null, 40,
|
|
641
|
+
}, null, 40, gt),
|
|
642
642
|
n[0] ||= l("span", {
|
|
643
643
|
class: "uid-switch__track",
|
|
644
644
|
"aria-hidden": "true"
|
|
645
645
|
}, [l("span", { class: "uid-switch__thumb" })], -1),
|
|
646
|
-
e.label ? (x(), c("span",
|
|
646
|
+
e.label ? (x(), c("span", _t, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", vt, "*")) : s("", !0)])) : s("", !0)
|
|
647
647
|
]), m.value ? (x(), c("p", {
|
|
648
648
|
key: 0,
|
|
649
649
|
id: f,
|
|
650
650
|
class: _(["uid-switch__hint", p.value && "uid-switch__hint--error"])
|
|
651
651
|
}, k(m.value), 3)) : s("", !0)], 2));
|
|
652
652
|
}
|
|
653
|
-
}),
|
|
653
|
+
}), bt = ["for"], xt = {
|
|
654
654
|
key: 0,
|
|
655
655
|
class: "uid-label__required",
|
|
656
656
|
"aria-hidden": "true"
|
|
657
|
-
},
|
|
657
|
+
}, St = /* @__PURE__ */ f({
|
|
658
658
|
__name: "UidLabel",
|
|
659
659
|
props: {
|
|
660
660
|
for: { default: void 0 },
|
|
@@ -671,13 +671,13 @@ var Pe = ["for"], Fe = {
|
|
|
671
671
|
return (t, n) => (x(), c("label", {
|
|
672
672
|
class: _(["uid-label", e.disabled && "uid-label--disabled"]),
|
|
673
673
|
for: t.$props.for
|
|
674
|
-
}, [E(t.$slots, "default"), e.required ? (x(), c("span",
|
|
674
|
+
}, [E(t.$slots, "default"), e.required ? (x(), c("span", xt, "*")) : s("", !0)], 10, bt));
|
|
675
675
|
}
|
|
676
|
-
}),
|
|
676
|
+
}), Ct = ["for"], wt = {
|
|
677
677
|
key: 0,
|
|
678
678
|
class: "uid-form-field__required",
|
|
679
679
|
"aria-hidden": "true"
|
|
680
|
-
},
|
|
680
|
+
}, Tt = { class: "uid-form-field__content" }, Et = ["id"], Dt = /* @__PURE__ */ f({
|
|
681
681
|
__name: "UidFormField",
|
|
682
682
|
props: {
|
|
683
683
|
label: { default: void 0 },
|
|
@@ -700,16 +700,16 @@ var Pe = ["for"], Fe = {
|
|
|
700
700
|
key: 0,
|
|
701
701
|
class: "uid-form-field__label",
|
|
702
702
|
for: e.labelFor
|
|
703
|
-
}, [E(t.$slots, "label", {}, () => [u(k(e.label), 1)]), e.required ? (x(), c("span",
|
|
704
|
-
l("div",
|
|
703
|
+
}, [E(t.$slots, "label", {}, () => [u(k(e.label), 1)]), e.required ? (x(), c("span", wt, "*")) : s("", !0)], 8, Ct)) : s("", !0),
|
|
704
|
+
l("div", Tt, [E(t.$slots, "default")]),
|
|
705
705
|
r.value ? (x(), c("p", {
|
|
706
706
|
key: 1,
|
|
707
707
|
id: j(n),
|
|
708
708
|
class: _(["uid-form-field__hint", o.value && "uid-form-field__hint--error"])
|
|
709
|
-
}, k(i.value), 11,
|
|
709
|
+
}, k(i.value), 11, Et)) : s("", !0)
|
|
710
710
|
], 2));
|
|
711
711
|
}
|
|
712
|
-
}),
|
|
712
|
+
}), Ot = ["aria-label"], kt = /* @__PURE__ */ f({
|
|
713
713
|
__name: "UidSpinner",
|
|
714
714
|
props: {
|
|
715
715
|
size: { default: "md" },
|
|
@@ -720,13 +720,13 @@ var Pe = ["for"], Fe = {
|
|
|
720
720
|
class: _(["uid-spinner", `uid-spinner--${e.size}`]),
|
|
721
721
|
role: "status",
|
|
722
722
|
"aria-label": e.label
|
|
723
|
-
}, null, 10,
|
|
723
|
+
}, null, 10, Ot));
|
|
724
724
|
}
|
|
725
|
-
}),
|
|
725
|
+
}), At = {
|
|
726
726
|
key: 0,
|
|
727
727
|
class: "uid-skeleton-lines",
|
|
728
728
|
"aria-hidden": "true"
|
|
729
|
-
},
|
|
729
|
+
}, jt = /* @__PURE__ */ f({
|
|
730
730
|
__name: "UidSkeleton",
|
|
731
731
|
props: {
|
|
732
732
|
width: { default: "100%" },
|
|
@@ -738,7 +738,7 @@ var Pe = ["for"], Fe = {
|
|
|
738
738
|
lines: { default: 1 }
|
|
739
739
|
},
|
|
740
740
|
setup(e) {
|
|
741
|
-
return (n, r) => e.lines > 1 ? (x(), c("div",
|
|
741
|
+
return (n, r) => e.lines > 1 ? (x(), c("div", At, [(x(!0), c(t, null, T(e.lines, (t) => (x(), c("span", {
|
|
742
742
|
key: t,
|
|
743
743
|
class: _(["uid-skeleton", [e.rounded === !0 && "uid-skeleton--rounded", e.rounded === "full" && "uid-skeleton--full"]]),
|
|
744
744
|
style: v({
|
|
@@ -755,7 +755,7 @@ var Pe = ["for"], Fe = {
|
|
|
755
755
|
"aria-hidden": "true"
|
|
756
756
|
}, null, 6));
|
|
757
757
|
}
|
|
758
|
-
}),
|
|
758
|
+
}), Mt = /* @__PURE__ */ f({
|
|
759
759
|
__name: "UidBadge",
|
|
760
760
|
props: {
|
|
761
761
|
variant: { default: "default" },
|
|
@@ -772,10 +772,10 @@ var Pe = ["for"], Fe = {
|
|
|
772
772
|
e.dot && "uid-badge--dot"
|
|
773
773
|
]]) }, [e.dot ? s("", !0) : E(t.$slots, "default", { key: 0 })], 2));
|
|
774
774
|
}
|
|
775
|
-
}),
|
|
775
|
+
}), Nt = { class: "uid-alert__icon" }, Pt = { class: "uid-alert__content" }, Ft = {
|
|
776
776
|
key: 0,
|
|
777
777
|
class: "uid-alert__title"
|
|
778
|
-
},
|
|
778
|
+
}, It = { class: "uid-alert__body" }, Lt = /* @__PURE__ */ f({
|
|
779
779
|
__name: "UidAlert",
|
|
780
780
|
props: {
|
|
781
781
|
variant: { default: "info" },
|
|
@@ -789,8 +789,8 @@ var Pe = ["for"], Fe = {
|
|
|
789
789
|
emits: ["dismiss"],
|
|
790
790
|
setup(t, { emit: n }) {
|
|
791
791
|
let r = t, i = n, o = {
|
|
792
|
-
info:
|
|
793
|
-
success:
|
|
792
|
+
info: oe,
|
|
793
|
+
success: J,
|
|
794
794
|
warning: H,
|
|
795
795
|
danger: V
|
|
796
796
|
}, u = a(() => o[r.variant ?? "info"]);
|
|
@@ -798,11 +798,11 @@ var Pe = ["for"], Fe = {
|
|
|
798
798
|
class: _(["uid-alert", `uid-alert--${t.variant}`]),
|
|
799
799
|
role: "alert"
|
|
800
800
|
}, [
|
|
801
|
-
l("span",
|
|
801
|
+
l("span", Nt, [E(n.$slots, "icon", {}, () => [d(e, {
|
|
802
802
|
icon: t.icon ?? u.value,
|
|
803
803
|
size: 18
|
|
804
804
|
}, null, 8, ["icon"])])]),
|
|
805
|
-
l("div",
|
|
805
|
+
l("div", Pt, [t.title ? (x(), c("p", Ft, k(t.title), 1)) : s("", !0), l("div", It, [E(n.$slots, "default")])]),
|
|
806
806
|
t.dismissible ? (x(), c("button", {
|
|
807
807
|
key: 0,
|
|
808
808
|
type: "button",
|
|
@@ -810,15 +810,15 @@ var Pe = ["for"], Fe = {
|
|
|
810
810
|
"aria-label": "Закрыть",
|
|
811
811
|
onClick: r[0] ||= (e) => i("dismiss")
|
|
812
812
|
}, [d(e, {
|
|
813
|
-
icon: j(
|
|
813
|
+
icon: j(Z),
|
|
814
814
|
size: 16
|
|
815
815
|
}, null, 8, ["icon"])])) : s("", !0)
|
|
816
816
|
], 2));
|
|
817
817
|
}
|
|
818
|
-
}),
|
|
818
|
+
}), Rt = { class: "uid-toast__icon" }, zt = { class: "uid-toast__content" }, Bt = {
|
|
819
819
|
key: 0,
|
|
820
820
|
class: "uid-toast__title"
|
|
821
|
-
},
|
|
821
|
+
}, Vt = { class: "uid-toast__message" }, Ht = /* @__PURE__ */ f({
|
|
822
822
|
__name: "UidToast",
|
|
823
823
|
props: {
|
|
824
824
|
id: {},
|
|
@@ -829,8 +829,8 @@ var Pe = ["for"], Fe = {
|
|
|
829
829
|
emits: ["dismiss"],
|
|
830
830
|
setup(t, { emit: n }) {
|
|
831
831
|
let r = t, i = n, o = {
|
|
832
|
-
info:
|
|
833
|
-
success:
|
|
832
|
+
info: oe,
|
|
833
|
+
success: J,
|
|
834
834
|
warning: H,
|
|
835
835
|
danger: V
|
|
836
836
|
}, u = a(() => o[r.variant ?? "info"]);
|
|
@@ -840,39 +840,39 @@ var Pe = ["for"], Fe = {
|
|
|
840
840
|
"aria-live": "polite",
|
|
841
841
|
"aria-atomic": "true"
|
|
842
842
|
}, [
|
|
843
|
-
l("span",
|
|
843
|
+
l("span", Rt, [d(e, {
|
|
844
844
|
icon: u.value,
|
|
845
845
|
size: 18
|
|
846
846
|
}, null, 8, ["icon"])]),
|
|
847
|
-
l("div",
|
|
847
|
+
l("div", zt, [t.title ? (x(), c("p", Bt, k(t.title), 1)) : s("", !0), l("p", Vt, k(t.message), 1)]),
|
|
848
848
|
l("button", {
|
|
849
849
|
type: "button",
|
|
850
850
|
class: "uid-toast__close",
|
|
851
851
|
"aria-label": "Закрыть",
|
|
852
852
|
onClick: r[0] ||= (e) => i("dismiss", t.id)
|
|
853
853
|
}, [d(e, {
|
|
854
|
-
icon: j(
|
|
854
|
+
icon: j(Z),
|
|
855
855
|
size: 14
|
|
856
856
|
}, null, 8, ["icon"])])
|
|
857
857
|
], 2));
|
|
858
858
|
}
|
|
859
|
-
}),
|
|
860
|
-
function
|
|
859
|
+
}), Ut = w([]), Wt = 0;
|
|
860
|
+
function Gt() {
|
|
861
861
|
function e(e) {
|
|
862
862
|
let n = typeof e == "string" ? { message: e } : e, r = {
|
|
863
|
-
id: ++
|
|
863
|
+
id: ++Wt,
|
|
864
864
|
variant: "info",
|
|
865
865
|
duration: 4e3,
|
|
866
866
|
...n
|
|
867
867
|
};
|
|
868
|
-
return
|
|
868
|
+
return Ut.value.push(r), r.duration > 0 && setTimeout(() => t(r.id), r.duration), r.id;
|
|
869
869
|
}
|
|
870
870
|
function t(e) {
|
|
871
|
-
let t =
|
|
872
|
-
t !== -1 &&
|
|
871
|
+
let t = Ut.value.findIndex((t) => t.id === e);
|
|
872
|
+
t !== -1 && Ut.value.splice(t, 1);
|
|
873
873
|
}
|
|
874
874
|
function n() {
|
|
875
|
-
|
|
875
|
+
Ut.value = [];
|
|
876
876
|
}
|
|
877
877
|
function r(t) {
|
|
878
878
|
return e(typeof t == "string" ? {
|
|
@@ -911,7 +911,7 @@ function Rt() {
|
|
|
911
911
|
});
|
|
912
912
|
}
|
|
913
913
|
return {
|
|
914
|
-
toasts: C(
|
|
914
|
+
toasts: C(Ut),
|
|
915
915
|
add: e,
|
|
916
916
|
dismiss: t,
|
|
917
917
|
clear: n,
|
|
@@ -923,33 +923,33 @@ function Rt() {
|
|
|
923
923
|
}
|
|
924
924
|
//#endregion
|
|
925
925
|
//#region src/components/Toast/UidToastProvider.vue
|
|
926
|
-
var
|
|
926
|
+
var Kt = /* @__PURE__ */ f({
|
|
927
927
|
__name: "UidToastProvider",
|
|
928
928
|
setup(e) {
|
|
929
|
-
let { toasts: r, dismiss: a } =
|
|
929
|
+
let { toasts: r, dismiss: a } = Gt();
|
|
930
930
|
return (e, s) => (x(), o(n, { to: "body" }, [d(i, {
|
|
931
931
|
tag: "div",
|
|
932
932
|
name: "uid-toast",
|
|
933
933
|
class: "uid-toast-list"
|
|
934
934
|
}, {
|
|
935
|
-
default: R(() => [(x(!0), c(t, null, T(j(r), (e) => (x(), o(
|
|
935
|
+
default: R(() => [(x(!0), c(t, null, T(j(r), (e) => (x(), o(Ht, h({ key: e.id }, { ref_for: !0 }, e, { onDismiss: j(a) }), null, 16, ["onDismiss"]))), 128))]),
|
|
936
936
|
_: 1
|
|
937
937
|
})]));
|
|
938
938
|
}
|
|
939
|
-
}),
|
|
939
|
+
}), qt = { class: "uid-progress-wrapper" }, Jt = {
|
|
940
940
|
key: 0,
|
|
941
941
|
class: "uid-progress-header"
|
|
942
|
-
},
|
|
942
|
+
}, Yt = {
|
|
943
943
|
key: 0,
|
|
944
944
|
class: "uid-progress-label"
|
|
945
|
-
},
|
|
945
|
+
}, Xt = {
|
|
946
946
|
key: 1,
|
|
947
947
|
class: "uid-progress-value"
|
|
948
|
-
},
|
|
948
|
+
}, Zt = [
|
|
949
949
|
"aria-valuemax",
|
|
950
950
|
"aria-valuenow",
|
|
951
951
|
"aria-label"
|
|
952
|
-
],
|
|
952
|
+
], Qt = /* @__PURE__ */ f({
|
|
953
953
|
__name: "UidProgress",
|
|
954
954
|
props: {
|
|
955
955
|
value: { default: void 0 },
|
|
@@ -966,7 +966,7 @@ var zt = /* @__PURE__ */ f({
|
|
|
966
966
|
let t = e, n = a(() => {
|
|
967
967
|
if (t.value !== void 0) return Math.min(100, Math.max(0, t.value / (t.max ?? 100) * 100));
|
|
968
968
|
}), r = a(() => t.value === void 0), i = a(() => n.value === void 0 ? void 0 : `${Math.round(n.value)}%`);
|
|
969
|
-
return (t, a) => (x(), c("div",
|
|
969
|
+
return (t, a) => (x(), c("div", qt, [e.label || e.showValue && i.value ? (x(), c("div", Jt, [e.label ? (x(), c("span", Yt, k(e.label), 1)) : s("", !0), e.showValue && i.value ? (x(), c("span", Xt, k(i.value), 1)) : s("", !0)])) : s("", !0), l("div", {
|
|
970
970
|
class: _(["uid-progress", [
|
|
971
971
|
`uid-progress--${e.size}`,
|
|
972
972
|
`uid-progress--${e.variant}`,
|
|
@@ -981,9 +981,9 @@ var zt = /* @__PURE__ */ f({
|
|
|
981
981
|
key: 0,
|
|
982
982
|
class: "uid-progress__bar",
|
|
983
983
|
style: v({ width: `${n.value}%` })
|
|
984
|
-
}, null, 4))], 10,
|
|
984
|
+
}, null, 4))], 10, Zt)]));
|
|
985
985
|
}
|
|
986
|
-
}),
|
|
986
|
+
}), $t = [
|
|
987
987
|
"a[href]",
|
|
988
988
|
"button:not([disabled])",
|
|
989
989
|
"input:not([disabled])",
|
|
@@ -991,10 +991,10 @@ var zt = /* @__PURE__ */ f({
|
|
|
991
991
|
"textarea:not([disabled])",
|
|
992
992
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
993
993
|
].join(", ");
|
|
994
|
-
function
|
|
994
|
+
function en(e) {
|
|
995
995
|
let t = w(null);
|
|
996
996
|
function n() {
|
|
997
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
997
|
+
return e.value ? Array.from(e.value.querySelectorAll($t)).filter((e) => !e.closest("[aria-hidden=\"true\"]")) : [];
|
|
998
998
|
}
|
|
999
999
|
function r(e) {
|
|
1000
1000
|
if (e.key !== "Tab") return;
|
|
@@ -1019,17 +1019,17 @@ function qt(e) {
|
|
|
1019
1019
|
}
|
|
1020
1020
|
//#endregion
|
|
1021
1021
|
//#region src/composables/useScrollLock.ts
|
|
1022
|
-
var
|
|
1023
|
-
function
|
|
1022
|
+
var tn = 0;
|
|
1023
|
+
function nn() {
|
|
1024
1024
|
let e = !1;
|
|
1025
1025
|
function t() {
|
|
1026
|
-
if (!e && (e = !0,
|
|
1026
|
+
if (!e && (e = !0, tn++, tn === 1)) {
|
|
1027
1027
|
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
1028
1028
|
document.body.style.overflow = "hidden", e > 0 && (document.body.style.paddingRight = `${e}px`);
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
function n() {
|
|
1032
|
-
e && (e = !1,
|
|
1032
|
+
e && (e = !1, tn--, tn === 0 && (document.body.style.overflow = "", document.body.style.paddingRight = ""));
|
|
1033
1033
|
}
|
|
1034
1034
|
return {
|
|
1035
1035
|
lock: t,
|
|
@@ -1038,10 +1038,10 @@ function Yt() {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
//#endregion
|
|
1040
1040
|
//#region src/components/Modal/UidModal.vue?vue&type=script&setup=true&lang.ts
|
|
1041
|
-
var
|
|
1041
|
+
var rn = ["aria-labelledby"], an = { class: "uid-modal__header" }, on = ["id"], sn = { class: "uid-modal__body" }, cn = {
|
|
1042
1042
|
key: 0,
|
|
1043
1043
|
class: "uid-modal__footer"
|
|
1044
|
-
},
|
|
1044
|
+
}, ln = /* @__PURE__ */ f({
|
|
1045
1045
|
__name: "UidModal",
|
|
1046
1046
|
props: /* @__PURE__ */ m({
|
|
1047
1047
|
title: { default: void 0 },
|
|
@@ -1063,7 +1063,7 @@ var Xt = ["aria-labelledby"], Zt = { class: "uid-modal__header" }, Qt = ["id"],
|
|
|
1063
1063
|
}),
|
|
1064
1064
|
emits: /* @__PURE__ */ m(["close"], ["update:modelValue"]),
|
|
1065
1065
|
setup(t, { emit: i }) {
|
|
1066
|
-
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: v } =
|
|
1066
|
+
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: v } = en(m), { lock: y, unlock: b } = nn();
|
|
1067
1067
|
function S() {
|
|
1068
1068
|
a.value = !1, f("close");
|
|
1069
1069
|
}
|
|
@@ -1090,30 +1090,30 @@ var Xt = ["aria-labelledby"], Zt = { class: "uid-modal__header" }, Qt = ["id"],
|
|
|
1090
1090
|
"aria-labelledby": t.title ? j(p) : void 0,
|
|
1091
1091
|
tabindex: "-1"
|
|
1092
1092
|
}, [
|
|
1093
|
-
l("div",
|
|
1093
|
+
l("div", an, [E(i.$slots, "header", {}, () => [t.title ? (x(), c("p", {
|
|
1094
1094
|
key: 0,
|
|
1095
1095
|
id: j(p),
|
|
1096
1096
|
class: "uid-modal__title"
|
|
1097
|
-
}, k(t.title), 9,
|
|
1097
|
+
}, k(t.title), 9, on)) : s("", !0)]), t.hideClose ? s("", !0) : (x(), c("button", {
|
|
1098
1098
|
key: 0,
|
|
1099
1099
|
type: "button",
|
|
1100
1100
|
class: "uid-modal__close",
|
|
1101
1101
|
"aria-label": "Закрыть",
|
|
1102
1102
|
onClick: S
|
|
1103
1103
|
}, [d(e, {
|
|
1104
|
-
icon: j(
|
|
1104
|
+
icon: j(Z),
|
|
1105
1105
|
size: 18
|
|
1106
1106
|
}, null, 8, ["icon"])]))]),
|
|
1107
|
-
l("div",
|
|
1108
|
-
i.$slots.footer ? (x(), c("div",
|
|
1109
|
-
], 10,
|
|
1107
|
+
l("div", sn, [E(i.$slots, "default")]),
|
|
1108
|
+
i.$slots.footer ? (x(), c("div", cn, [E(i.$slots, "footer")])) : s("", !0)
|
|
1109
|
+
], 10, rn)])) : s("", !0)]),
|
|
1110
1110
|
_: 3
|
|
1111
1111
|
})]));
|
|
1112
1112
|
}
|
|
1113
|
-
}),
|
|
1113
|
+
}), un = ["aria-labelledby"], dn = { class: "uid-drawer__header" }, fn = ["id"], pn = { class: "uid-drawer__body" }, mn = {
|
|
1114
1114
|
key: 0,
|
|
1115
1115
|
class: "uid-drawer__footer"
|
|
1116
|
-
},
|
|
1116
|
+
}, hn = /* @__PURE__ */ f({
|
|
1117
1117
|
__name: "UidDrawer",
|
|
1118
1118
|
props: /* @__PURE__ */ m({
|
|
1119
1119
|
title: { default: void 0 },
|
|
@@ -1137,7 +1137,7 @@ var Xt = ["aria-labelledby"], Zt = { class: "uid-modal__header" }, Qt = ["id"],
|
|
|
1137
1137
|
}),
|
|
1138
1138
|
emits: /* @__PURE__ */ m(["close"], ["update:modelValue"]),
|
|
1139
1139
|
setup(t, { emit: i }) {
|
|
1140
|
-
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: y } =
|
|
1140
|
+
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: y } = en(m), { lock: b, unlock: S } = nn();
|
|
1141
1141
|
function C() {
|
|
1142
1142
|
a.value = !1, f("close");
|
|
1143
1143
|
}
|
|
@@ -1167,28 +1167,28 @@ var Xt = ["aria-labelledby"], Zt = { class: "uid-modal__header" }, Qt = ["id"],
|
|
|
1167
1167
|
"aria-labelledby": t.title ? j(p) : void 0,
|
|
1168
1168
|
tabindex: "-1"
|
|
1169
1169
|
}, [
|
|
1170
|
-
l("div",
|
|
1170
|
+
l("div", dn, [E(i.$slots, "header", {}, () => [t.title ? (x(), c("p", {
|
|
1171
1171
|
key: 0,
|
|
1172
1172
|
id: j(p),
|
|
1173
1173
|
class: "uid-drawer__title"
|
|
1174
|
-
}, k(t.title), 9,
|
|
1174
|
+
}, k(t.title), 9, fn)) : s("", !0)]), t.hideClose ? s("", !0) : (x(), c("button", {
|
|
1175
1175
|
key: 0,
|
|
1176
1176
|
type: "button",
|
|
1177
1177
|
class: "uid-drawer__close",
|
|
1178
1178
|
"aria-label": "Закрыть",
|
|
1179
1179
|
onClick: C
|
|
1180
1180
|
}, [d(e, {
|
|
1181
|
-
icon: j(
|
|
1181
|
+
icon: j(Z),
|
|
1182
1182
|
size: 18
|
|
1183
1183
|
}, null, 8, ["icon"])]))]),
|
|
1184
|
-
l("div",
|
|
1185
|
-
i.$slots.footer ? (x(), c("div",
|
|
1186
|
-
], 14,
|
|
1184
|
+
l("div", pn, [E(i.$slots, "default")]),
|
|
1185
|
+
i.$slots.footer ? (x(), c("div", mn, [E(i.$slots, "footer")])) : s("", !0)
|
|
1186
|
+
], 14, un)])) : s("", !0)]),
|
|
1187
1187
|
_: 3
|
|
1188
1188
|
}, 8, ["name"])]));
|
|
1189
1189
|
}
|
|
1190
|
-
}),
|
|
1191
|
-
function
|
|
1190
|
+
}), gn = 8, _n = 8;
|
|
1191
|
+
function vn(e, t, n = {}) {
|
|
1192
1192
|
let r = w(0), i = w(0), o = w(A(n.placement) ?? "bottom"), s = a(() => ({
|
|
1193
1193
|
position: "fixed",
|
|
1194
1194
|
left: `${r.value}px`,
|
|
@@ -1197,7 +1197,7 @@ function dn(e, t, n = {}) {
|
|
|
1197
1197
|
function c() {
|
|
1198
1198
|
let a = e.value, s = t.value;
|
|
1199
1199
|
if (!a || !s) return;
|
|
1200
|
-
let c = a.getBoundingClientRect(), l = s.getBoundingClientRect(), u = n.offset ??
|
|
1200
|
+
let c = a.getBoundingClientRect(), l = s.getBoundingClientRect(), u = n.offset ?? gn, d = window.innerWidth, f = window.innerHeight, p = A(n.placement) ?? "bottom";
|
|
1201
1201
|
if (p.startsWith("bottom")) {
|
|
1202
1202
|
let e = f - c.bottom, t = c.top;
|
|
1203
1203
|
e < l.height + u && t > e && (p = p.replace("bottom", "top"));
|
|
@@ -1207,7 +1207,7 @@ function dn(e, t, n = {}) {
|
|
|
1207
1207
|
}
|
|
1208
1208
|
o.value = p;
|
|
1209
1209
|
let m = 0, h = 0;
|
|
1210
|
-
p.startsWith("bottom") ? (h = c.bottom + u, m = p === "bottom" ? c.left + c.width / 2 - l.width / 2 : p === "bottom-start" ? c.left : c.right - l.width) : p.startsWith("top") ? (h = c.top - l.height - u, m = p === "top" ? c.left + c.width / 2 - l.width / 2 : p === "top-start" ? c.left : c.right - l.width) : p === "left" ? (m = c.left - l.width - u, h = c.top + c.height / 2 - l.height / 2) : (m = c.right + u, h = c.top + c.height / 2 - l.height / 2), r.value = Math.max(
|
|
1210
|
+
p.startsWith("bottom") ? (h = c.bottom + u, m = p === "bottom" ? c.left + c.width / 2 - l.width / 2 : p === "bottom-start" ? c.left : c.right - l.width) : p.startsWith("top") ? (h = c.top - l.height - u, m = p === "top" ? c.left + c.width / 2 - l.width / 2 : p === "top-start" ? c.left : c.right - l.width) : p === "left" ? (m = c.left - l.width - u, h = c.top + c.height / 2 - l.height / 2) : (m = c.right + u, h = c.top + c.height / 2 - l.height / 2), r.value = Math.max(_n, Math.min(m, d - l.width - _n)), i.value = Math.max(_n, Math.min(h, f - l.height - _n));
|
|
1211
1211
|
}
|
|
1212
1212
|
return {
|
|
1213
1213
|
x: r,
|
|
@@ -1219,7 +1219,7 @@ function dn(e, t, n = {}) {
|
|
|
1219
1219
|
}
|
|
1220
1220
|
//#endregion
|
|
1221
1221
|
//#region src/components/Tooltip/UidTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
1222
|
-
var
|
|
1222
|
+
var yn = ["aria-describedby"], bn = ["id"], xn = /* @__PURE__ */ f({
|
|
1223
1223
|
__name: "UidTooltip",
|
|
1224
1224
|
props: {
|
|
1225
1225
|
content: {},
|
|
@@ -1230,7 +1230,7 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1230
1230
|
}
|
|
1231
1231
|
},
|
|
1232
1232
|
setup(e) {
|
|
1233
|
-
let i = e, u = M(), f = w(null), p = w(null), m = w(!1), { floatingStyle: h, update: _ } =
|
|
1233
|
+
let i = e, u = M(), f = w(null), p = w(null), m = w(!1), { floatingStyle: h, update: _ } = vn(f, p, { placement: a(() => i.placement) });
|
|
1234
1234
|
async function y() {
|
|
1235
1235
|
i.disabled || (m.value = !0, await g(), _());
|
|
1236
1236
|
}
|
|
@@ -1246,7 +1246,7 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1246
1246
|
onMouseleave: b,
|
|
1247
1247
|
onFocusin: y,
|
|
1248
1248
|
onFocusout: b
|
|
1249
|
-
}, [E(i.$slots, "default")], 40,
|
|
1249
|
+
}, [E(i.$slots, "default")], 40, yn), (x(), o(n, { to: "body" }, [d(r, { name: "uid-tooltip" }, {
|
|
1250
1250
|
default: R(() => [m.value ? (x(), c("div", {
|
|
1251
1251
|
key: 0,
|
|
1252
1252
|
id: j(u),
|
|
@@ -1255,15 +1255,15 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1255
1255
|
class: "uid-tooltip",
|
|
1256
1256
|
role: "tooltip",
|
|
1257
1257
|
style: v(j(h))
|
|
1258
|
-
}, k(e.content), 13,
|
|
1258
|
+
}, k(e.content), 13, bn)) : s("", !0)]),
|
|
1259
1259
|
_: 1
|
|
1260
1260
|
})]))], 64));
|
|
1261
1261
|
}
|
|
1262
|
-
}),
|
|
1262
|
+
}), Sn = /* @__PURE__ */ f({
|
|
1263
1263
|
__name: "UidPopover",
|
|
1264
1264
|
props: { placement: { default: "bottom" } },
|
|
1265
1265
|
setup(e) {
|
|
1266
|
-
let i = e, u = w(null), f = w(null), p = w(!1), { floatingStyle: m, update: h } =
|
|
1266
|
+
let i = e, u = w(null), f = w(null), p = w(!1), { floatingStyle: m, update: h } = vn(u, f, { placement: a(() => i.placement) });
|
|
1267
1267
|
async function _() {
|
|
1268
1268
|
p.value = !p.value, p.value && (await g(), h());
|
|
1269
1269
|
}
|
|
@@ -1297,17 +1297,17 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1297
1297
|
_: 3
|
|
1298
1298
|
})]))], 64));
|
|
1299
1299
|
}
|
|
1300
|
-
}),
|
|
1300
|
+
}), Cn = Symbol("uid-menu-close"), wn = /* @__PURE__ */ f({
|
|
1301
1301
|
__name: "UidMenu",
|
|
1302
1302
|
setup(e) {
|
|
1303
|
-
let i = w(null), a = w(null), u = w(!1), { floatingStyle: f, update: p } =
|
|
1303
|
+
let i = w(null), a = w(null), u = w(!1), { floatingStyle: f, update: p } = vn(i, a, { placement: "bottom-start" });
|
|
1304
1304
|
function m() {
|
|
1305
1305
|
return Array.from(a.value?.querySelectorAll("[role=\"menuitem\"]:not([disabled])") ?? []);
|
|
1306
1306
|
}
|
|
1307
1307
|
function h() {
|
|
1308
1308
|
u.value = !1, i.value?.querySelector("button, [tabindex]")?.focus();
|
|
1309
1309
|
}
|
|
1310
|
-
S(
|
|
1310
|
+
S(Cn, h);
|
|
1311
1311
|
async function _() {
|
|
1312
1312
|
u.value = !u.value, u.value && (await g(), p(), m()[0]?.focus());
|
|
1313
1313
|
}
|
|
@@ -1345,7 +1345,7 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1345
1345
|
_: 3
|
|
1346
1346
|
})]))], 64));
|
|
1347
1347
|
}
|
|
1348
|
-
}),
|
|
1348
|
+
}), Tn = ["disabled"], En = /* @__PURE__ */ f({
|
|
1349
1349
|
__name: "UidMenuItem",
|
|
1350
1350
|
props: {
|
|
1351
1351
|
icon: { default: void 0 },
|
|
@@ -1357,7 +1357,7 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1357
1357
|
},
|
|
1358
1358
|
emits: ["click"],
|
|
1359
1359
|
setup(e, { emit: t }) {
|
|
1360
|
-
let n = e, r = t, i = p(
|
|
1360
|
+
let n = e, r = t, i = p(Cn, () => {});
|
|
1361
1361
|
function a(e) {
|
|
1362
1362
|
n.disabled || (r("click", e), i());
|
|
1363
1363
|
}
|
|
@@ -1367,21 +1367,21 @@ var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
|
1367
1367
|
role: "menuitem",
|
|
1368
1368
|
disabled: e.disabled,
|
|
1369
1369
|
onClick: a
|
|
1370
|
-
}, [E(t.$slots, "default")], 10,
|
|
1370
|
+
}, [E(t.$slots, "default")], 10, Tn));
|
|
1371
1371
|
}
|
|
1372
|
-
}),
|
|
1372
|
+
}), Dn = (e, t) => {
|
|
1373
1373
|
let n = e.__vccOpts || e;
|
|
1374
1374
|
for (let [e, r] of t) n[e] = r;
|
|
1375
1375
|
return n;
|
|
1376
|
-
},
|
|
1376
|
+
}, On = {}, kn = {
|
|
1377
1377
|
class: "uid-menu-separator",
|
|
1378
1378
|
role: "separator",
|
|
1379
1379
|
"aria-hidden": "true"
|
|
1380
1380
|
};
|
|
1381
|
-
function
|
|
1382
|
-
return x(), c("div",
|
|
1381
|
+
function An(e, t) {
|
|
1382
|
+
return x(), c("div", kn);
|
|
1383
1383
|
}
|
|
1384
|
-
var
|
|
1384
|
+
var jn = /* @__PURE__ */ Dn(On, [["render", An]]), Mn = Symbol("uid-tabs"), Nn = ["aria-orientation"], Pn = { class: "uid-tabs__panels" }, Fn = /* @__PURE__ */ f({
|
|
1385
1385
|
__name: "UidTabs",
|
|
1386
1386
|
props: /* @__PURE__ */ m({ orientation: { default: "horizontal" } }, {
|
|
1387
1387
|
modelValue: { required: !0 },
|
|
@@ -1390,7 +1390,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1390
1390
|
emits: ["update:modelValue"],
|
|
1391
1391
|
setup(e) {
|
|
1392
1392
|
let t = N(e, "modelValue");
|
|
1393
|
-
return S(
|
|
1393
|
+
return S(Mn, {
|
|
1394
1394
|
activeTab: t,
|
|
1395
1395
|
setTab: (e) => {
|
|
1396
1396
|
t.value = e;
|
|
@@ -1400,15 +1400,15 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1400
1400
|
class: "uid-tabs__list",
|
|
1401
1401
|
role: "tablist",
|
|
1402
1402
|
"aria-orientation": e.orientation
|
|
1403
|
-
}, [E(t.$slots, "list")], 8,
|
|
1403
|
+
}, [E(t.$slots, "list")], 8, Nn), l("div", Pn, [E(t.$slots, "default")])], 2));
|
|
1404
1404
|
}
|
|
1405
|
-
}),
|
|
1405
|
+
}), In = [
|
|
1406
1406
|
"id",
|
|
1407
1407
|
"aria-selected",
|
|
1408
1408
|
"aria-controls",
|
|
1409
1409
|
"disabled",
|
|
1410
1410
|
"tabindex"
|
|
1411
|
-
],
|
|
1411
|
+
], Ln = /* @__PURE__ */ f({
|
|
1412
1412
|
__name: "UidTab",
|
|
1413
1413
|
props: {
|
|
1414
1414
|
value: {},
|
|
@@ -1418,7 +1418,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1418
1418
|
}
|
|
1419
1419
|
},
|
|
1420
1420
|
setup(e) {
|
|
1421
|
-
let t = e, n = p(
|
|
1421
|
+
let t = e, n = p(Mn), r = a(() => n.activeTab.value === t.value), i = a(() => `${n.idPrefix}-tab-${t.value}`), o = a(() => `${n.idPrefix}-panel-${t.value}`);
|
|
1422
1422
|
function s() {
|
|
1423
1423
|
t.disabled || n.setTab(t.value);
|
|
1424
1424
|
}
|
|
@@ -1447,13 +1447,13 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1447
1447
|
tabindex: r.value ? 0 : -1,
|
|
1448
1448
|
onClick: s,
|
|
1449
1449
|
onKeydown: l
|
|
1450
|
-
}, [E(t.$slots, "default")], 42,
|
|
1450
|
+
}, [E(t.$slots, "default")], 42, In));
|
|
1451
1451
|
}
|
|
1452
|
-
}),
|
|
1452
|
+
}), Rn = ["id", "aria-labelledby"], zn = /* @__PURE__ */ f({
|
|
1453
1453
|
__name: "UidTabPanel",
|
|
1454
1454
|
props: { value: {} },
|
|
1455
1455
|
setup(e) {
|
|
1456
|
-
let t = e, n = p(
|
|
1456
|
+
let t = e, n = p(Mn), r = a(() => n.activeTab.value === t.value), i = a(() => `${n.idPrefix}-panel-${t.value}`), o = a(() => `${n.idPrefix}-tab-${t.value}`);
|
|
1457
1457
|
return (e, t) => r.value ? (x(), c("div", {
|
|
1458
1458
|
key: 0,
|
|
1459
1459
|
id: i.value,
|
|
@@ -1461,9 +1461,9 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1461
1461
|
role: "tabpanel",
|
|
1462
1462
|
"aria-labelledby": o.value,
|
|
1463
1463
|
tabindex: "0"
|
|
1464
|
-
}, [E(e.$slots, "default")], 8,
|
|
1464
|
+
}, [E(e.$slots, "default")], 8, Rn)) : s("", !0);
|
|
1465
1465
|
}
|
|
1466
|
-
}),
|
|
1466
|
+
}), Bn = ["aria-label"], Vn = /* @__PURE__ */ f({
|
|
1467
1467
|
__name: "UidBreadcrumb",
|
|
1468
1468
|
props: {
|
|
1469
1469
|
label: { default: "Навигация" },
|
|
@@ -1476,9 +1476,9 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1476
1476
|
}, [l("ol", {
|
|
1477
1477
|
class: "uid-breadcrumb__list",
|
|
1478
1478
|
style: v({ "--uid-breadcrumb-sep": `'${e.separator}'` })
|
|
1479
|
-
}, [E(t.$slots, "default")], 4)], 8,
|
|
1479
|
+
}, [E(t.$slots, "default")], 4)], 8, Bn));
|
|
1480
1480
|
}
|
|
1481
|
-
}),
|
|
1481
|
+
}), Hn = { class: "uid-breadcrumb__item" }, Un = ["href"], Wn = ["aria-current"], Gn = /* @__PURE__ */ f({
|
|
1482
1482
|
__name: "UidBreadcrumbItem",
|
|
1483
1483
|
props: {
|
|
1484
1484
|
href: { default: void 0 },
|
|
@@ -1488,17 +1488,17 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1488
1488
|
}
|
|
1489
1489
|
},
|
|
1490
1490
|
setup(e) {
|
|
1491
|
-
return (t, n) => (x(), c("li",
|
|
1491
|
+
return (t, n) => (x(), c("li", Hn, [e.href && !e.current ? (x(), c("a", {
|
|
1492
1492
|
key: 0,
|
|
1493
1493
|
class: "uid-breadcrumb__link",
|
|
1494
1494
|
href: e.href
|
|
1495
|
-
}, [E(t.$slots, "default")], 8,
|
|
1495
|
+
}, [E(t.$slots, "default")], 8, Un)) : (x(), c("span", {
|
|
1496
1496
|
key: 1,
|
|
1497
1497
|
class: "uid-breadcrumb__current",
|
|
1498
1498
|
"aria-current": e.current ? "page" : void 0
|
|
1499
|
-
}, [E(t.$slots, "default")], 8,
|
|
1499
|
+
}, [E(t.$slots, "default")], 8, Wn))]));
|
|
1500
1500
|
}
|
|
1501
|
-
}),
|
|
1501
|
+
}), Kn = /* @__PURE__ */ f({
|
|
1502
1502
|
__name: "UidLink",
|
|
1503
1503
|
props: {
|
|
1504
1504
|
href: { default: void 0 },
|
|
@@ -1539,18 +1539,18 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1539
1539
|
"tabindex"
|
|
1540
1540
|
]));
|
|
1541
1541
|
}
|
|
1542
|
-
}),
|
|
1542
|
+
}), qn = {
|
|
1543
1543
|
class: "uid-pagination",
|
|
1544
1544
|
"aria-label": "Пагинация"
|
|
1545
|
-
},
|
|
1545
|
+
}, Jn = ["disabled"], Yn = {
|
|
1546
1546
|
key: 0,
|
|
1547
1547
|
class: "uid-pagination__ellipsis",
|
|
1548
1548
|
"aria-hidden": "true"
|
|
1549
|
-
},
|
|
1549
|
+
}, Xn = [
|
|
1550
1550
|
"aria-label",
|
|
1551
1551
|
"aria-current",
|
|
1552
1552
|
"onClick"
|
|
1553
|
-
],
|
|
1553
|
+
], Zn = ["disabled"], Qn = /* @__PURE__ */ f({
|
|
1554
1554
|
__name: "UidPagination",
|
|
1555
1555
|
props: /* @__PURE__ */ m({
|
|
1556
1556
|
total: {},
|
|
@@ -1579,7 +1579,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1579
1579
|
function f(e) {
|
|
1580
1580
|
e < 1 || e > o.value || e === r.value || (r.value = e);
|
|
1581
1581
|
}
|
|
1582
|
-
return (n, i) => (x(), c("nav",
|
|
1582
|
+
return (n, i) => (x(), c("nav", qn, [
|
|
1583
1583
|
l("button", {
|
|
1584
1584
|
type: "button",
|
|
1585
1585
|
class: "uid-pagination__btn uid-pagination__btn--nav",
|
|
@@ -1587,17 +1587,17 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1587
1587
|
"aria-label": "Предыдущая страница",
|
|
1588
1588
|
onClick: i[0] ||= (e) => f(r.value - 1)
|
|
1589
1589
|
}, [d(e, {
|
|
1590
|
-
icon: j(
|
|
1590
|
+
icon: j(Y),
|
|
1591
1591
|
size: 16
|
|
1592
|
-
}, null, 8, ["icon"])], 8,
|
|
1593
|
-
(x(!0), c(t, null, T(u.value, (e, n) => (x(), c(t, { key: `${n}-${e}` }, [e === "..." ? (x(), c("span",
|
|
1592
|
+
}, null, 8, ["icon"])], 8, Jn),
|
|
1593
|
+
(x(!0), c(t, null, T(u.value, (e, n) => (x(), c(t, { key: `${n}-${e}` }, [e === "..." ? (x(), c("span", Yn, " … ")) : (x(), c("button", {
|
|
1594
1594
|
key: 1,
|
|
1595
1595
|
type: "button",
|
|
1596
1596
|
class: _(["uid-pagination__btn", { "uid-pagination__btn--active": e === r.value }]),
|
|
1597
1597
|
"aria-label": `Страница ${e}`,
|
|
1598
1598
|
"aria-current": e === r.value ? "page" : void 0,
|
|
1599
1599
|
onClick: (t) => f(e)
|
|
1600
|
-
}, k(e), 11,
|
|
1600
|
+
}, k(e), 11, Xn))], 64))), 128)),
|
|
1601
1601
|
l("button", {
|
|
1602
1602
|
type: "button",
|
|
1603
1603
|
class: "uid-pagination__btn uid-pagination__btn--nav",
|
|
@@ -1605,15 +1605,15 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1605
1605
|
"aria-label": "Следующая страница",
|
|
1606
1606
|
onClick: i[1] ||= (e) => f(r.value + 1)
|
|
1607
1607
|
}, [d(e, {
|
|
1608
|
-
icon: j(
|
|
1608
|
+
icon: j(X),
|
|
1609
1609
|
size: 16
|
|
1610
|
-
}, null, 8, ["icon"])], 8,
|
|
1610
|
+
}, null, 8, ["icon"])], 8, Zn)
|
|
1611
1611
|
]));
|
|
1612
1612
|
}
|
|
1613
|
-
}),
|
|
1613
|
+
}), $n = {
|
|
1614
1614
|
class: "uid-pagination uid-pagination--cursor",
|
|
1615
1615
|
"aria-label": "Навигация по страницам"
|
|
1616
|
-
},
|
|
1616
|
+
}, er = ["disabled", "aria-label"], tr = ["disabled", "aria-label"], nr = /* @__PURE__ */ f({
|
|
1617
1617
|
__name: "UidPaginationCursor",
|
|
1618
1618
|
props: {
|
|
1619
1619
|
hasPrev: {
|
|
@@ -1630,27 +1630,27 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1630
1630
|
emits: ["prev", "next"],
|
|
1631
1631
|
setup(t, { emit: n }) {
|
|
1632
1632
|
let r = n;
|
|
1633
|
-
return (n, i) => (x(), c("nav",
|
|
1633
|
+
return (n, i) => (x(), c("nav", $n, [l("button", {
|
|
1634
1634
|
type: "button",
|
|
1635
1635
|
class: "uid-pagination__btn uid-pagination__btn--nav uid-pagination__btn--labeled",
|
|
1636
1636
|
disabled: !t.hasPrev,
|
|
1637
1637
|
"aria-label": t.prevLabel,
|
|
1638
1638
|
onClick: i[0] ||= (e) => r("prev")
|
|
1639
1639
|
}, [d(e, {
|
|
1640
|
-
icon: j(
|
|
1640
|
+
icon: j(Y),
|
|
1641
1641
|
size: 16
|
|
1642
|
-
}, null, 8, ["icon"]), u(" " + k(t.prevLabel), 1)], 8,
|
|
1642
|
+
}, null, 8, ["icon"]), u(" " + k(t.prevLabel), 1)], 8, er), l("button", {
|
|
1643
1643
|
type: "button",
|
|
1644
1644
|
class: "uid-pagination__btn uid-pagination__btn--nav uid-pagination__btn--labeled",
|
|
1645
1645
|
disabled: !t.hasNext,
|
|
1646
1646
|
"aria-label": t.nextLabel,
|
|
1647
1647
|
onClick: i[1] ||= (e) => r("next")
|
|
1648
1648
|
}, [u(k(t.nextLabel) + " ", 1), d(e, {
|
|
1649
|
-
icon: j(
|
|
1649
|
+
icon: j(X),
|
|
1650
1650
|
size: 16
|
|
1651
|
-
}, null, 8, ["icon"])], 8,
|
|
1651
|
+
}, null, 8, ["icon"])], 8, tr)]));
|
|
1652
1652
|
}
|
|
1653
|
-
}),
|
|
1653
|
+
}), rr = { class: "uid-load-more" }, ir = ["disabled"], ar = /* @__PURE__ */ f({
|
|
1654
1654
|
__name: "UidLoadMore",
|
|
1655
1655
|
props: {
|
|
1656
1656
|
loading: {
|
|
@@ -1666,20 +1666,20 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1666
1666
|
emits: ["load"],
|
|
1667
1667
|
setup(e, { emit: t }) {
|
|
1668
1668
|
let n = t;
|
|
1669
|
-
return (t, r) => (x(), c("div",
|
|
1669
|
+
return (t, r) => (x(), c("div", rr, [l("button", {
|
|
1670
1670
|
type: "button",
|
|
1671
1671
|
class: "uid-load-more__btn",
|
|
1672
1672
|
disabled: e.disabled || e.loading,
|
|
1673
1673
|
onClick: r[0] ||= (e) => n("load")
|
|
1674
|
-
}, [e.loading ? (x(), o(
|
|
1674
|
+
}, [e.loading ? (x(), o(kt, {
|
|
1675
1675
|
key: 0,
|
|
1676
1676
|
size: "sm"
|
|
1677
|
-
})) : s("", !0), l("span", null, k(e.label), 1)], 8,
|
|
1677
|
+
})) : s("", !0), l("span", null, k(e.label), 1)], 8, ir)]));
|
|
1678
1678
|
}
|
|
1679
|
-
}),
|
|
1679
|
+
}), or = { class: "uid-infinite-scroll" }, sr = {
|
|
1680
1680
|
key: 0,
|
|
1681
1681
|
class: "uid-infinite-scroll__loader"
|
|
1682
|
-
},
|
|
1682
|
+
}, cr = /* @__PURE__ */ f({
|
|
1683
1683
|
__name: "UidInfiniteScroll",
|
|
1684
1684
|
props: {
|
|
1685
1685
|
loading: {
|
|
@@ -1707,14 +1707,14 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1707
1707
|
e && u();
|
|
1708
1708
|
}, { immediate: !0 }), L(() => n.disabled, (e) => {
|
|
1709
1709
|
e ? o() : u();
|
|
1710
|
-
}), b(o), (t, n) => (x(), c("div",
|
|
1710
|
+
}), b(o), (t, n) => (x(), c("div", or, [e.loading ? (x(), c("div", sr, [d(kt, { size: "sm" })])) : s("", !0), l("div", {
|
|
1711
1711
|
ref_key: "sentinelRef",
|
|
1712
1712
|
ref: i,
|
|
1713
1713
|
class: "uid-infinite-scroll__sentinel",
|
|
1714
1714
|
"aria-hidden": "true"
|
|
1715
1715
|
}, null, 512)]));
|
|
1716
1716
|
}
|
|
1717
|
-
}),
|
|
1717
|
+
}), lr = { class: "uid-page-size" }, ur = { class: "uid-page-size__label" }, dr = ["value"], fr = ["value"], pr = /* @__PURE__ */ f({
|
|
1718
1718
|
__name: "UidPageSize",
|
|
1719
1719
|
props: /* @__PURE__ */ m({
|
|
1720
1720
|
options: { default: () => [
|
|
@@ -1731,25 +1731,25 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1731
1731
|
emits: ["update:modelValue"],
|
|
1732
1732
|
setup(e) {
|
|
1733
1733
|
let n = N(e, "modelValue");
|
|
1734
|
-
return (r, i) => (x(), c("div",
|
|
1734
|
+
return (r, i) => (x(), c("div", lr, [l("span", ur, k(e.label), 1), l("select", {
|
|
1735
1735
|
class: "uid-page-size__select",
|
|
1736
1736
|
value: n.value,
|
|
1737
1737
|
onChange: i[0] ||= (e) => n.value = Number(e.target.value)
|
|
1738
1738
|
}, [(x(!0), c(t, null, T(e.options, (e) => (x(), c("option", {
|
|
1739
1739
|
key: e,
|
|
1740
1740
|
value: e
|
|
1741
|
-
}, k(e), 9,
|
|
1741
|
+
}, k(e), 9, fr))), 128))], 40, dr)]));
|
|
1742
1742
|
}
|
|
1743
|
-
}),
|
|
1743
|
+
}), mr = {
|
|
1744
1744
|
key: 0,
|
|
1745
1745
|
class: "uid-card__media"
|
|
1746
|
-
},
|
|
1746
|
+
}, hr = {
|
|
1747
1747
|
key: 1,
|
|
1748
1748
|
class: "uid-card__header"
|
|
1749
|
-
},
|
|
1749
|
+
}, gr = { class: "uid-card__body" }, _r = {
|
|
1750
1750
|
key: 2,
|
|
1751
1751
|
class: "uid-card__footer"
|
|
1752
|
-
},
|
|
1752
|
+
}, vr = /* @__PURE__ */ f({
|
|
1753
1753
|
__name: "UidCard",
|
|
1754
1754
|
props: {
|
|
1755
1755
|
padding: { default: "md" },
|
|
@@ -1760,13 +1760,13 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1760
1760
|
},
|
|
1761
1761
|
setup(e) {
|
|
1762
1762
|
return (t, n) => (x(), c("div", { class: _(["uid-card", [`uid-card--pad-${e.padding}`, { "uid-card--clickable": e.clickable }]]) }, [
|
|
1763
|
-
t.$slots.media ? (x(), c("div",
|
|
1764
|
-
t.$slots.header ? (x(), c("div",
|
|
1765
|
-
l("div",
|
|
1766
|
-
t.$slots.footer ? (x(), c("div",
|
|
1763
|
+
t.$slots.media ? (x(), c("div", mr, [E(t.$slots, "media")])) : s("", !0),
|
|
1764
|
+
t.$slots.header ? (x(), c("div", hr, [E(t.$slots, "header")])) : s("", !0),
|
|
1765
|
+
l("div", gr, [E(t.$slots, "default")]),
|
|
1766
|
+
t.$slots.footer ? (x(), c("div", _r, [E(t.$slots, "footer")])) : s("", !0)
|
|
1767
1767
|
], 2));
|
|
1768
1768
|
}
|
|
1769
|
-
}),
|
|
1769
|
+
}), yr = ["title", "aria-label"], br = ["src", "alt"], xr = /* @__PURE__ */ f({
|
|
1770
1770
|
__name: "UidAvatar",
|
|
1771
1771
|
props: {
|
|
1772
1772
|
src: { default: void 0 },
|
|
@@ -1804,26 +1804,26 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1804
1804
|
alt: e.alt ?? e.name,
|
|
1805
1805
|
class: "uid-avatar__img",
|
|
1806
1806
|
onError: l
|
|
1807
|
-
}, null, 40,
|
|
1807
|
+
}, null, 40, br)) : (x(), c("span", {
|
|
1808
1808
|
key: 1,
|
|
1809
1809
|
class: "uid-avatar__initials",
|
|
1810
1810
|
style: v({ background: s.value }),
|
|
1811
1811
|
"aria-hidden": "true"
|
|
1812
|
-
}, k(r.value), 5))], 10,
|
|
1812
|
+
}, k(r.value), 5))], 10, yr));
|
|
1813
1813
|
}
|
|
1814
|
-
}),
|
|
1814
|
+
}), Sr = { class: "uid-avatar-group" }, Cr = ["aria-label"], wr = /* @__PURE__ */ f({
|
|
1815
1815
|
__name: "UidAvatarGroup",
|
|
1816
1816
|
props: { max: { default: void 0 } },
|
|
1817
1817
|
setup(e) {
|
|
1818
1818
|
let n = e, r = P(), i = a(() => r.default?.()?.flatMap((e) => e.type === Symbol.for("v-fgt") ? e.children : [e]) ?? []), l = a(() => n.max === void 0 ? i.value : i.value.slice(0, n.max)), u = a(() => n.max === void 0 ? 0 : Math.max(0, i.value.length - n.max));
|
|
1819
|
-
return (e, n) => (x(), c("div",
|
|
1819
|
+
return (e, n) => (x(), c("div", Sr, [(x(!0), c(t, null, T(l.value, (e, t) => (x(), o(O(e), { key: t }))), 128)), u.value > 0 ? (x(), c("span", {
|
|
1820
1820
|
key: 0,
|
|
1821
1821
|
class: "uid-avatar uid-avatar--md uid-avatar--circle uid-avatar-group__overflow",
|
|
1822
1822
|
"aria-label": `Ещё ${u.value}`,
|
|
1823
1823
|
role: "img"
|
|
1824
|
-
}, " +" + k(u.value), 9,
|
|
1824
|
+
}, " +" + k(u.value), 9, Cr)) : s("", !0)]));
|
|
1825
1825
|
}
|
|
1826
|
-
}),
|
|
1826
|
+
}), Tr = /* @__PURE__ */ f({
|
|
1827
1827
|
__name: "UidTag",
|
|
1828
1828
|
props: {
|
|
1829
1829
|
variant: { default: "default" },
|
|
@@ -1843,14 +1843,14 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1843
1843
|
"aria-label": "Удалить",
|
|
1844
1844
|
onClick: i[0] ||= B((e) => r("dismiss"), ["stop"])
|
|
1845
1845
|
}, [d(e, {
|
|
1846
|
-
icon: j(
|
|
1846
|
+
icon: j(Z),
|
|
1847
1847
|
size: 10
|
|
1848
1848
|
}, null, 8, ["icon"])])) : s("", !0)], 2));
|
|
1849
1849
|
}
|
|
1850
|
-
}),
|
|
1850
|
+
}), Er = {
|
|
1851
1851
|
key: 0,
|
|
1852
1852
|
class: "uid-divider__label"
|
|
1853
|
-
},
|
|
1853
|
+
}, Dr = /* @__PURE__ */ f({
|
|
1854
1854
|
__name: "UidDivider",
|
|
1855
1855
|
props: {
|
|
1856
1856
|
label: { default: void 0 },
|
|
@@ -1860,9 +1860,9 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1860
1860
|
return (t, n) => (x(), c("div", {
|
|
1861
1861
|
class: _(["uid-divider", `uid-divider--${e.orientation}`]),
|
|
1862
1862
|
role: "separator"
|
|
1863
|
-
}, [e.label && e.orientation === "horizontal" ? (x(), c("span",
|
|
1863
|
+
}, [e.label && e.orientation === "horizontal" ? (x(), c("span", Er, k(e.label), 1)) : s("", !0)], 2));
|
|
1864
1864
|
}
|
|
1865
|
-
}),
|
|
1865
|
+
}), Or = Symbol("uid-accordion"), kr = { class: "uid-accordion" }, Ar = /* @__PURE__ */ f({
|
|
1866
1866
|
__name: "UidAccordion",
|
|
1867
1867
|
props: /* @__PURE__ */ m({ multiple: {
|
|
1868
1868
|
type: Boolean,
|
|
@@ -1887,15 +1887,15 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1887
1887
|
r.has(e) ? r.delete(e) : r.add(e), t.value = [...r];
|
|
1888
1888
|
} else t.value = n === e ? "" : e;
|
|
1889
1889
|
}
|
|
1890
|
-
return S(
|
|
1890
|
+
return S(Or, {
|
|
1891
1891
|
isOpen: r,
|
|
1892
1892
|
toggle: i
|
|
1893
|
-
}), (e, t) => (x(), c("div",
|
|
1893
|
+
}), (e, t) => (x(), c("div", kr, [E(e.$slots, "default")]));
|
|
1894
1894
|
}
|
|
1895
|
-
}),
|
|
1895
|
+
}), jr = ["aria-expanded", "disabled"], Mr = { class: "uid-accordion-item__title" }, Nr = {
|
|
1896
1896
|
class: "uid-accordion-item__chevron",
|
|
1897
1897
|
"aria-hidden": "true"
|
|
1898
|
-
},
|
|
1898
|
+
}, Pr = ["hidden"], Fr = { class: "uid-accordion-item__body-inner" }, Ir = /* @__PURE__ */ f({
|
|
1899
1899
|
__name: "UidAccordionItem",
|
|
1900
1900
|
props: {
|
|
1901
1901
|
value: {},
|
|
@@ -1906,7 +1906,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1906
1906
|
}
|
|
1907
1907
|
},
|
|
1908
1908
|
setup(t) {
|
|
1909
|
-
let n = t, r = M(), i = `${r}-header`, o = `${r}-panel`, s = p(
|
|
1909
|
+
let n = t, r = M(), i = `${r}-header`, o = `${r}-panel`, s = p(Or), f = a(() => s.isOpen(n.value));
|
|
1910
1910
|
function m() {
|
|
1911
1911
|
n.disabled || s.toggle(n.value);
|
|
1912
1912
|
}
|
|
@@ -1921,18 +1921,18 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1921
1921
|
"aria-controls": o,
|
|
1922
1922
|
disabled: t.disabled || void 0,
|
|
1923
1923
|
onClick: m
|
|
1924
|
-
}, [l("span",
|
|
1925
|
-
icon: j(
|
|
1924
|
+
}, [l("span", Mr, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), l("span", Nr, [d(e, {
|
|
1925
|
+
icon: j(te),
|
|
1926
1926
|
size: 16
|
|
1927
|
-
}, null, 8, ["icon"])])], 8,
|
|
1927
|
+
}, null, 8, ["icon"])])], 8, jr), l("div", {
|
|
1928
1928
|
id: o,
|
|
1929
1929
|
class: "uid-accordion-item__body",
|
|
1930
1930
|
role: "region",
|
|
1931
1931
|
"aria-labelledby": i,
|
|
1932
1932
|
hidden: !f.value
|
|
1933
|
-
}, [l("div",
|
|
1933
|
+
}, [l("div", Fr, [E(n.$slots, "default")])], 8, Pr)], 2));
|
|
1934
1934
|
}
|
|
1935
|
-
}),
|
|
1935
|
+
}), Lr = { class: "uid-table-scroll" }, Rr = { class: "uid-table__head" }, zr = ["aria-sort", "onClick"], Br = { class: "uid-table__th-content" }, Vr = { class: "uid-table__body" }, Hr = { key: 0 }, Ur = ["colspan"], Wr = { key: 1 }, Gr = ["colspan"], Kr = /* @__PURE__ */ f({
|
|
1936
1936
|
__name: "UidTable",
|
|
1937
1937
|
props: {
|
|
1938
1938
|
columns: {},
|
|
@@ -1963,7 +1963,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1963
1963
|
return e.sortable ? i.sortKey === e.key ? i.sortDirection === "asc" ? G : U : ee : null;
|
|
1964
1964
|
}
|
|
1965
1965
|
let h = a(() => !i.loading && i.data.length === 0);
|
|
1966
|
-
return (r, i) => (x(), c("div", { class: _(["uid-table-wrap", { "uid-table-wrap--bordered": n.bordered }]) }, [l("div",
|
|
1966
|
+
return (r, i) => (x(), c("div", { class: _(["uid-table-wrap", { "uid-table-wrap--bordered": n.bordered }]) }, [l("div", Lr, [l("table", { class: _(["uid-table", { "uid-table--striped": n.striped }]) }, [l("thead", Rr, [l("tr", null, [(x(!0), c(t, null, T(n.columns, (t) => (x(), c("th", {
|
|
1967
1967
|
key: t.key,
|
|
1968
1968
|
class: _(["uid-table__th", [
|
|
1969
1969
|
`uid-table__th--${t.align ?? "left"}`,
|
|
@@ -1973,18 +1973,18 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1973
1973
|
style: v(t.width ? { width: t.width } : void 0),
|
|
1974
1974
|
"aria-sort": n.sortKey === t.key ? n.sortDirection === "asc" ? "ascending" : "descending" : t.sortable ? "none" : void 0,
|
|
1975
1975
|
onClick: (e) => p(t)
|
|
1976
|
-
}, [l("span",
|
|
1976
|
+
}, [l("span", Br, [u(k(t.label) + " ", 1), t.sortable ? (x(), o(e, {
|
|
1977
1977
|
key: 0,
|
|
1978
1978
|
icon: m(t),
|
|
1979
1979
|
size: 14,
|
|
1980
1980
|
class: "uid-table__sort-icon"
|
|
1981
|
-
}, null, 8, ["icon"])) : s("", !0)])], 14,
|
|
1981
|
+
}, null, 8, ["icon"])) : s("", !0)])], 14, zr))), 128))])]), l("tbody", Vr, [n.loading ? (x(), c("tr", Hr, [l("td", {
|
|
1982
1982
|
colspan: n.columns.length,
|
|
1983
1983
|
class: "uid-table__td uid-table__td--center"
|
|
1984
|
-
}, [d(
|
|
1984
|
+
}, [d(kt, { size: "md" })], 8, Ur)])) : h.value ? (x(), c("tr", Wr, [l("td", {
|
|
1985
1985
|
colspan: n.columns.length,
|
|
1986
1986
|
class: "uid-table__td uid-table__td--empty"
|
|
1987
|
-
}, [E(r.$slots, "empty", {}, () => [u(k(n.emptyText), 1)])], 8,
|
|
1987
|
+
}, [E(r.$slots, "empty", {}, () => [u(k(n.emptyText), 1)])], 8, Gr)])) : (x(!0), c(t, { key: 2 }, T(n.data, (e, i) => (x(), c("tr", {
|
|
1988
1988
|
key: i,
|
|
1989
1989
|
class: "uid-table__row"
|
|
1990
1990
|
}, [(x(!0), c(t, null, T(n.columns, (t) => (x(), c("td", {
|
|
@@ -1992,29 +1992,29 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
1992
1992
|
class: _(["uid-table__td", `uid-table__td--${t.align ?? "left"}`])
|
|
1993
1993
|
}, [E(r.$slots, t.key, { row: e }, () => [u(k(e[t.key]), 1)])], 2))), 128))]))), 128))])], 2)])], 2));
|
|
1994
1994
|
}
|
|
1995
|
-
}),
|
|
1995
|
+
}), qr = [
|
|
1996
1996
|
"aria-expanded",
|
|
1997
1997
|
"aria-controls",
|
|
1998
1998
|
"aria-disabled"
|
|
1999
|
-
],
|
|
1999
|
+
], Jr = { class: "uid-select__suffix" }, Yr = {
|
|
2000
2000
|
key: 0,
|
|
2001
2001
|
class: "uid-select__dropdown"
|
|
2002
|
-
},
|
|
2002
|
+
}, Xr = {
|
|
2003
2003
|
key: 0,
|
|
2004
2004
|
class: "uid-select__search"
|
|
2005
|
-
},
|
|
2005
|
+
}, Zr = ["id"], Qr = {
|
|
2006
2006
|
key: 0,
|
|
2007
2007
|
class: "uid-select__group-label"
|
|
2008
|
-
},
|
|
2008
|
+
}, $r = [
|
|
2009
2009
|
"data-active",
|
|
2010
2010
|
"aria-selected",
|
|
2011
2011
|
"aria-disabled",
|
|
2012
2012
|
"onClick",
|
|
2013
2013
|
"onMouseenter"
|
|
2014
|
-
],
|
|
2014
|
+
], ei = {
|
|
2015
2015
|
key: 1,
|
|
2016
2016
|
class: "uid-select__empty"
|
|
2017
|
-
},
|
|
2017
|
+
}, ti = /* @__PURE__ */ f({
|
|
2018
2018
|
__name: "UidSelect",
|
|
2019
2019
|
props: /* @__PURE__ */ m({
|
|
2020
2020
|
options: {},
|
|
@@ -2054,7 +2054,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2054
2054
|
if (e) {
|
|
2055
2055
|
h.value = "";
|
|
2056
2056
|
let e = A.value.findIndex((e) => e.value === p.value);
|
|
2057
|
-
v.value = e >= 0 ? e : 0, await g(), u.searchable && E.value?.focus(),
|
|
2057
|
+
v.value = e >= 0 ? e : 0, await g(), u.searchable && E.value?.focus(), X(), document.addEventListener("pointerdown", W);
|
|
2058
2058
|
} else document.removeEventListener("pointerdown", W);
|
|
2059
2059
|
}), L(h, () => {
|
|
2060
2060
|
v.value = 0;
|
|
@@ -2079,22 +2079,22 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2079
2079
|
y.value?.contains(t) || B();
|
|
2080
2080
|
}
|
|
2081
2081
|
function G(e) {
|
|
2082
|
-
e.key === "ArrowDown" ? (e.preventDefault(), m.value ? K() : F()) : e.key === "ArrowUp" ? (e.preventDefault(), m.value &&
|
|
2082
|
+
e.key === "ArrowDown" ? (e.preventDefault(), m.value ? K() : F()) : e.key === "ArrowUp" ? (e.preventDefault(), m.value && J()) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), m.value ? Y() : F()) : e.key === "Escape" && B();
|
|
2083
2083
|
}
|
|
2084
2084
|
function ee(e) {
|
|
2085
|
-
e.key === "ArrowDown" ? (e.preventDefault(), K()) : e.key === "ArrowUp" ? (e.preventDefault(),
|
|
2085
|
+
e.key === "ArrowDown" ? (e.preventDefault(), K()) : e.key === "ArrowUp" ? (e.preventDefault(), J()) : e.key === "Enter" ? (e.preventDefault(), Y()) : e.key === "Escape" && (B(), S.value?.focus());
|
|
2086
2086
|
}
|
|
2087
2087
|
function K() {
|
|
2088
|
-
v.value = Math.min(v.value + 1, A.value.length - 1),
|
|
2089
|
-
}
|
|
2090
|
-
function q() {
|
|
2091
|
-
v.value = Math.max(v.value - 1, 0), Y();
|
|
2088
|
+
v.value = Math.min(v.value + 1, A.value.length - 1), X();
|
|
2092
2089
|
}
|
|
2093
2090
|
function J() {
|
|
2091
|
+
v.value = Math.max(v.value - 1, 0), X();
|
|
2092
|
+
}
|
|
2093
|
+
function Y() {
|
|
2094
2094
|
let e = A.value[v.value];
|
|
2095
2095
|
e && H(e);
|
|
2096
2096
|
}
|
|
2097
|
-
function
|
|
2097
|
+
function X() {
|
|
2098
2098
|
g(() => {
|
|
2099
2099
|
(C.value?.querySelector("[data-active=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
|
|
2100
2100
|
});
|
|
@@ -2118,22 +2118,22 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2118
2118
|
"aria-disabled": n.disabled,
|
|
2119
2119
|
onClick: V,
|
|
2120
2120
|
onKeydown: G
|
|
2121
|
-
}, [l("span", { class: _(["uid-select__value", { "uid-select__value--placeholder": !O.value }]) }, k(O.value?.label ?? n.placeholder), 3), l("div",
|
|
2121
|
+
}, [l("span", { class: _(["uid-select__value", { "uid-select__value--placeholder": !O.value }]) }, k(O.value?.label ?? n.placeholder), 3), l("div", Jr, [n.clearable && p.value !== null ? (x(), c("button", {
|
|
2122
2122
|
key: 0,
|
|
2123
2123
|
type: "button",
|
|
2124
2124
|
class: "uid-select__clear",
|
|
2125
2125
|
"aria-label": "Очистить",
|
|
2126
2126
|
onClick: U
|
|
2127
2127
|
}, [d(e, {
|
|
2128
|
-
icon: j(
|
|
2128
|
+
icon: j(Z),
|
|
2129
2129
|
size: 12
|
|
2130
2130
|
}, null, 8, ["icon"])])) : s("", !0), d(e, {
|
|
2131
|
-
icon: j(
|
|
2131
|
+
icon: j(te),
|
|
2132
2132
|
size: 16,
|
|
2133
2133
|
class: _(["uid-select__chevron", { "uid-select__chevron--open": m.value }]),
|
|
2134
2134
|
"aria-hidden": "true"
|
|
2135
|
-
}, null, 8, ["icon", "class"])])], 40,
|
|
2136
|
-
default: R(() => [m.value ? (x(), c("div",
|
|
2135
|
+
}, null, 8, ["icon", "class"])])], 40, qr), d(r, { name: "uid-select-dropdown" }, {
|
|
2136
|
+
default: R(() => [m.value ? (x(), c("div", Yr, [n.searchable ? (x(), c("div", Xr, [z(l("input", {
|
|
2137
2137
|
ref_key: "searchRef",
|
|
2138
2138
|
ref: E,
|
|
2139
2139
|
"onUpdate:modelValue": a[0] ||= (e) => h.value = e,
|
|
@@ -2149,7 +2149,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2149
2149
|
class: "uid-select__list",
|
|
2150
2150
|
role: "listbox",
|
|
2151
2151
|
onKeydown: ee
|
|
2152
|
-
}, [A.value.length > 0 ? (x(!0), c(t, { key: 0 }, T(P.value, ([n, r]) => (x(), c(t, { key: n }, [n ? (x(), c("div",
|
|
2152
|
+
}, [A.value.length > 0 ? (x(!0), c(t, { key: 0 }, T(P.value, ([n, r]) => (x(), c(t, { key: n }, [n ? (x(), c("div", Qr, k(n), 1)) : s("", !0), (x(!0), c(t, null, T(r, (t) => (x(), c("button", {
|
|
2153
2153
|
key: t.value,
|
|
2154
2154
|
type: "button",
|
|
2155
2155
|
class: _(["uid-select__option", {
|
|
@@ -2165,25 +2165,25 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2165
2165
|
onMouseenter: (e) => !t.disabled && (v.value = A.value.indexOf(t))
|
|
2166
2166
|
}, [l("span", null, k(t.label), 1), t.value === p.value ? (x(), o(e, {
|
|
2167
2167
|
key: 0,
|
|
2168
|
-
icon: j(
|
|
2168
|
+
icon: j(q),
|
|
2169
2169
|
size: 14,
|
|
2170
2170
|
"aria-hidden": "true",
|
|
2171
2171
|
class: "uid-select__check"
|
|
2172
|
-
}, null, 8, ["icon"])) : s("", !0)], 42,
|
|
2172
|
+
}, null, 8, ["icon"])) : s("", !0)], 42, $r))), 128))], 64))), 128)) : (x(), c("div", ei, " Ничего не найдено "))], 40, Zr)])) : s("", !0)]),
|
|
2173
2173
|
_: 1
|
|
2174
2174
|
})], 2));
|
|
2175
2175
|
}
|
|
2176
|
-
}),
|
|
2176
|
+
}), ni = ["aria-expanded", "aria-disabled"], ri = { class: "uid-datepicker__suffix" }, ii = {
|
|
2177
2177
|
key: 0,
|
|
2178
2178
|
class: "uid-datepicker__panel",
|
|
2179
2179
|
role: "dialog",
|
|
2180
2180
|
"aria-label": "Выбор даты"
|
|
2181
|
-
},
|
|
2181
|
+
}, ai = { class: "uid-datepicker__nav" }, oi = { class: "uid-datepicker__month-label" }, si = { class: "uid-datepicker__grid" }, ci = [
|
|
2182
2182
|
"disabled",
|
|
2183
2183
|
"aria-current",
|
|
2184
2184
|
"aria-selected",
|
|
2185
2185
|
"onClick"
|
|
2186
|
-
],
|
|
2186
|
+
], li = /* @__PURE__ */ f({
|
|
2187
2187
|
__name: "UidDatePicker",
|
|
2188
2188
|
props: /* @__PURE__ */ m({
|
|
2189
2189
|
min: { default: void 0 },
|
|
@@ -2321,39 +2321,39 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2321
2321
|
"aria-disabled": n.disabled,
|
|
2322
2322
|
onClick: I,
|
|
2323
2323
|
onKeydown: W
|
|
2324
|
-
}, [l("span", { class: _(["uid-datepicker__value", { "uid-datepicker__value--placeholder": !o.value }]) }, k(o.value ? D.value : n.placeholder), 3), l("div",
|
|
2324
|
+
}, [l("span", { class: _(["uid-datepicker__value", { "uid-datepicker__value--placeholder": !o.value }]) }, k(o.value ? D.value : n.placeholder), 3), l("div", ri, [o.value ? (x(), c("button", {
|
|
2325
2325
|
key: 0,
|
|
2326
2326
|
type: "button",
|
|
2327
2327
|
class: "uid-datepicker__clear",
|
|
2328
2328
|
"aria-label": "Очистить",
|
|
2329
2329
|
onClick: H
|
|
2330
2330
|
}, " × ")) : s("", !0), d(e, {
|
|
2331
|
-
icon: j(
|
|
2331
|
+
icon: j(te),
|
|
2332
2332
|
size: 16,
|
|
2333
2333
|
class: _(["uid-datepicker__chevron", { "uid-datepicker__chevron--open": u.value }]),
|
|
2334
2334
|
"aria-hidden": "true"
|
|
2335
|
-
}, null, 8, ["icon", "class"])])], 40,
|
|
2336
|
-
default: R(() => [u.value ? (x(), c("div",
|
|
2335
|
+
}, null, 8, ["icon", "class"])])], 40, ni), d(r, { name: "uid-datepicker-panel" }, {
|
|
2336
|
+
default: R(() => [u.value ? (x(), c("div", ii, [l("div", ai, [
|
|
2337
2337
|
l("button", {
|
|
2338
2338
|
type: "button",
|
|
2339
2339
|
class: "uid-datepicker__nav-btn",
|
|
2340
2340
|
"aria-label": "Предыдущий месяц",
|
|
2341
2341
|
onClick: B
|
|
2342
2342
|
}, [d(e, {
|
|
2343
|
-
icon: j(
|
|
2343
|
+
icon: j(Y),
|
|
2344
2344
|
size: 16
|
|
2345
2345
|
}, null, 8, ["icon"])]),
|
|
2346
|
-
l("span",
|
|
2346
|
+
l("span", oi, k(v[g.value]) + " " + k(h.value), 1),
|
|
2347
2347
|
l("button", {
|
|
2348
2348
|
type: "button",
|
|
2349
2349
|
class: "uid-datepicker__nav-btn",
|
|
2350
2350
|
"aria-label": "Следующий месяц",
|
|
2351
2351
|
onClick: V
|
|
2352
2352
|
}, [d(e, {
|
|
2353
|
-
icon: j(
|
|
2353
|
+
icon: j(X),
|
|
2354
2354
|
size: 16
|
|
2355
2355
|
}, null, 8, ["icon"])])
|
|
2356
|
-
]), l("div",
|
|
2356
|
+
]), l("div", si, [(x(), c(t, null, T(y, (e) => l("span", {
|
|
2357
2357
|
key: e,
|
|
2358
2358
|
class: "uid-datepicker__weekday"
|
|
2359
2359
|
}, k(e), 1)), 64)), (x(!0), c(t, null, T(O.value, (e) => (x(), c("button", {
|
|
@@ -2369,11 +2369,11 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2369
2369
|
"aria-current": e.iso === A.value ? "date" : void 0,
|
|
2370
2370
|
"aria-selected": e.iso === o.value,
|
|
2371
2371
|
onClick: (t) => z(e)
|
|
2372
|
-
}, k(e.date.getDate()), 11,
|
|
2372
|
+
}, k(e.date.getDate()), 11, ci))), 128))])])) : s("", !0)]),
|
|
2373
2373
|
_: 1
|
|
2374
2374
|
})], 2));
|
|
2375
2375
|
}
|
|
2376
|
-
}),
|
|
2376
|
+
}), ui = /* @__PURE__ */ f({
|
|
2377
2377
|
__name: "UidVirtualList",
|
|
2378
2378
|
props: {
|
|
2379
2379
|
items: {},
|
|
@@ -2415,17 +2415,17 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2415
2415
|
index: r
|
|
2416
2416
|
})], 4))), 128))], 4)], 4)], 36));
|
|
2417
2417
|
}
|
|
2418
|
-
}),
|
|
2418
|
+
}), di = {
|
|
2419
2419
|
key: 0,
|
|
2420
2420
|
class: "uid-slider__header"
|
|
2421
|
-
},
|
|
2421
|
+
}, fi = {
|
|
2422
2422
|
key: 0,
|
|
2423
2423
|
class: "uid-slider__label"
|
|
2424
|
-
},
|
|
2424
|
+
}, pi = {
|
|
2425
2425
|
key: 1,
|
|
2426
2426
|
class: "uid-slider__value",
|
|
2427
2427
|
"aria-live": "polite"
|
|
2428
|
-
},
|
|
2428
|
+
}, mi = [
|
|
2429
2429
|
"min",
|
|
2430
2430
|
"max",
|
|
2431
2431
|
"step",
|
|
@@ -2434,7 +2434,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2434
2434
|
"aria-valuemin",
|
|
2435
2435
|
"aria-valuemax",
|
|
2436
2436
|
"aria-valuenow"
|
|
2437
|
-
],
|
|
2437
|
+
], hi = /* @__PURE__ */ f({
|
|
2438
2438
|
__name: "UidSlider",
|
|
2439
2439
|
props: /* @__PURE__ */ m({
|
|
2440
2440
|
min: { default: 0 },
|
|
@@ -2460,7 +2460,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2460
2460
|
emits: ["update:modelValue"],
|
|
2461
2461
|
setup(e) {
|
|
2462
2462
|
let t = e, n = N(e, "modelValue"), r = a(() => (n.value - t.min) / (t.max - t.min) * 100), i = a(() => t.formatValue ? t.formatValue(n.value) : String(n.value));
|
|
2463
|
-
return (t, a) => (x(), c("div", { class: _(["uid-slider", { "uid-slider--disabled": e.disabled }]) }, [e.label || e.showValue ? (x(), c("div",
|
|
2463
|
+
return (t, a) => (x(), c("div", { class: _(["uid-slider", { "uid-slider--disabled": e.disabled }]) }, [e.label || e.showValue ? (x(), c("div", di, [e.label ? (x(), c("label", fi, k(e.label), 1)) : s("", !0), e.showValue ? (x(), c("span", pi, k(i.value), 1)) : s("", !0)])) : s("", !0), z(l("input", {
|
|
2464
2464
|
"onUpdate:modelValue": a[0] ||= (e) => n.value = e,
|
|
2465
2465
|
class: "uid-slider__input",
|
|
2466
2466
|
type: "range",
|
|
@@ -2473,22 +2473,22 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2473
2473
|
"aria-valuemax": e.max,
|
|
2474
2474
|
"aria-valuenow": n.value,
|
|
2475
2475
|
style: v({ "--_fill": `${r.value}%` })
|
|
2476
|
-
}, null, 12,
|
|
2476
|
+
}, null, 12, mi), [[
|
|
2477
2477
|
I,
|
|
2478
2478
|
n.value,
|
|
2479
2479
|
void 0,
|
|
2480
2480
|
{ number: !0 }
|
|
2481
2481
|
]])], 2));
|
|
2482
2482
|
}
|
|
2483
|
-
}),
|
|
2483
|
+
}), gi = ["aria-expanded", "aria-disabled"], _i = {
|
|
2484
2484
|
key: 0,
|
|
2485
2485
|
class: "uid-colorpicker__panel",
|
|
2486
2486
|
role: "dialog",
|
|
2487
2487
|
"aria-label": "Выбор цвета"
|
|
2488
|
-
},
|
|
2488
|
+
}, vi = { class: "uid-colorpicker__controls" }, yi = { class: "uid-colorpicker__sliders" }, bi = { class: "uid-colorpicker__inputs" }, xi = ["value"], Si = {
|
|
2489
2489
|
key: 0,
|
|
2490
2490
|
class: "uid-colorpicker__presets"
|
|
2491
|
-
},
|
|
2491
|
+
}, Ci = ["aria-label", "onClick"], wi = /* @__PURE__ */ f({
|
|
2492
2492
|
__name: "UidColorPicker",
|
|
2493
2493
|
props: /* @__PURE__ */ m({
|
|
2494
2494
|
disabled: {
|
|
@@ -2563,12 +2563,12 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2563
2563
|
let e = I();
|
|
2564
2564
|
u.value = e, o("change", e), D.value = e.toUpperCase();
|
|
2565
2565
|
}
|
|
2566
|
-
let H = a(() => `hsl(${f.value}, 100%, 50%)`), U = a(() => `${p.value}%`), W = a(() => `${100 - m.value}%`), G = a(() => `${f.value / 360 * 100}%`), ee = a(() => `${h.value}%`), [
|
|
2566
|
+
let H = a(() => `hsl(${f.value}, 100%, 50%)`), U = a(() => `${p.value}%`), W = a(() => `${100 - m.value}%`), G = a(() => `${f.value / 360 * 100}%`), ee = a(() => `${h.value}%`), [K, q, J] = [
|
|
2567
2567
|
a(() => M(f.value, p.value, m.value)[0]),
|
|
2568
2568
|
a(() => M(f.value, p.value, m.value)[1]),
|
|
2569
2569
|
a(() => M(f.value, p.value, m.value)[2])
|
|
2570
|
-
],
|
|
2571
|
-
function
|
|
2570
|
+
], te = a(() => `rgb(${K.value}, ${q.value}, ${J.value})`);
|
|
2571
|
+
function Y(e, t) {
|
|
2572
2572
|
if (!e) return null;
|
|
2573
2573
|
let n = e.getBoundingClientRect();
|
|
2574
2574
|
return {
|
|
@@ -2576,40 +2576,40 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2576
2576
|
y: Math.max(0, Math.min(1, (t.clientY - n.top) / n.height))
|
|
2577
2577
|
};
|
|
2578
2578
|
}
|
|
2579
|
-
function
|
|
2579
|
+
function X(e) {
|
|
2580
2580
|
O.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2581
|
-
let t =
|
|
2581
|
+
let t = Y(S.value, e);
|
|
2582
2582
|
t && (p.value = Math.round(t.x * 100), m.value = Math.round((1 - t.y) * 100), V());
|
|
2583
2583
|
}
|
|
2584
|
-
function
|
|
2584
|
+
function ne(e) {
|
|
2585
2585
|
if (!O.value) return;
|
|
2586
|
-
let t =
|
|
2586
|
+
let t = Y(S.value, e);
|
|
2587
2587
|
t && (p.value = Math.round(t.x * 100), m.value = Math.round((1 - t.y) * 100), V());
|
|
2588
2588
|
}
|
|
2589
|
-
function
|
|
2589
|
+
function re() {
|
|
2590
2590
|
O.value = !1;
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function ie(e) {
|
|
2593
2593
|
A.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2594
|
-
let t =
|
|
2594
|
+
let t = Y(C.value, e);
|
|
2595
2595
|
t && (f.value = Math.round(t.x * 360), V());
|
|
2596
2596
|
}
|
|
2597
|
-
function
|
|
2597
|
+
function ae(e) {
|
|
2598
2598
|
if (!A.value) return;
|
|
2599
|
-
let t =
|
|
2599
|
+
let t = Y(C.value, e);
|
|
2600
2600
|
t && (f.value = Math.round(t.x * 360), V());
|
|
2601
2601
|
}
|
|
2602
|
-
function
|
|
2602
|
+
function oe() {
|
|
2603
2603
|
A.value = !1;
|
|
2604
2604
|
}
|
|
2605
2605
|
function se(e) {
|
|
2606
2606
|
j.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2607
|
-
let t =
|
|
2607
|
+
let t = Y(E.value, e);
|
|
2608
2608
|
t && (h.value = Math.round(t.x * 100), V());
|
|
2609
2609
|
}
|
|
2610
2610
|
function ce(e) {
|
|
2611
2611
|
if (!j.value) return;
|
|
2612
|
-
let t =
|
|
2612
|
+
let t = Y(E.value, e);
|
|
2613
2613
|
t && (h.value = Math.round(t.x * 100), V());
|
|
2614
2614
|
}
|
|
2615
2615
|
function le() {
|
|
@@ -2628,27 +2628,27 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2628
2628
|
function fe(e) {
|
|
2629
2629
|
e.key === "Enter" && de();
|
|
2630
2630
|
}
|
|
2631
|
-
function
|
|
2631
|
+
function Z(e) {
|
|
2632
2632
|
let t = z(e);
|
|
2633
2633
|
if (!t) return;
|
|
2634
2634
|
let [n, r, a, o] = t, [s, c, l] = P(n, r, a);
|
|
2635
2635
|
f.value = s, p.value = c, m.value = l, i.alpha && (h.value = o), V();
|
|
2636
2636
|
}
|
|
2637
|
-
function
|
|
2637
|
+
function pe() {
|
|
2638
2638
|
i.disabled || (B(), u.value || (D.value = ""), g.value = !0);
|
|
2639
2639
|
}
|
|
2640
2640
|
function me() {
|
|
2641
2641
|
g.value = !1;
|
|
2642
2642
|
}
|
|
2643
|
-
function
|
|
2644
|
-
g.value ? me() :
|
|
2643
|
+
function he() {
|
|
2644
|
+
g.value ? me() : pe();
|
|
2645
2645
|
}
|
|
2646
|
-
function
|
|
2646
|
+
function ge(e) {
|
|
2647
2647
|
y.value?.contains(e.target) || me();
|
|
2648
2648
|
}
|
|
2649
2649
|
return L(g, (e) => {
|
|
2650
|
-
e ? document.addEventListener("pointerdown",
|
|
2651
|
-
}), b(() => document.removeEventListener("pointerdown",
|
|
2650
|
+
e ? document.addEventListener("pointerdown", ge) : document.removeEventListener("pointerdown", ge);
|
|
2651
|
+
}), b(() => document.removeEventListener("pointerdown", ge)), (n, i) => (x(), c("div", {
|
|
2652
2652
|
ref_key: "containerRef",
|
|
2653
2653
|
ref: y,
|
|
2654
2654
|
class: _(["uid-colorpicker", {
|
|
@@ -2660,20 +2660,20 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2660
2660
|
class: "uid-colorpicker__trigger",
|
|
2661
2661
|
"aria-expanded": g.value,
|
|
2662
2662
|
"aria-disabled": e.disabled,
|
|
2663
|
-
onClick:
|
|
2663
|
+
onClick: he
|
|
2664
2664
|
}, [l("span", {
|
|
2665
2665
|
class: "uid-colorpicker__swatch",
|
|
2666
2666
|
style: v(u.value ? { background: u.value } : {})
|
|
2667
|
-
}, null, 4), l("span", { class: _(["uid-colorpicker__trigger-label", { "uid-colorpicker__trigger-label--empty": !u.value }]) }, k(u.value ? u.value.toUpperCase() : "Выберите цвет"), 3)], 8,
|
|
2668
|
-
default: R(() => [g.value ? (x(), c("div",
|
|
2667
|
+
}, null, 4), l("span", { class: _(["uid-colorpicker__trigger-label", { "uid-colorpicker__trigger-label--empty": !u.value }]) }, k(u.value ? u.value.toUpperCase() : "Выберите цвет"), 3)], 8, gi), d(r, { name: "uid-colorpicker-panel" }, {
|
|
2668
|
+
default: R(() => [g.value ? (x(), c("div", _i, [
|
|
2669
2669
|
l("div", {
|
|
2670
2670
|
ref_key: "gradientRef",
|
|
2671
2671
|
ref: S,
|
|
2672
2672
|
class: "uid-colorpicker__gradient",
|
|
2673
2673
|
style: v({ "--_hue": H.value }),
|
|
2674
|
-
onPointerdown:
|
|
2675
|
-
onPointermove:
|
|
2676
|
-
onPointerup:
|
|
2674
|
+
onPointerdown: X,
|
|
2675
|
+
onPointermove: ne,
|
|
2676
|
+
onPointerup: re
|
|
2677
2677
|
}, [l("div", {
|
|
2678
2678
|
class: "uid-colorpicker__gradient-thumb",
|
|
2679
2679
|
style: v({
|
|
@@ -2681,13 +2681,13 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2681
2681
|
top: W.value
|
|
2682
2682
|
})
|
|
2683
2683
|
}, null, 4)], 36),
|
|
2684
|
-
l("div",
|
|
2684
|
+
l("div", vi, [l("div", yi, [l("div", {
|
|
2685
2685
|
ref_key: "hueSliderRef",
|
|
2686
2686
|
ref: C,
|
|
2687
2687
|
class: "uid-colorpicker__hue-track",
|
|
2688
|
-
onPointerdown:
|
|
2689
|
-
onPointermove:
|
|
2690
|
-
onPointerup:
|
|
2688
|
+
onPointerdown: ie,
|
|
2689
|
+
onPointermove: ae,
|
|
2690
|
+
onPointerup: oe
|
|
2691
2691
|
}, [l("div", {
|
|
2692
2692
|
class: "uid-colorpicker__track-thumb",
|
|
2693
2693
|
style: v({ left: G.value })
|
|
@@ -2696,7 +2696,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2696
2696
|
ref_key: "alphaSliderRef",
|
|
2697
2697
|
ref: E,
|
|
2698
2698
|
class: "uid-colorpicker__alpha-track",
|
|
2699
|
-
style: v({ "--_color":
|
|
2699
|
+
style: v({ "--_color": te.value }),
|
|
2700
2700
|
onPointerdown: se,
|
|
2701
2701
|
onPointermove: ce,
|
|
2702
2702
|
onPointerup: le
|
|
@@ -2705,9 +2705,9 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2705
2705
|
style: v({ left: ee.value })
|
|
2706
2706
|
}, null, 4)], 36)) : s("", !0)]), l("span", {
|
|
2707
2707
|
class: "uid-colorpicker__preview",
|
|
2708
|
-
style: v({ background:
|
|
2708
|
+
style: v({ background: te.value })
|
|
2709
2709
|
}, null, 4)]),
|
|
2710
|
-
l("div",
|
|
2710
|
+
l("div", bi, [i[0] ||= l("label", { class: "uid-colorpicker__input-label" }, "HEX", -1), l("input", {
|
|
2711
2711
|
class: "uid-colorpicker__hex-input",
|
|
2712
2712
|
type: "text",
|
|
2713
2713
|
value: D.value,
|
|
@@ -2716,37 +2716,37 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2716
2716
|
onInput: ue,
|
|
2717
2717
|
onBlur: de,
|
|
2718
2718
|
onKeydown: fe
|
|
2719
|
-
}, null, 40,
|
|
2720
|
-
e.presets && e.presets.length ? (x(), c("div",
|
|
2719
|
+
}, null, 40, xi)]),
|
|
2720
|
+
e.presets && e.presets.length ? (x(), c("div", Si, [(x(!0), c(t, null, T(e.presets, (e) => (x(), c("button", {
|
|
2721
2721
|
key: e,
|
|
2722
2722
|
type: "button",
|
|
2723
2723
|
class: _(["uid-colorpicker__preset", { "uid-colorpicker__preset--active": u.value === e || u.value === e.toLowerCase() || u.value?.toUpperCase() === e.toUpperCase() }]),
|
|
2724
2724
|
style: v({ background: e }),
|
|
2725
2725
|
"aria-label": e,
|
|
2726
|
-
onClick: (t) =>
|
|
2727
|
-
}, null, 14,
|
|
2726
|
+
onClick: (t) => Z(e)
|
|
2727
|
+
}, null, 14, Ci))), 128))])) : s("", !0)
|
|
2728
2728
|
])) : s("", !0)]),
|
|
2729
2729
|
_: 1
|
|
2730
2730
|
})], 2));
|
|
2731
2731
|
}
|
|
2732
|
-
}),
|
|
2732
|
+
}), Ti = { class: "uid-command__search" }, Ei = ["placeholder"], Di = {
|
|
2733
2733
|
key: 0,
|
|
2734
2734
|
class: "uid-command__group-label"
|
|
2735
|
-
},
|
|
2735
|
+
}, Oi = [
|
|
2736
2736
|
"data-active",
|
|
2737
2737
|
"aria-selected",
|
|
2738
2738
|
"onClick",
|
|
2739
2739
|
"onMouseenter"
|
|
2740
|
-
],
|
|
2740
|
+
], ki = { class: "uid-command__item-text" }, Ai = { class: "uid-command__item-label" }, ji = {
|
|
2741
2741
|
key: 0,
|
|
2742
2742
|
class: "uid-command__item-desc"
|
|
2743
|
-
},
|
|
2743
|
+
}, Mi = {
|
|
2744
2744
|
key: 0,
|
|
2745
2745
|
class: "uid-command__item-shortcut"
|
|
2746
|
-
},
|
|
2746
|
+
}, Ni = {
|
|
2747
2747
|
key: 1,
|
|
2748
2748
|
class: "uid-command__empty"
|
|
2749
|
-
},
|
|
2749
|
+
}, Pi = /* @__PURE__ */ f({
|
|
2750
2750
|
__name: "UidCommand",
|
|
2751
2751
|
props: /* @__PURE__ */ m({
|
|
2752
2752
|
commands: {},
|
|
@@ -2761,7 +2761,7 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2761
2761
|
}),
|
|
2762
2762
|
emits: ["update:modelValue"],
|
|
2763
2763
|
setup(i) {
|
|
2764
|
-
let u = i, f = N(i, "modelValue"), p = w(""), m = w(0), h = w(null), v = w(null), S = w(null), { activate: C, deactivate: E } =
|
|
2764
|
+
let u = i, f = N(i, "modelValue"), p = w(""), m = w(0), h = w(null), v = w(null), S = w(null), { activate: C, deactivate: E } = en(h), { lock: D, unlock: O } = nn(), A = a(() => {
|
|
2765
2765
|
let e = p.value.trim().toLowerCase();
|
|
2766
2766
|
return e ? u.commands.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e)) : u.commands;
|
|
2767
2767
|
}), M = a(() => {
|
|
@@ -2816,8 +2816,8 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2816
2816
|
"aria-modal": "true",
|
|
2817
2817
|
"aria-label": "Палитра команд",
|
|
2818
2818
|
onKeydown: H
|
|
2819
|
-
}, [l("div",
|
|
2820
|
-
icon: j(
|
|
2819
|
+
}, [l("div", Ti, [d(e, {
|
|
2820
|
+
icon: j(le),
|
|
2821
2821
|
size: 16,
|
|
2822
2822
|
class: "uid-command__search-icon",
|
|
2823
2823
|
"aria-hidden": "true"
|
|
@@ -2831,12 +2831,12 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2831
2831
|
autocomplete: "off",
|
|
2832
2832
|
spellcheck: "false",
|
|
2833
2833
|
"aria-autocomplete": "list"
|
|
2834
|
-
}, null, 8,
|
|
2834
|
+
}, null, 8, Ei), [[I, p.value]])]), l("div", {
|
|
2835
2835
|
ref_key: "listRef",
|
|
2836
2836
|
ref: S,
|
|
2837
2837
|
class: "uid-command__list",
|
|
2838
2838
|
role: "listbox"
|
|
2839
|
-
}, [A.value.length > 0 ? (x(!0), c(t, { key: 0 }, T(M.value, ([e, n]) => (x(), c(t, { key: e }, [e ? (x(), c("div",
|
|
2839
|
+
}, [A.value.length > 0 ? (x(!0), c(t, { key: 0 }, T(M.value, ([e, n]) => (x(), c(t, { key: e }, [e ? (x(), c("div", Di, k(e), 1)) : s("", !0), (x(!0), c(t, null, T(n, (e) => (x(), c("button", {
|
|
2840
2840
|
key: e.id,
|
|
2841
2841
|
class: _(["uid-command__item", { "uid-command__item--active": A.value.indexOf(e) === m.value }]),
|
|
2842
2842
|
"data-active": A.value.indexOf(e) === m.value ? "true" : void 0,
|
|
@@ -2845,220 +2845,1822 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
2845
2845
|
type: "button",
|
|
2846
2846
|
onClick: (t) => F(e),
|
|
2847
2847
|
onMouseenter: (t) => m.value = A.value.indexOf(e)
|
|
2848
|
-
}, [l("div",
|
|
2848
|
+
}, [l("div", ki, [l("span", Ai, k(e.label), 1), e.description ? (x(), c("span", ji, k(e.description), 1)) : s("", !0)]), e.shortcut ? (x(), c("div", Mi, [(x(!0), c(t, null, T(e.shortcut, (e) => (x(), c("kbd", {
|
|
2849
2849
|
key: e,
|
|
2850
2850
|
class: "uid-command__kbd"
|
|
2851
|
-
}, k(e), 1))), 128))])) : s("", !0)], 42,
|
|
2851
|
+
}, k(e), 1))), 128))])) : s("", !0)], 42, Oi))), 128))], 64))), 128)) : (x(), c("div", Ni, k(i.emptyText), 1))], 512)], 544)])) : s("", !0)]),
|
|
2852
2852
|
_: 1
|
|
2853
2853
|
})]));
|
|
2854
2854
|
}
|
|
2855
|
-
}),
|
|
2856
|
-
key: 1,
|
|
2857
|
-
"aria-hidden": "true"
|
|
2858
|
-
}, Mi = { class: "uid-stepper__content" }, Ni = { class: "uid-stepper__label" }, Pi = {
|
|
2855
|
+
}), Fi = ["for"], Ii = {
|
|
2859
2856
|
key: 0,
|
|
2860
|
-
class: "uid-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
"aria-hidden": "true"
|
|
2884
|
-
}, null, 8, ["icon"])) : (x(), c("span", ji, k(i + 1), 1))]), l("div", Mi, [l("span", Ni, k(t.label), 1), t.description ? (x(), c("span", Pi, k(t.description), 1)) : s("", !0)])], 10, ki))), 128))], 10, Oi));
|
|
2885
|
-
}
|
|
2886
|
-
}), Ii = /* @__PURE__ */ f({
|
|
2887
|
-
__name: "UidStack",
|
|
2888
|
-
props: {
|
|
2889
|
-
direction: { default: "column" },
|
|
2890
|
-
gap: { default: "var(--uid-space-4)" },
|
|
2891
|
-
align: { default: void 0 },
|
|
2892
|
-
justify: { default: void 0 },
|
|
2893
|
-
wrap: {
|
|
2857
|
+
class: "uid-number-input__required",
|
|
2858
|
+
"aria-hidden": "true"
|
|
2859
|
+
}, Li = { class: "uid-number-input__control" }, Ri = ["disabled", "aria-label"], zi = [
|
|
2860
|
+
"id",
|
|
2861
|
+
"name",
|
|
2862
|
+
"placeholder",
|
|
2863
|
+
"disabled",
|
|
2864
|
+
"readonly",
|
|
2865
|
+
"required",
|
|
2866
|
+
"min",
|
|
2867
|
+
"max",
|
|
2868
|
+
"step",
|
|
2869
|
+
"value",
|
|
2870
|
+
"aria-invalid",
|
|
2871
|
+
"aria-describedby"
|
|
2872
|
+
], Bi = ["disabled", "aria-label"], Vi = ["id"], Hi = /* @__PURE__ */ f({
|
|
2873
|
+
__name: "UidNumberInput",
|
|
2874
|
+
props: /* @__PURE__ */ m({
|
|
2875
|
+
min: { default: void 0 },
|
|
2876
|
+
max: { default: void 0 },
|
|
2877
|
+
step: { default: 1 },
|
|
2878
|
+
precision: { default: void 0 },
|
|
2879
|
+
disabled: {
|
|
2894
2880
|
type: Boolean,
|
|
2895
2881
|
default: !1
|
|
2896
2882
|
},
|
|
2897
|
-
|
|
2898
|
-
inline: {
|
|
2883
|
+
readonly: {
|
|
2899
2884
|
type: Boolean,
|
|
2900
2885
|
default: !1
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
},
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
end: "flex-end",
|
|
2915
|
-
stretch: "stretch",
|
|
2916
|
-
baseline: "baseline"
|
|
2917
|
-
}, i = a(() => ({
|
|
2918
|
-
flexDirection: t.direction,
|
|
2919
|
-
gap: t.gap,
|
|
2920
|
-
alignItems: t.align ? r[t.align] : void 0,
|
|
2921
|
-
justifyContent: t.justify ? n[t.justify] : void 0,
|
|
2922
|
-
flexWrap: t.wrap ? "wrap" : void 0
|
|
2923
|
-
}));
|
|
2924
|
-
return (t, n) => (x(), o(O(e.as), {
|
|
2925
|
-
class: _(["uid-stack", { "uid-stack--inline": e.inline }]),
|
|
2926
|
-
style: v(i.value)
|
|
2927
|
-
}, {
|
|
2928
|
-
default: R(() => [E(t.$slots, "default")]),
|
|
2929
|
-
_: 3
|
|
2930
|
-
}, 8, ["class", "style"]));
|
|
2931
|
-
}
|
|
2932
|
-
}), Li = /* @__PURE__ */ f({
|
|
2933
|
-
__name: "UidGrid",
|
|
2934
|
-
props: {
|
|
2935
|
-
cols: { default: 12 },
|
|
2936
|
-
gap: { default: "var(--uid-space-4)" },
|
|
2937
|
-
rowGap: { default: void 0 },
|
|
2938
|
-
colGap: { default: void 0 },
|
|
2939
|
-
align: { default: void 0 },
|
|
2940
|
-
justify: { default: void 0 },
|
|
2941
|
-
as: { default: "div" }
|
|
2942
|
-
},
|
|
2943
|
-
setup(e) {
|
|
2944
|
-
let t = e, n = {
|
|
2945
|
-
start: "start",
|
|
2946
|
-
center: "center",
|
|
2947
|
-
end: "end",
|
|
2948
|
-
stretch: "stretch"
|
|
2949
|
-
}, r = a(() => ({
|
|
2950
|
-
gridTemplateColumns: typeof t.cols == "number" ? `repeat(${t.cols}, minmax(0, 1fr))` : t.cols,
|
|
2951
|
-
gap: t.rowGap || t.colGap ? void 0 : t.gap,
|
|
2952
|
-
rowGap: t.rowGap,
|
|
2953
|
-
columnGap: t.colGap,
|
|
2954
|
-
alignItems: t.align ? n[t.align] : void 0,
|
|
2955
|
-
justifyItems: t.justify ? n[t.justify] : void 0
|
|
2956
|
-
}));
|
|
2957
|
-
return (t, n) => (x(), o(O(e.as), {
|
|
2958
|
-
class: "uid-grid",
|
|
2959
|
-
style: v(r.value)
|
|
2960
|
-
}, {
|
|
2961
|
-
default: R(() => [E(t.$slots, "default")]),
|
|
2962
|
-
_: 3
|
|
2963
|
-
}, 8, ["style"]));
|
|
2964
|
-
}
|
|
2965
|
-
}), Ri = /* @__PURE__ */ f({
|
|
2966
|
-
__name: "UidContainer",
|
|
2967
|
-
props: {
|
|
2968
|
-
size: { default: "lg" },
|
|
2969
|
-
padding: {
|
|
2886
|
+
},
|
|
2887
|
+
size: { default: "md" },
|
|
2888
|
+
label: {},
|
|
2889
|
+
hint: {},
|
|
2890
|
+
error: {},
|
|
2891
|
+
required: {
|
|
2892
|
+
type: Boolean,
|
|
2893
|
+
default: !1
|
|
2894
|
+
},
|
|
2895
|
+
placeholder: {},
|
|
2896
|
+
name: {},
|
|
2897
|
+
id: {},
|
|
2898
|
+
controls: {
|
|
2970
2899
|
type: Boolean,
|
|
2971
2900
|
default: !0
|
|
2972
2901
|
},
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
}, 8, ["class"]));
|
|
2980
|
-
}
|
|
2981
|
-
}), zi = Symbol("uid-wizard"), Bi = { class: "uid-wizard" }, Vi = /* @__PURE__ */ f({
|
|
2982
|
-
__name: "UidWizard",
|
|
2983
|
-
props: /* @__PURE__ */ m({ steps: {} }, {
|
|
2984
|
-
modelValue: { default: 0 },
|
|
2902
|
+
centered: {
|
|
2903
|
+
type: Boolean,
|
|
2904
|
+
default: !1
|
|
2905
|
+
}
|
|
2906
|
+
}, {
|
|
2907
|
+
modelValue: { default: null },
|
|
2985
2908
|
modelModifiers: {}
|
|
2986
2909
|
}),
|
|
2987
|
-
emits: [
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2910
|
+
emits: /* @__PURE__ */ m([
|
|
2911
|
+
"blur",
|
|
2912
|
+
"focus",
|
|
2913
|
+
"change"
|
|
2914
|
+
], ["update:modelValue"]),
|
|
2915
|
+
setup(t, { emit: n }) {
|
|
2916
|
+
let r = t, i = n, o = N(t, "modelValue"), f = r.id ?? M(), p = a(() => !!r.error), m = a(() => r.error || r.hint), h = a(() => r.min !== void 0 && o.value !== null && o.value <= r.min), g = a(() => r.max !== void 0 && o.value !== null && o.value >= r.max);
|
|
2917
|
+
function v(e) {
|
|
2918
|
+
return r.min !== void 0 && e < r.min && (e = r.min), r.max !== void 0 && e > r.max && (e = r.max), e;
|
|
2993
2919
|
}
|
|
2994
|
-
function
|
|
2995
|
-
|
|
2920
|
+
function y(e) {
|
|
2921
|
+
if (r.precision === void 0) return e;
|
|
2922
|
+
let t = 10 ** r.precision;
|
|
2923
|
+
return Math.round(e * t) / t;
|
|
2996
2924
|
}
|
|
2997
|
-
function
|
|
2998
|
-
e
|
|
2925
|
+
function b(e) {
|
|
2926
|
+
e !== o.value && (o.value = e, i("change", e));
|
|
2999
2927
|
}
|
|
3000
|
-
function
|
|
3001
|
-
|
|
2928
|
+
function S() {
|
|
2929
|
+
r.disabled || r.readonly || b(y(v((o.value ?? r.min ?? 0) + r.step)));
|
|
3002
2930
|
}
|
|
3003
|
-
function
|
|
3004
|
-
|
|
2931
|
+
function C() {
|
|
2932
|
+
r.disabled || r.readonly || b(y(v((o.value ?? r.max ?? 0) - r.step)));
|
|
3005
2933
|
}
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
registerValidator: p,
|
|
3015
|
-
unregisterValidator: m
|
|
3016
|
-
}), t({
|
|
3017
|
-
current: r,
|
|
3018
|
-
next: u,
|
|
3019
|
-
prev: d,
|
|
3020
|
-
goTo: f,
|
|
3021
|
-
isFirst: s,
|
|
3022
|
-
isLast: l
|
|
3023
|
-
}), (e, t) => (x(), c("div", Bi, [E(e.$slots, "default")]));
|
|
3024
|
-
}
|
|
3025
|
-
}), Hi = ["aria-label"], Ui = /* @__PURE__ */ f({
|
|
3026
|
-
__name: "UidWizardStep",
|
|
3027
|
-
props: {
|
|
3028
|
-
index: {},
|
|
3029
|
-
validate: {
|
|
3030
|
-
type: Function,
|
|
3031
|
-
default: void 0
|
|
2934
|
+
function w(e) {
|
|
2935
|
+
let t = e.target.value;
|
|
2936
|
+
if (t === "" || t === "-") {
|
|
2937
|
+
b(null);
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
let n = Number(t);
|
|
2941
|
+
Number.isNaN(n) || b(y(n));
|
|
3032
2942
|
}
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
}
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
2943
|
+
function T(e) {
|
|
2944
|
+
if (o.value !== null) {
|
|
2945
|
+
let e = y(v(o.value));
|
|
2946
|
+
e !== o.value && b(e);
|
|
2947
|
+
}
|
|
2948
|
+
i("blur", e);
|
|
2949
|
+
}
|
|
2950
|
+
function E(e) {
|
|
2951
|
+
e.key === "ArrowUp" ? (e.preventDefault(), S()) : e.key === "ArrowDown" && (e.preventDefault(), C());
|
|
2952
|
+
}
|
|
2953
|
+
let D = a(() => o.value === null ? "" : String(o.value));
|
|
2954
|
+
return (n, r) => (x(), c("div", { class: _(["uid-number-input", [
|
|
2955
|
+
`uid-number-input--${t.size}`,
|
|
2956
|
+
p.value && "uid-number-input--error",
|
|
2957
|
+
t.disabled && "uid-number-input--disabled",
|
|
2958
|
+
t.readonly && "uid-number-input--readonly",
|
|
2959
|
+
t.centered && "uid-number-input--centered"
|
|
2960
|
+
]]) }, [
|
|
2961
|
+
t.label ? (x(), c("label", {
|
|
2962
|
+
key: 0,
|
|
2963
|
+
for: j(f),
|
|
2964
|
+
class: "uid-number-input__label"
|
|
2965
|
+
}, [u(k(t.label) + " ", 1), t.required ? (x(), c("span", Ii, "*")) : s("", !0)], 8, Fi)) : s("", !0),
|
|
2966
|
+
l("div", Li, [
|
|
2967
|
+
t.controls ? (x(), c("button", {
|
|
2968
|
+
key: 0,
|
|
2969
|
+
type: "button",
|
|
2970
|
+
class: "uid-number-input__btn uid-number-input__btn--prefix",
|
|
2971
|
+
disabled: t.disabled || t.readonly || h.value,
|
|
2972
|
+
"aria-label": `Уменьшить на ${t.step}`,
|
|
2973
|
+
tabindex: "-1",
|
|
2974
|
+
onClick: C
|
|
2975
|
+
}, [d(e, {
|
|
2976
|
+
icon: j(se),
|
|
2977
|
+
size: 14
|
|
2978
|
+
}, null, 8, ["icon"])], 8, Ri)) : s("", !0),
|
|
2979
|
+
l("input", {
|
|
2980
|
+
id: j(f),
|
|
2981
|
+
class: "uid-number-input__input",
|
|
2982
|
+
type: "number",
|
|
2983
|
+
inputmode: "decimal",
|
|
2984
|
+
name: t.name,
|
|
2985
|
+
placeholder: t.placeholder,
|
|
2986
|
+
disabled: t.disabled,
|
|
2987
|
+
readonly: t.readonly,
|
|
2988
|
+
required: t.required,
|
|
2989
|
+
min: t.min,
|
|
2990
|
+
max: t.max,
|
|
2991
|
+
step: t.step,
|
|
2992
|
+
value: D.value,
|
|
2993
|
+
"aria-invalid": p.value ? "true" : void 0,
|
|
2994
|
+
"aria-describedby": m.value ? `${j(f)}-hint` : void 0,
|
|
2995
|
+
onInput: w,
|
|
2996
|
+
onBlur: T,
|
|
2997
|
+
onFocus: r[0] ||= (e) => i("focus", e),
|
|
2998
|
+
onKeydown: E
|
|
2999
|
+
}, null, 40, zi),
|
|
3000
|
+
t.controls ? (x(), c("button", {
|
|
3001
|
+
key: 1,
|
|
3002
|
+
type: "button",
|
|
3003
|
+
class: "uid-number-input__btn",
|
|
3004
|
+
disabled: t.disabled || t.readonly || g.value,
|
|
3005
|
+
"aria-label": `Увеличить на ${t.step}`,
|
|
3006
|
+
tabindex: "-1",
|
|
3007
|
+
onClick: S
|
|
3008
|
+
}, [d(e, {
|
|
3009
|
+
icon: j(ce),
|
|
3010
|
+
size: 14
|
|
3011
|
+
}, null, 8, ["icon"])], 8, Bi)) : s("", !0)
|
|
3012
|
+
]),
|
|
3013
|
+
m.value ? (x(), c("p", {
|
|
3014
|
+
key: 1,
|
|
3015
|
+
id: `${j(f)}-hint`,
|
|
3016
|
+
class: _(["uid-number-input__hint", p.value && "uid-number-input__hint--error"])
|
|
3017
|
+
}, k(m.value), 11, Vi)) : s("", !0)
|
|
3018
|
+
], 2));
|
|
3047
3019
|
}
|
|
3048
|
-
}),
|
|
3020
|
+
}), Ui = ["aria-expanded", "aria-disabled"], Wi = {
|
|
3049
3021
|
key: 0,
|
|
3050
|
-
class: "uid-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3022
|
+
class: "uid-timepicker__panel",
|
|
3023
|
+
role: "dialog",
|
|
3024
|
+
"aria-label": "Выбор времени"
|
|
3025
|
+
}, Gi = { class: "uid-timepicker__columns" }, Ki = ["onClick"], qi = ["onClick"], Ji = ["onClick"], Yi = /* @__PURE__ */ f({
|
|
3026
|
+
__name: "UidTimePicker",
|
|
3027
|
+
props: /* @__PURE__ */ m({
|
|
3028
|
+
step: { default: 5 },
|
|
3029
|
+
withSeconds: {
|
|
3030
|
+
type: Boolean,
|
|
3031
|
+
default: !1
|
|
3032
|
+
},
|
|
3033
|
+
hour12: {
|
|
3034
|
+
type: Boolean,
|
|
3035
|
+
default: !1
|
|
3036
|
+
},
|
|
3037
|
+
disabled: {
|
|
3038
|
+
type: Boolean,
|
|
3039
|
+
default: !1
|
|
3040
|
+
},
|
|
3041
|
+
clearable: {
|
|
3042
|
+
type: Boolean,
|
|
3043
|
+
default: !0
|
|
3044
|
+
},
|
|
3045
|
+
placeholder: { default: "Выберите время" }
|
|
3046
|
+
}, {
|
|
3047
|
+
modelValue: { default: null },
|
|
3048
|
+
modelModifiers: {}
|
|
3049
|
+
}),
|
|
3050
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
3051
|
+
setup(n, { emit: i }) {
|
|
3052
|
+
let o = n, u = i, f = N(n, "modelValue"), p = w(!1), m = w(null), h = w(null), v = w(null), y = w(null), S = w(null);
|
|
3053
|
+
function C(e) {
|
|
3054
|
+
if (!e) return {
|
|
3055
|
+
h: 0,
|
|
3056
|
+
m: 0,
|
|
3057
|
+
s: 0
|
|
3058
|
+
};
|
|
3059
|
+
let [t = "0", n = "0", r = "0"] = e.split(":");
|
|
3060
|
+
return {
|
|
3061
|
+
h: Number(t) || 0,
|
|
3062
|
+
m: Number(n) || 0,
|
|
3063
|
+
s: Number(r) || 0
|
|
3064
|
+
};
|
|
3065
|
+
}
|
|
3066
|
+
function E(e) {
|
|
3067
|
+
let t = (e) => String(e).padStart(2, "0");
|
|
3068
|
+
return o.withSeconds ? `${t(e.h)}:${t(e.m)}:${t(e.s)}` : `${t(e.h)}:${t(e.m)}`;
|
|
3069
|
+
}
|
|
3070
|
+
let D = w(C(f.value));
|
|
3071
|
+
L(() => f.value, (e) => {
|
|
3072
|
+
D.value = C(e);
|
|
3073
|
+
});
|
|
3074
|
+
let O = a(() => o.hour12 ? Array.from({ length: 12 }, (e, t) => t + 1) : Array.from({ length: 24 }, (e, t) => t)), A = a(() => Array.from({ length: Math.ceil(60 / o.step) }, (e, t) => t * o.step)), M = a(() => Array.from({ length: Math.ceil(60 / o.step) }, (e, t) => t * o.step)), P = a(() => {
|
|
3075
|
+
if (!f.value) return "";
|
|
3076
|
+
let e = C(f.value);
|
|
3077
|
+
if (!o.hour12) return E(e);
|
|
3078
|
+
let t = e.h >= 12 ? "PM" : "AM", n = e.h % 12 || 12, r = (e) => String(e).padStart(2, "0");
|
|
3079
|
+
return o.withSeconds ? `${r(n)}:${r(e.m)}:${r(e.s)} ${t}` : `${r(n)}:${r(e.m)} ${t}`;
|
|
3080
|
+
});
|
|
3081
|
+
function F(e) {
|
|
3082
|
+
return String(e).padStart(2, "0");
|
|
3083
|
+
}
|
|
3084
|
+
function I() {
|
|
3085
|
+
o.disabled || (D.value = C(f.value), p.value = !0);
|
|
3086
|
+
}
|
|
3087
|
+
function z() {
|
|
3088
|
+
p.value = !1;
|
|
3089
|
+
}
|
|
3090
|
+
function B() {
|
|
3091
|
+
p.value ? z() : I();
|
|
3092
|
+
}
|
|
3093
|
+
function V(e) {
|
|
3094
|
+
D.value = {
|
|
3095
|
+
...D.value,
|
|
3096
|
+
h: e
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
function H(e) {
|
|
3100
|
+
D.value = {
|
|
3101
|
+
...D.value,
|
|
3102
|
+
m: e
|
|
3103
|
+
};
|
|
3104
|
+
}
|
|
3105
|
+
function U(e) {
|
|
3106
|
+
D.value = {
|
|
3107
|
+
...D.value,
|
|
3108
|
+
s: e
|
|
3109
|
+
};
|
|
3110
|
+
}
|
|
3111
|
+
function W() {
|
|
3112
|
+
let e = E(D.value);
|
|
3113
|
+
f.value = e, u("change", e), z(), h.value?.focus();
|
|
3114
|
+
}
|
|
3115
|
+
function G() {
|
|
3116
|
+
let e = /* @__PURE__ */ new Date(), t = o.step;
|
|
3117
|
+
D.value = {
|
|
3118
|
+
h: e.getHours(),
|
|
3119
|
+
m: Math.floor(e.getMinutes() / t) * t,
|
|
3120
|
+
s: o.withSeconds ? Math.floor(e.getSeconds() / t) * t : 0
|
|
3121
|
+
};
|
|
3122
|
+
}
|
|
3123
|
+
function ee(e) {
|
|
3124
|
+
e.stopPropagation(), f.value = null, u("change", null);
|
|
3125
|
+
}
|
|
3126
|
+
function K(e) {
|
|
3127
|
+
let t = e.target;
|
|
3128
|
+
m.value?.contains(t) || z();
|
|
3129
|
+
}
|
|
3130
|
+
function q(e) {
|
|
3131
|
+
e.key === "Enter" || e.key === " " ? (e.preventDefault(), B()) : e.key === "Escape" && z();
|
|
3132
|
+
}
|
|
3133
|
+
function J() {
|
|
3134
|
+
g(() => {
|
|
3135
|
+
let e = (e, t, n) => {
|
|
3136
|
+
if (!e) return;
|
|
3137
|
+
let r = n.indexOf(t);
|
|
3138
|
+
if (r < 0) return;
|
|
3139
|
+
let i = e.querySelectorAll(".uid-timepicker__cell")[r];
|
|
3140
|
+
i && (e.scrollTop = i.offsetTop - e.clientHeight / 2 + i.clientHeight / 2);
|
|
3141
|
+
};
|
|
3142
|
+
e(v.value, D.value.h, O.value), e(y.value, D.value.m, A.value), o.withSeconds && e(S.value, D.value.s, M.value);
|
|
3143
|
+
});
|
|
3144
|
+
}
|
|
3145
|
+
return L(p, (e) => {
|
|
3146
|
+
e ? (document.addEventListener("pointerdown", K), J()) : document.removeEventListener("pointerdown", K);
|
|
3147
|
+
}), b(() => document.removeEventListener("pointerdown", K)), (i, a) => (x(), c("div", {
|
|
3148
|
+
ref_key: "containerRef",
|
|
3149
|
+
ref: m,
|
|
3150
|
+
class: _(["uid-timepicker", {
|
|
3151
|
+
"uid-timepicker--open": p.value,
|
|
3152
|
+
"uid-timepicker--disabled": n.disabled
|
|
3153
|
+
}])
|
|
3154
|
+
}, [l("div", {
|
|
3155
|
+
ref_key: "triggerRef",
|
|
3156
|
+
ref: h,
|
|
3157
|
+
class: "uid-timepicker__trigger",
|
|
3158
|
+
tabindex: "0",
|
|
3159
|
+
"aria-expanded": p.value,
|
|
3160
|
+
"aria-disabled": n.disabled,
|
|
3161
|
+
onClick: B,
|
|
3162
|
+
onKeydown: q
|
|
3163
|
+
}, [
|
|
3164
|
+
d(e, {
|
|
3165
|
+
icon: j(ne),
|
|
3166
|
+
size: 16,
|
|
3167
|
+
class: "uid-timepicker__icon",
|
|
3168
|
+
"aria-hidden": "true"
|
|
3169
|
+
}, null, 8, ["icon"]),
|
|
3170
|
+
l("span", { class: _(["uid-timepicker__value", { "uid-timepicker__value--placeholder": !f.value }]) }, k(f.value ? P.value : n.placeholder), 3),
|
|
3171
|
+
n.clearable && f.value ? (x(), c("button", {
|
|
3172
|
+
key: 0,
|
|
3173
|
+
type: "button",
|
|
3174
|
+
class: "uid-timepicker__clear",
|
|
3175
|
+
"aria-label": "Очистить",
|
|
3176
|
+
onClick: ee
|
|
3177
|
+
}, " × ")) : s("", !0)
|
|
3178
|
+
], 40, Ui), d(r, { name: "uid-timepicker-panel" }, {
|
|
3179
|
+
default: R(() => [p.value ? (x(), c("div", Wi, [l("div", Gi, [
|
|
3180
|
+
l("div", {
|
|
3181
|
+
ref_key: "hourColRef",
|
|
3182
|
+
ref: v,
|
|
3183
|
+
class: "uid-timepicker__column"
|
|
3184
|
+
}, [(x(!0), c(t, null, T(O.value, (e) => (x(), c("button", {
|
|
3185
|
+
key: e,
|
|
3186
|
+
type: "button",
|
|
3187
|
+
class: _(["uid-timepicker__cell", { "uid-timepicker__cell--selected": D.value.h === e }]),
|
|
3188
|
+
onClick: (t) => V(e)
|
|
3189
|
+
}, k(F(e)), 11, Ki))), 128))], 512),
|
|
3190
|
+
l("div", {
|
|
3191
|
+
ref_key: "minuteColRef",
|
|
3192
|
+
ref: y,
|
|
3193
|
+
class: "uid-timepicker__column"
|
|
3194
|
+
}, [(x(!0), c(t, null, T(A.value, (e) => (x(), c("button", {
|
|
3195
|
+
key: e,
|
|
3196
|
+
type: "button",
|
|
3197
|
+
class: _(["uid-timepicker__cell", { "uid-timepicker__cell--selected": D.value.m === e }]),
|
|
3198
|
+
onClick: (t) => H(e)
|
|
3199
|
+
}, k(F(e)), 11, qi))), 128))], 512),
|
|
3200
|
+
n.withSeconds ? (x(), c("div", {
|
|
3201
|
+
key: 0,
|
|
3202
|
+
ref_key: "secondColRef",
|
|
3203
|
+
ref: S,
|
|
3204
|
+
class: "uid-timepicker__column"
|
|
3205
|
+
}, [(x(!0), c(t, null, T(M.value, (e) => (x(), c("button", {
|
|
3206
|
+
key: e,
|
|
3207
|
+
type: "button",
|
|
3208
|
+
class: _(["uid-timepicker__cell", { "uid-timepicker__cell--selected": D.value.s === e }]),
|
|
3209
|
+
onClick: (t) => U(e)
|
|
3210
|
+
}, k(F(e)), 11, Ji))), 128))], 512)) : s("", !0)
|
|
3211
|
+
]), l("div", { class: "uid-timepicker__footer" }, [l("button", {
|
|
3212
|
+
type: "button",
|
|
3213
|
+
class: "uid-timepicker__btn",
|
|
3214
|
+
onClick: G
|
|
3215
|
+
}, " Сейчас "), l("button", {
|
|
3216
|
+
type: "button",
|
|
3217
|
+
class: "uid-timepicker__btn uid-timepicker__btn--primary",
|
|
3218
|
+
onClick: W
|
|
3219
|
+
}, " Выбрать ")])])) : s("", !0)]),
|
|
3220
|
+
_: 1
|
|
3221
|
+
})], 2));
|
|
3222
|
+
}
|
|
3223
|
+
}), Xi = ["aria-expanded", "aria-disabled"], Zi = {
|
|
3224
|
+
key: 0,
|
|
3225
|
+
class: "uid-daterange__panel",
|
|
3226
|
+
role: "dialog",
|
|
3227
|
+
"aria-label": "Выбор диапазона дат"
|
|
3228
|
+
}, Qi = { class: "uid-daterange__months" }, $i = { class: "uid-daterange__month" }, ea = { class: "uid-daterange__nav" }, ta = { class: "uid-daterange__month-label" }, na = { class: "uid-daterange__grid" }, ra = [
|
|
3229
|
+
"disabled",
|
|
3230
|
+
"onClick",
|
|
3231
|
+
"onMouseenter"
|
|
3232
|
+
], ia = { class: "uid-daterange__month" }, aa = { class: "uid-daterange__nav" }, oa = { class: "uid-daterange__month-label" }, sa = { class: "uid-daterange__grid" }, ca = [
|
|
3233
|
+
"disabled",
|
|
3234
|
+
"onClick",
|
|
3235
|
+
"onMouseenter"
|
|
3236
|
+
], la = { class: "uid-daterange__footer" }, ua = /* @__PURE__ */ f({
|
|
3237
|
+
__name: "UidDateRangePicker",
|
|
3238
|
+
props: /* @__PURE__ */ m({
|
|
3239
|
+
min: { default: void 0 },
|
|
3240
|
+
max: { default: void 0 },
|
|
3241
|
+
disabled: {
|
|
3242
|
+
type: Boolean,
|
|
3243
|
+
default: !1
|
|
3244
|
+
},
|
|
3245
|
+
clearable: {
|
|
3246
|
+
type: Boolean,
|
|
3247
|
+
default: !0
|
|
3248
|
+
},
|
|
3249
|
+
placeholder: { default: "Выберите диапазон" },
|
|
3250
|
+
format: {
|
|
3251
|
+
type: Function,
|
|
3252
|
+
default: void 0
|
|
3253
|
+
}
|
|
3254
|
+
}, {
|
|
3255
|
+
modelValue: { default: () => ({
|
|
3256
|
+
start: null,
|
|
3257
|
+
end: null
|
|
3258
|
+
}) },
|
|
3259
|
+
modelModifiers: {}
|
|
3260
|
+
}),
|
|
3261
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
3262
|
+
setup(n, { emit: i }) {
|
|
3263
|
+
let o = n, u = i, f = N(n, "modelValue"), p = w(!1), m = w(null), h = w(null), g = /* @__PURE__ */ new Date(), v = w(g.getFullYear()), y = w(g.getMonth()), S = w(null), C = w(null), E = [
|
|
3264
|
+
"Январь",
|
|
3265
|
+
"Февраль",
|
|
3266
|
+
"Март",
|
|
3267
|
+
"Апрель",
|
|
3268
|
+
"Май",
|
|
3269
|
+
"Июнь",
|
|
3270
|
+
"Июль",
|
|
3271
|
+
"Август",
|
|
3272
|
+
"Сентябрь",
|
|
3273
|
+
"Октябрь",
|
|
3274
|
+
"Ноябрь",
|
|
3275
|
+
"Декабрь"
|
|
3276
|
+
], D = [
|
|
3277
|
+
"Пн",
|
|
3278
|
+
"Вт",
|
|
3279
|
+
"Ср",
|
|
3280
|
+
"Чт",
|
|
3281
|
+
"Пт",
|
|
3282
|
+
"Сб",
|
|
3283
|
+
"Вс"
|
|
3284
|
+
];
|
|
3285
|
+
function O(e) {
|
|
3286
|
+
return /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
3287
|
+
}
|
|
3288
|
+
function A(e) {
|
|
3289
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
3290
|
+
}
|
|
3291
|
+
function M(e) {
|
|
3292
|
+
if (o.format) return o.format(O(e));
|
|
3293
|
+
let t = O(e);
|
|
3294
|
+
return `${String(t.getDate()).padStart(2, "0")}.${String(t.getMonth() + 1).padStart(2, "0")}.${t.getFullYear()}`;
|
|
3295
|
+
}
|
|
3296
|
+
let P = a(() => !f.value.start && !f.value.end ? "" : `${f.value.start ? M(f.value.start) : "..."} — ${f.value.end ? M(f.value.end) : "..."}`);
|
|
3297
|
+
function F(e, t, n) {
|
|
3298
|
+
let r = new Date(e, t, 1), i = new Date(e, t + 1, 0), a = (r.getDay() + 6) % 7, o = [];
|
|
3299
|
+
for (let r = a; r > 0; r--) {
|
|
3300
|
+
let i = new Date(e, t, 1 - r);
|
|
3301
|
+
o.push({
|
|
3302
|
+
date: i,
|
|
3303
|
+
iso: A(i),
|
|
3304
|
+
current: !1,
|
|
3305
|
+
monthOffset: n
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3308
|
+
for (let r = 1; r <= i.getDate(); r++) {
|
|
3309
|
+
let i = new Date(e, t, r);
|
|
3310
|
+
o.push({
|
|
3311
|
+
date: i,
|
|
3312
|
+
iso: A(i),
|
|
3313
|
+
current: !0,
|
|
3314
|
+
monthOffset: n
|
|
3315
|
+
});
|
|
3316
|
+
}
|
|
3317
|
+
let s = 1;
|
|
3318
|
+
for (; o.length < 42;) {
|
|
3319
|
+
let r = new Date(e, t + 1, s++);
|
|
3320
|
+
o.push({
|
|
3321
|
+
date: r,
|
|
3322
|
+
iso: A(r),
|
|
3323
|
+
current: !1,
|
|
3324
|
+
monthOffset: n
|
|
3325
|
+
});
|
|
3326
|
+
}
|
|
3327
|
+
return o;
|
|
3328
|
+
}
|
|
3329
|
+
let I = a(() => F(v.value, y.value, 0)), z = a(() => {
|
|
3330
|
+
let e = y.value === 11 ? 0 : y.value + 1;
|
|
3331
|
+
return F(y.value === 11 ? v.value + 1 : v.value, e, 1);
|
|
3332
|
+
}), B = a(() => `${E[y.value]} ${v.value}`), V = a(() => {
|
|
3333
|
+
let e = y.value === 11 ? 0 : y.value + 1, t = y.value === 11 ? v.value + 1 : v.value;
|
|
3334
|
+
return `${E[e]} ${t}`;
|
|
3335
|
+
}), H = a(() => A(g));
|
|
3336
|
+
function U(e) {
|
|
3337
|
+
return !!(o.min && e < o.min || o.max && e > o.max);
|
|
3338
|
+
}
|
|
3339
|
+
function W(e) {
|
|
3340
|
+
let t = S.value ?? f.value.start, n = S.value ? C.value : f.value.end;
|
|
3341
|
+
if (!t || !n) return !1;
|
|
3342
|
+
let [r, i] = t <= n ? [t, n] : [n, t];
|
|
3343
|
+
return e > r && e < i;
|
|
3344
|
+
}
|
|
3345
|
+
function G(e) {
|
|
3346
|
+
let t = S.value ?? f.value.start;
|
|
3347
|
+
return t ? S.value && C.value ? e === (t <= C.value ? t : C.value) : e === t : !1;
|
|
3348
|
+
}
|
|
3349
|
+
function ee(e) {
|
|
3350
|
+
if (S.value && C.value) {
|
|
3351
|
+
let t = S.value;
|
|
3352
|
+
return e === (t <= C.value ? C.value : t);
|
|
3353
|
+
}
|
|
3354
|
+
return e === f.value.end;
|
|
3355
|
+
}
|
|
3356
|
+
function q() {
|
|
3357
|
+
if (!o.disabled) {
|
|
3358
|
+
if (S.value = null, C.value = null, f.value.start) {
|
|
3359
|
+
let e = O(f.value.start);
|
|
3360
|
+
v.value = e.getFullYear(), y.value = e.getMonth();
|
|
3361
|
+
}
|
|
3362
|
+
p.value = !0;
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
function J() {
|
|
3366
|
+
p.value = !1, S.value = null, C.value = null;
|
|
3367
|
+
}
|
|
3368
|
+
function te() {
|
|
3369
|
+
p.value ? J() : q();
|
|
3370
|
+
}
|
|
3371
|
+
function ne(e) {
|
|
3372
|
+
if (U(e.iso) || !e.current) return;
|
|
3373
|
+
if (!S.value) {
|
|
3374
|
+
S.value = e.iso;
|
|
3375
|
+
return;
|
|
3376
|
+
}
|
|
3377
|
+
let [t, n] = S.value <= e.iso ? [S.value, e.iso] : [e.iso, S.value], r = {
|
|
3378
|
+
start: t,
|
|
3379
|
+
end: n
|
|
3380
|
+
};
|
|
3381
|
+
f.value = r, u("change", r), J(), h.value?.focus();
|
|
3382
|
+
}
|
|
3383
|
+
function re(e) {
|
|
3384
|
+
S.value && (C.value = e);
|
|
3385
|
+
}
|
|
3386
|
+
function ie() {
|
|
3387
|
+
y.value === 0 ? (y.value = 11, v.value--) : y.value--;
|
|
3388
|
+
}
|
|
3389
|
+
function ae() {
|
|
3390
|
+
y.value === 11 ? (y.value = 0, v.value++) : y.value++;
|
|
3391
|
+
}
|
|
3392
|
+
function oe(e) {
|
|
3393
|
+
e.stopPropagation();
|
|
3394
|
+
let t = {
|
|
3395
|
+
start: null,
|
|
3396
|
+
end: null
|
|
3397
|
+
};
|
|
3398
|
+
f.value = t, u("change", t);
|
|
3399
|
+
}
|
|
3400
|
+
function se(e) {
|
|
3401
|
+
let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
|
|
3402
|
+
n.setDate(t.getDate() - e + 1);
|
|
3403
|
+
let r = {
|
|
3404
|
+
start: A(n),
|
|
3405
|
+
end: A(t)
|
|
3406
|
+
};
|
|
3407
|
+
f.value = r, u("change", r), J();
|
|
3408
|
+
}
|
|
3409
|
+
function ce(e) {
|
|
3410
|
+
let t = e.target;
|
|
3411
|
+
m.value?.contains(t) || J();
|
|
3412
|
+
}
|
|
3413
|
+
L(p, (e) => {
|
|
3414
|
+
e ? document.addEventListener("pointerdown", ce) : document.removeEventListener("pointerdown", ce);
|
|
3415
|
+
});
|
|
3416
|
+
function le(e) {
|
|
3417
|
+
e.key === "Enter" || e.key === " " ? (e.preventDefault(), te()) : e.key === "Escape" && J();
|
|
3418
|
+
}
|
|
3419
|
+
return b(() => document.removeEventListener("pointerdown", ce)), (i, a) => (x(), c("div", {
|
|
3420
|
+
ref_key: "containerRef",
|
|
3421
|
+
ref: m,
|
|
3422
|
+
class: _(["uid-daterange", {
|
|
3423
|
+
"uid-daterange--open": p.value,
|
|
3424
|
+
"uid-daterange--disabled": n.disabled
|
|
3425
|
+
}])
|
|
3426
|
+
}, [l("div", {
|
|
3427
|
+
ref_key: "triggerRef",
|
|
3428
|
+
ref: h,
|
|
3429
|
+
class: "uid-daterange__trigger",
|
|
3430
|
+
tabindex: "0",
|
|
3431
|
+
"aria-expanded": p.value,
|
|
3432
|
+
"aria-disabled": n.disabled,
|
|
3433
|
+
onClick: te,
|
|
3434
|
+
onKeydown: le
|
|
3435
|
+
}, [
|
|
3436
|
+
d(e, {
|
|
3437
|
+
icon: j(K),
|
|
3438
|
+
size: 16,
|
|
3439
|
+
class: "uid-daterange__icon",
|
|
3440
|
+
"aria-hidden": "true"
|
|
3441
|
+
}, null, 8, ["icon"]),
|
|
3442
|
+
l("span", { class: _(["uid-daterange__value", { "uid-daterange__value--placeholder": !f.value.start && !f.value.end }]) }, k(P.value || n.placeholder), 3),
|
|
3443
|
+
n.clearable && (f.value.start || f.value.end) ? (x(), c("button", {
|
|
3444
|
+
key: 0,
|
|
3445
|
+
type: "button",
|
|
3446
|
+
class: "uid-daterange__clear",
|
|
3447
|
+
"aria-label": "Очистить",
|
|
3448
|
+
onClick: oe
|
|
3449
|
+
}, " × ")) : s("", !0)
|
|
3450
|
+
], 40, Xi), d(r, { name: "uid-daterange-panel" }, {
|
|
3451
|
+
default: R(() => [p.value ? (x(), c("div", Zi, [l("div", Qi, [l("div", $i, [l("div", ea, [
|
|
3452
|
+
l("button", {
|
|
3453
|
+
type: "button",
|
|
3454
|
+
class: "uid-daterange__nav-btn uid-daterange__nav-btn--prev",
|
|
3455
|
+
"aria-label": "Предыдущий месяц",
|
|
3456
|
+
onClick: ie
|
|
3457
|
+
}, [d(e, {
|
|
3458
|
+
icon: j(Y),
|
|
3459
|
+
size: 16
|
|
3460
|
+
}, null, 8, ["icon"])]),
|
|
3461
|
+
l("span", ta, k(B.value), 1),
|
|
3462
|
+
l("button", {
|
|
3463
|
+
type: "button",
|
|
3464
|
+
class: "uid-daterange__nav-btn uid-daterange__nav-btn--next",
|
|
3465
|
+
"aria-label": "Следующий месяц",
|
|
3466
|
+
onClick: ae
|
|
3467
|
+
}, [d(e, {
|
|
3468
|
+
icon: j(X),
|
|
3469
|
+
size: 16
|
|
3470
|
+
}, null, 8, ["icon"])])
|
|
3471
|
+
]), l("div", na, [(x(), c(t, null, T(D, (e) => l("span", {
|
|
3472
|
+
key: e,
|
|
3473
|
+
class: "uid-daterange__weekday"
|
|
3474
|
+
}, k(e), 1)), 64)), (x(!0), c(t, null, T(I.value, (e) => (x(), c("button", {
|
|
3475
|
+
key: e.iso,
|
|
3476
|
+
type: "button",
|
|
3477
|
+
class: _(["uid-daterange__day", {
|
|
3478
|
+
"uid-daterange__day--other": !e.current,
|
|
3479
|
+
"uid-daterange__day--today": e.iso === H.value,
|
|
3480
|
+
"uid-daterange__day--start": G(e.iso),
|
|
3481
|
+
"uid-daterange__day--end": ee(e.iso),
|
|
3482
|
+
"uid-daterange__day--in-range": W(e.iso),
|
|
3483
|
+
"uid-daterange__day--disabled": U(e.iso)
|
|
3484
|
+
}]),
|
|
3485
|
+
disabled: U(e.iso) || !e.current,
|
|
3486
|
+
onClick: (t) => ne(e),
|
|
3487
|
+
onMouseenter: (t) => re(e.iso)
|
|
3488
|
+
}, k(e.date.getDate()), 43, ra))), 128))])]), l("div", ia, [l("div", aa, [
|
|
3489
|
+
l("button", {
|
|
3490
|
+
type: "button",
|
|
3491
|
+
class: "uid-daterange__nav-btn uid-daterange__nav-btn--prev",
|
|
3492
|
+
"aria-label": "Предыдущий месяц",
|
|
3493
|
+
onClick: ie
|
|
3494
|
+
}, [d(e, {
|
|
3495
|
+
icon: j(Y),
|
|
3496
|
+
size: 16
|
|
3497
|
+
}, null, 8, ["icon"])]),
|
|
3498
|
+
l("span", oa, k(V.value), 1),
|
|
3499
|
+
l("button", {
|
|
3500
|
+
type: "button",
|
|
3501
|
+
class: "uid-daterange__nav-btn uid-daterange__nav-btn--next",
|
|
3502
|
+
"aria-label": "Следующий месяц",
|
|
3503
|
+
onClick: ae
|
|
3504
|
+
}, [d(e, {
|
|
3505
|
+
icon: j(X),
|
|
3506
|
+
size: 16
|
|
3507
|
+
}, null, 8, ["icon"])])
|
|
3508
|
+
]), l("div", sa, [(x(), c(t, null, T(D, (e) => l("span", {
|
|
3509
|
+
key: e,
|
|
3510
|
+
class: "uid-daterange__weekday"
|
|
3511
|
+
}, k(e), 1)), 64)), (x(!0), c(t, null, T(z.value, (e) => (x(), c("button", {
|
|
3512
|
+
key: e.iso,
|
|
3513
|
+
type: "button",
|
|
3514
|
+
class: _(["uid-daterange__day", {
|
|
3515
|
+
"uid-daterange__day--other": !e.current,
|
|
3516
|
+
"uid-daterange__day--today": e.iso === H.value,
|
|
3517
|
+
"uid-daterange__day--start": G(e.iso),
|
|
3518
|
+
"uid-daterange__day--end": ee(e.iso),
|
|
3519
|
+
"uid-daterange__day--in-range": W(e.iso),
|
|
3520
|
+
"uid-daterange__day--disabled": U(e.iso)
|
|
3521
|
+
}]),
|
|
3522
|
+
disabled: U(e.iso) || !e.current,
|
|
3523
|
+
onClick: (t) => ne(e),
|
|
3524
|
+
onMouseenter: (t) => re(e.iso)
|
|
3525
|
+
}, k(e.date.getDate()), 43, ca))), 128))])])]), l("div", la, [
|
|
3526
|
+
l("button", {
|
|
3527
|
+
type: "button",
|
|
3528
|
+
class: "uid-daterange__btn",
|
|
3529
|
+
onClick: a[0] ||= (e) => se(7)
|
|
3530
|
+
}, " 7 дней "),
|
|
3531
|
+
l("button", {
|
|
3532
|
+
type: "button",
|
|
3533
|
+
class: "uid-daterange__btn",
|
|
3534
|
+
onClick: a[1] ||= (e) => se(30)
|
|
3535
|
+
}, " 30 дней "),
|
|
3536
|
+
l("button", {
|
|
3537
|
+
type: "button",
|
|
3538
|
+
class: "uid-daterange__btn",
|
|
3539
|
+
onClick: a[2] ||= (e) => se(90)
|
|
3540
|
+
}, " 90 дней ")
|
|
3541
|
+
])])) : s("", !0)]),
|
|
3542
|
+
_: 1
|
|
3543
|
+
})], 2));
|
|
3544
|
+
}
|
|
3545
|
+
}), da = ["for"], fa = {
|
|
3546
|
+
key: 0,
|
|
3547
|
+
class: "uid-tags-input__required",
|
|
3548
|
+
"aria-hidden": "true"
|
|
3549
|
+
}, pa = ["aria-label", "onClick"], ma = [
|
|
3550
|
+
"id",
|
|
3551
|
+
"placeholder",
|
|
3552
|
+
"disabled",
|
|
3553
|
+
"readonly",
|
|
3554
|
+
"value",
|
|
3555
|
+
"aria-invalid",
|
|
3556
|
+
"aria-describedby"
|
|
3557
|
+
], ha = ["id"], ga = /* @__PURE__ */ f({
|
|
3558
|
+
__name: "UidTagsInput",
|
|
3559
|
+
props: /* @__PURE__ */ m({
|
|
3560
|
+
separators: { default: () => [",", "Enter"] },
|
|
3561
|
+
max: { default: void 0 },
|
|
3562
|
+
unique: {
|
|
3563
|
+
type: Boolean,
|
|
3564
|
+
default: !0
|
|
3565
|
+
},
|
|
3566
|
+
validate: {
|
|
3567
|
+
type: Function,
|
|
3568
|
+
default: void 0
|
|
3569
|
+
},
|
|
3570
|
+
placeholder: {},
|
|
3571
|
+
label: {},
|
|
3572
|
+
hint: {},
|
|
3573
|
+
error: {},
|
|
3574
|
+
required: {
|
|
3575
|
+
type: Boolean,
|
|
3576
|
+
default: !1
|
|
3577
|
+
},
|
|
3578
|
+
disabled: {
|
|
3579
|
+
type: Boolean,
|
|
3580
|
+
default: !1
|
|
3581
|
+
},
|
|
3582
|
+
size: { default: "md" },
|
|
3583
|
+
id: {}
|
|
3584
|
+
}, {
|
|
3585
|
+
modelValue: { default: () => [] },
|
|
3586
|
+
modelModifiers: {}
|
|
3587
|
+
}),
|
|
3588
|
+
emits: /* @__PURE__ */ m(["add", "remove"], ["update:modelValue"]),
|
|
3589
|
+
setup(e, { emit: n }) {
|
|
3590
|
+
let r = e, i = n, o = N(e, "modelValue"), d = w(""), f = w(null), p = r.id ?? M(), m = a(() => !!r.error), h = a(() => r.error || r.hint), g = a(() => r.max !== void 0 && o.value.length >= r.max);
|
|
3591
|
+
function v(e) {
|
|
3592
|
+
return r.validate ? r.validate(e) : !0;
|
|
3593
|
+
}
|
|
3594
|
+
function y() {
|
|
3595
|
+
let e = d.value.trim();
|
|
3596
|
+
if (e && !g.value) {
|
|
3597
|
+
if (r.unique && o.value.includes(e)) {
|
|
3598
|
+
d.value = "";
|
|
3599
|
+
return;
|
|
3600
|
+
}
|
|
3601
|
+
v(e) && (o.value = [...o.value, e], i("add", e), d.value = "");
|
|
3602
|
+
}
|
|
3603
|
+
}
|
|
3604
|
+
function b(e) {
|
|
3605
|
+
let t = o.value[e];
|
|
3606
|
+
o.value = o.value.filter((t, n) => n !== e), i("remove", t, e);
|
|
3607
|
+
}
|
|
3608
|
+
function S(e) {
|
|
3609
|
+
if (r.separators.includes(e.key)) {
|
|
3610
|
+
e.preventDefault(), y();
|
|
3611
|
+
return;
|
|
3612
|
+
}
|
|
3613
|
+
e.key === "Backspace" && d.value === "" && o.value.length > 0 && b(o.value.length - 1);
|
|
3614
|
+
}
|
|
3615
|
+
function C(e) {
|
|
3616
|
+
let t = e.target, n = t.value;
|
|
3617
|
+
for (let e of r.separators) if (e !== "Enter" && n.includes(e)) {
|
|
3618
|
+
let a = n.split(e);
|
|
3619
|
+
n = a.pop() ?? "", t.value = n, d.value = n;
|
|
3620
|
+
for (let e of a) {
|
|
3621
|
+
let t = e.trim();
|
|
3622
|
+
if (t) {
|
|
3623
|
+
if (g.value) break;
|
|
3624
|
+
r.unique && o.value.includes(t) || v(t) && (o.value = [...o.value, t], i("add", t));
|
|
3625
|
+
}
|
|
3626
|
+
}
|
|
3627
|
+
return;
|
|
3628
|
+
}
|
|
3629
|
+
d.value = n;
|
|
3630
|
+
}
|
|
3631
|
+
function E(e) {
|
|
3632
|
+
let t = e.clipboardData?.getData("text");
|
|
3633
|
+
if (!t) return;
|
|
3634
|
+
let n = RegExp(`[${r.separators.filter((e) => e !== "Enter").join("")}\\n]`);
|
|
3635
|
+
if (n.test(t)) {
|
|
3636
|
+
e.preventDefault();
|
|
3637
|
+
for (let e of t.split(n)) {
|
|
3638
|
+
let t = e.trim();
|
|
3639
|
+
if (t) {
|
|
3640
|
+
if (g.value) break;
|
|
3641
|
+
r.unique && o.value.includes(t) || v(t) && (o.value = [...o.value, t], i("add", t));
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
function D() {
|
|
3647
|
+
f.value?.focus();
|
|
3648
|
+
}
|
|
3649
|
+
return (n, r) => (x(), c("div", { class: _(["uid-tags-input", [
|
|
3650
|
+
`uid-tags-input--${e.size}`,
|
|
3651
|
+
m.value && "uid-tags-input--error",
|
|
3652
|
+
e.disabled && "uid-tags-input--disabled"
|
|
3653
|
+
]]) }, [
|
|
3654
|
+
e.label ? (x(), c("label", {
|
|
3655
|
+
key: 0,
|
|
3656
|
+
for: j(p),
|
|
3657
|
+
class: "uid-tags-input__label"
|
|
3658
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", fa, "*")) : s("", !0)], 8, da)) : s("", !0),
|
|
3659
|
+
l("div", {
|
|
3660
|
+
class: "uid-tags-input__control",
|
|
3661
|
+
role: "list",
|
|
3662
|
+
onClick: D
|
|
3663
|
+
}, [(x(!0), c(t, null, T(o.value, (t, n) => (x(), c("span", {
|
|
3664
|
+
key: `${t}-${n}`,
|
|
3665
|
+
class: _(["uid-tags-input__chip", { "uid-tags-input__chip--invalid": !v(t) }]),
|
|
3666
|
+
role: "listitem"
|
|
3667
|
+
}, [l("span", null, k(t), 1), e.disabled ? s("", !0) : (x(), c("button", {
|
|
3668
|
+
key: 0,
|
|
3669
|
+
type: "button",
|
|
3670
|
+
class: "uid-tags-input__chip-remove",
|
|
3671
|
+
"aria-label": `Удалить ${t}`,
|
|
3672
|
+
onClick: B((e) => b(n), ["stop"])
|
|
3673
|
+
}, "×", 8, pa))], 2))), 128)), l("input", {
|
|
3674
|
+
id: j(p),
|
|
3675
|
+
ref_key: "inputRef",
|
|
3676
|
+
ref: f,
|
|
3677
|
+
class: "uid-tags-input__field",
|
|
3678
|
+
type: "text",
|
|
3679
|
+
placeholder: o.value.length === 0 ? e.placeholder : "",
|
|
3680
|
+
disabled: e.disabled,
|
|
3681
|
+
readonly: g.value,
|
|
3682
|
+
value: d.value,
|
|
3683
|
+
"aria-invalid": m.value ? "true" : void 0,
|
|
3684
|
+
"aria-describedby": h.value ? `${j(p)}-hint` : void 0,
|
|
3685
|
+
onInput: C,
|
|
3686
|
+
onKeydown: S,
|
|
3687
|
+
onPaste: E,
|
|
3688
|
+
onBlur: y
|
|
3689
|
+
}, null, 40, ma)]),
|
|
3690
|
+
h.value ? (x(), c("p", {
|
|
3691
|
+
key: 1,
|
|
3692
|
+
id: `${j(p)}-hint`,
|
|
3693
|
+
class: _(["uid-tags-input__hint", m.value && "uid-tags-input__hint--error"])
|
|
3694
|
+
}, k(h.value), 11, ha)) : s("", !0)
|
|
3695
|
+
], 2));
|
|
3696
|
+
}
|
|
3697
|
+
}), _a = ["for"], va = {
|
|
3698
|
+
key: 0,
|
|
3699
|
+
class: "uid-combobox__required",
|
|
3700
|
+
"aria-hidden": "true"
|
|
3701
|
+
}, ya = ["aria-expanded", "aria-controls"], ba = [
|
|
3702
|
+
"id",
|
|
3703
|
+
"placeholder",
|
|
3704
|
+
"disabled",
|
|
3705
|
+
"required",
|
|
3706
|
+
"value",
|
|
3707
|
+
"aria-activedescendant",
|
|
3708
|
+
"aria-invalid"
|
|
3709
|
+
], xa = { class: "uid-combobox__suffix" }, Sa = ["id"], Ca = [
|
|
3710
|
+
"id",
|
|
3711
|
+
"data-active",
|
|
3712
|
+
"aria-selected",
|
|
3713
|
+
"aria-disabled",
|
|
3714
|
+
"onClick",
|
|
3715
|
+
"onMouseenter"
|
|
3716
|
+
], wa = { class: "uid-combobox__option-label" }, Ta = {
|
|
3717
|
+
key: 0,
|
|
3718
|
+
class: "uid-combobox__option-hint"
|
|
3719
|
+
}, Ea = ["id", "data-active"], Da = { class: "uid-combobox__option-label" }, Oa = {
|
|
3720
|
+
key: 2,
|
|
3721
|
+
class: "uid-combobox__empty"
|
|
3722
|
+
}, ka = /* @__PURE__ */ f({
|
|
3723
|
+
__name: "UidCombobox",
|
|
3724
|
+
props: /* @__PURE__ */ m({
|
|
3725
|
+
options: {},
|
|
3726
|
+
placeholder: { default: "Начните вводить..." },
|
|
3727
|
+
disabled: {
|
|
3728
|
+
type: Boolean,
|
|
3729
|
+
default: !1
|
|
3730
|
+
},
|
|
3731
|
+
clearable: {
|
|
3732
|
+
type: Boolean,
|
|
3733
|
+
default: !0
|
|
3734
|
+
},
|
|
3735
|
+
allowCreate: {
|
|
3736
|
+
type: Boolean,
|
|
3737
|
+
default: !1
|
|
3738
|
+
},
|
|
3739
|
+
filter: {
|
|
3740
|
+
type: Function,
|
|
3741
|
+
default: void 0
|
|
3742
|
+
},
|
|
3743
|
+
size: { default: "md" },
|
|
3744
|
+
label: {},
|
|
3745
|
+
hint: {},
|
|
3746
|
+
error: {},
|
|
3747
|
+
required: {
|
|
3748
|
+
type: Boolean,
|
|
3749
|
+
default: !1
|
|
3750
|
+
},
|
|
3751
|
+
emptyText: { default: "Ничего не найдено" },
|
|
3752
|
+
id: {}
|
|
3753
|
+
}, {
|
|
3754
|
+
modelValue: { default: null },
|
|
3755
|
+
modelModifiers: {}
|
|
3756
|
+
}),
|
|
3757
|
+
emits: /* @__PURE__ */ m(["change", "create"], ["update:modelValue"]),
|
|
3758
|
+
setup(n, { emit: r }) {
|
|
3759
|
+
let i = n, f = r, p = N(n, "modelValue"), m = w(!1), h = w(""), v = w(0), y = w(null), S = w(null), C = w(null), E = i.id ?? M(), D = M(), O = a(() => i.options.find((e) => e.value === p.value) ?? null);
|
|
3760
|
+
L(O, (e) => {
|
|
3761
|
+
m.value || (h.value = e?.label ?? "");
|
|
3762
|
+
}, { immediate: !0 });
|
|
3763
|
+
let A = a(() => {
|
|
3764
|
+
let e = h.value.trim().toLowerCase();
|
|
3765
|
+
return e ? i.filter ? i.options.filter((e) => i.filter(e, h.value)) : i.options.filter((t) => t.label.toLowerCase().includes(e)) : i.options;
|
|
3766
|
+
}), P = a(() => i.allowCreate && h.value.trim().length > 0 && !A.value.some((e) => e.label.toLowerCase() === h.value.trim().toLowerCase())), F = a(() => !!i.error), I = a(() => i.error || i.hint);
|
|
3767
|
+
L(h, () => {
|
|
3768
|
+
v.value = 0;
|
|
3769
|
+
});
|
|
3770
|
+
function R() {
|
|
3771
|
+
i.disabled || (m.value = !0);
|
|
3772
|
+
}
|
|
3773
|
+
function z() {
|
|
3774
|
+
m.value = !1, h.value = O.value?.label ?? "";
|
|
3775
|
+
}
|
|
3776
|
+
function B(e) {
|
|
3777
|
+
e.disabled || (p.value = e.value, f("change", e.value), h.value = e.label, m.value = !1, S.value?.blur());
|
|
3778
|
+
}
|
|
3779
|
+
function V() {
|
|
3780
|
+
let e = h.value.trim();
|
|
3781
|
+
e && (f("create", e), m.value = !1);
|
|
3782
|
+
}
|
|
3783
|
+
function H(e) {
|
|
3784
|
+
e.stopPropagation(), p.value = null, f("change", null), h.value = "", S.value?.focus();
|
|
3785
|
+
}
|
|
3786
|
+
function U(e) {
|
|
3787
|
+
h.value = e.target.value, m.value || R();
|
|
3788
|
+
}
|
|
3789
|
+
function W() {
|
|
3790
|
+
R();
|
|
3791
|
+
}
|
|
3792
|
+
function G(e) {
|
|
3793
|
+
if (e.key === "ArrowDown") {
|
|
3794
|
+
if (e.preventDefault(), !m.value) {
|
|
3795
|
+
R();
|
|
3796
|
+
return;
|
|
3797
|
+
}
|
|
3798
|
+
ee();
|
|
3799
|
+
} else if (e.key === "ArrowUp") e.preventDefault(), m.value && K();
|
|
3800
|
+
else if (e.key === "Enter") {
|
|
3801
|
+
if (e.preventDefault(), !m.value) {
|
|
3802
|
+
R();
|
|
3803
|
+
return;
|
|
3804
|
+
}
|
|
3805
|
+
J();
|
|
3806
|
+
} else e.key === "Escape" ? m.value ? z() : S.value?.blur() : e.key === "Tab" && z();
|
|
3807
|
+
}
|
|
3808
|
+
function ee() {
|
|
3809
|
+
let e = A.value.length + +!!P.value;
|
|
3810
|
+
e !== 0 && (v.value = Math.min(v.value + 1, e - 1), Y());
|
|
3811
|
+
}
|
|
3812
|
+
function K() {
|
|
3813
|
+
v.value = Math.max(v.value - 1, 0), Y();
|
|
3814
|
+
}
|
|
3815
|
+
function J() {
|
|
3816
|
+
if (P.value && v.value === A.value.length) {
|
|
3817
|
+
V();
|
|
3818
|
+
return;
|
|
3819
|
+
}
|
|
3820
|
+
let e = A.value[v.value];
|
|
3821
|
+
e && B(e);
|
|
3822
|
+
}
|
|
3823
|
+
function Y() {
|
|
3824
|
+
g(() => {
|
|
3825
|
+
(C.value?.querySelector("[data-active=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
|
|
3826
|
+
});
|
|
3827
|
+
}
|
|
3828
|
+
function X(e) {
|
|
3829
|
+
let t = e.target;
|
|
3830
|
+
y.value?.contains(t) || z();
|
|
3831
|
+
}
|
|
3832
|
+
return L(m, (e) => {
|
|
3833
|
+
e ? (v.value = Math.max(0, A.value.findIndex((e) => e.value === p.value)), document.addEventListener("pointerdown", X)) : document.removeEventListener("pointerdown", X);
|
|
3834
|
+
}), b(() => document.removeEventListener("pointerdown", X)), (r, i) => (x(), c("div", {
|
|
3835
|
+
ref_key: "containerRef",
|
|
3836
|
+
ref: y,
|
|
3837
|
+
class: _(["uid-combobox", [
|
|
3838
|
+
`uid-combobox--${n.size}`,
|
|
3839
|
+
m.value && "uid-combobox--open",
|
|
3840
|
+
n.disabled && "uid-combobox--disabled",
|
|
3841
|
+
F.value && "uid-combobox--error"
|
|
3842
|
+
]])
|
|
3843
|
+
}, [
|
|
3844
|
+
n.label ? (x(), c("label", {
|
|
3845
|
+
key: 0,
|
|
3846
|
+
for: j(E),
|
|
3847
|
+
class: "uid-combobox__label"
|
|
3848
|
+
}, [u(k(n.label) + " ", 1), n.required ? (x(), c("span", va, "*")) : s("", !0)], 8, _a)) : s("", !0),
|
|
3849
|
+
l("div", {
|
|
3850
|
+
class: "uid-combobox__control",
|
|
3851
|
+
role: "combobox",
|
|
3852
|
+
"aria-expanded": m.value,
|
|
3853
|
+
"aria-controls": j(D),
|
|
3854
|
+
"aria-haspopup": "listbox"
|
|
3855
|
+
}, [l("input", {
|
|
3856
|
+
id: j(E),
|
|
3857
|
+
ref_key: "inputRef",
|
|
3858
|
+
ref: S,
|
|
3859
|
+
class: "uid-combobox__field",
|
|
3860
|
+
type: "text",
|
|
3861
|
+
autocomplete: "off",
|
|
3862
|
+
placeholder: n.placeholder,
|
|
3863
|
+
disabled: n.disabled,
|
|
3864
|
+
required: n.required,
|
|
3865
|
+
value: h.value,
|
|
3866
|
+
"aria-autocomplete": "list",
|
|
3867
|
+
"aria-activedescendant": m.value ? `${j(D)}-${v.value}` : void 0,
|
|
3868
|
+
"aria-invalid": F.value ? "true" : void 0,
|
|
3869
|
+
onInput: U,
|
|
3870
|
+
onFocus: W,
|
|
3871
|
+
onKeydown: G
|
|
3872
|
+
}, null, 40, ba), l("div", xa, [n.clearable && p.value !== null ? (x(), c("button", {
|
|
3873
|
+
key: 0,
|
|
3874
|
+
type: "button",
|
|
3875
|
+
class: "uid-combobox__clear",
|
|
3876
|
+
"aria-label": "Очистить",
|
|
3877
|
+
onClick: H
|
|
3878
|
+
}, [d(e, {
|
|
3879
|
+
icon: j(Z),
|
|
3880
|
+
size: 12
|
|
3881
|
+
}, null, 8, ["icon"])])) : s("", !0), d(e, {
|
|
3882
|
+
icon: j(te),
|
|
3883
|
+
size: 16,
|
|
3884
|
+
class: _(["uid-combobox__chevron", { "uid-combobox__chevron--open": m.value }]),
|
|
3885
|
+
"aria-hidden": "true",
|
|
3886
|
+
onClick: R
|
|
3887
|
+
}, null, 8, ["icon", "class"])])], 8, ya),
|
|
3888
|
+
m.value ? (x(), c("div", {
|
|
3889
|
+
key: 1,
|
|
3890
|
+
id: j(D),
|
|
3891
|
+
ref_key: "listRef",
|
|
3892
|
+
ref: C,
|
|
3893
|
+
class: "uid-combobox__dropdown",
|
|
3894
|
+
role: "listbox"
|
|
3895
|
+
}, [
|
|
3896
|
+
A.value.length > 0 ? (x(!0), c(t, { key: 0 }, T(A.value, (t, n) => (x(), c("button", {
|
|
3897
|
+
id: `${j(D)}-${n}`,
|
|
3898
|
+
key: t.value,
|
|
3899
|
+
type: "button",
|
|
3900
|
+
role: "option",
|
|
3901
|
+
class: _(["uid-combobox__option", {
|
|
3902
|
+
"uid-combobox__option--active": n === v.value,
|
|
3903
|
+
"uid-combobox__option--selected": t.value === p.value,
|
|
3904
|
+
"uid-combobox__option--disabled": t.disabled
|
|
3905
|
+
}]),
|
|
3906
|
+
"data-active": n === v.value ? "true" : void 0,
|
|
3907
|
+
"aria-selected": t.value === p.value,
|
|
3908
|
+
"aria-disabled": t.disabled,
|
|
3909
|
+
onClick: (e) => B(t),
|
|
3910
|
+
onMouseenter: (e) => !t.disabled && (v.value = n)
|
|
3911
|
+
}, [
|
|
3912
|
+
l("span", wa, k(t.label), 1),
|
|
3913
|
+
t.hint ? (x(), c("span", Ta, k(t.hint), 1)) : s("", !0),
|
|
3914
|
+
t.value === p.value ? (x(), o(e, {
|
|
3915
|
+
key: 1,
|
|
3916
|
+
icon: j(q),
|
|
3917
|
+
size: 14,
|
|
3918
|
+
class: "uid-combobox__check",
|
|
3919
|
+
"aria-hidden": "true"
|
|
3920
|
+
}, null, 8, ["icon"])) : s("", !0)
|
|
3921
|
+
], 42, Ca))), 128)) : s("", !0),
|
|
3922
|
+
P.value ? (x(), c("button", {
|
|
3923
|
+
key: 1,
|
|
3924
|
+
id: `${j(D)}-${A.value.length}`,
|
|
3925
|
+
type: "button",
|
|
3926
|
+
role: "option",
|
|
3927
|
+
class: _(["uid-combobox__option uid-combobox__create", { "uid-combobox__option--active": v.value === A.value.length }]),
|
|
3928
|
+
"data-active": v.value === A.value.length ? "true" : void 0,
|
|
3929
|
+
onClick: V,
|
|
3930
|
+
onMouseenter: i[0] ||= (e) => v.value = A.value.length
|
|
3931
|
+
}, [l("span", Da, "+ Создать «" + k(h.value) + "»", 1)], 42, Ea)) : s("", !0),
|
|
3932
|
+
A.value.length === 0 && !P.value ? (x(), c("div", Oa, k(n.emptyText), 1)) : s("", !0)
|
|
3933
|
+
], 8, Sa)) : s("", !0),
|
|
3934
|
+
I.value ? (x(), c("p", {
|
|
3935
|
+
key: 2,
|
|
3936
|
+
class: _(["uid-combobox__hint", F.value && "uid-combobox__hint--error"])
|
|
3937
|
+
}, k(I.value), 3)) : s("", !0)
|
|
3938
|
+
], 2));
|
|
3939
|
+
}
|
|
3940
|
+
}), Aa = Symbol("UidTree"), ja = [
|
|
3941
|
+
"aria-expanded",
|
|
3942
|
+
"aria-selected",
|
|
3943
|
+
"aria-disabled"
|
|
3944
|
+
], Ma = ["tabindex"], Na = ["aria-label"], Pa = {
|
|
3945
|
+
key: 1,
|
|
3946
|
+
class: "uid-tree-item__chevron uid-tree-item__chevron--placeholder",
|
|
3947
|
+
"aria-hidden": "true"
|
|
3948
|
+
}, Fa = ["aria-checked"], Ia = {
|
|
3949
|
+
key: 3,
|
|
3950
|
+
class: "uid-tree-item__icon"
|
|
3951
|
+
}, La = { class: "uid-tree-item__label" }, Ra = {
|
|
3952
|
+
key: 0,
|
|
3953
|
+
class: "uid-tree-item__children",
|
|
3954
|
+
role: "group"
|
|
3955
|
+
}, za = /* @__PURE__ */ f({
|
|
3956
|
+
__name: "UidTreeItem",
|
|
3957
|
+
props: {
|
|
3958
|
+
node: {},
|
|
3959
|
+
level: {}
|
|
3960
|
+
},
|
|
3961
|
+
setup(n) {
|
|
3962
|
+
let r = n, i = p(Aa);
|
|
3963
|
+
if (!i) throw Error("UidTreeItem must be used inside UidTree");
|
|
3964
|
+
let u = i, f = a(() => !!r.node.children && r.node.children.length > 0), m = a(() => u.isExpanded(r.node.key)), h = a(() => u.isSelected(r.node.key)), g = a(() => u.isChecked(r.node.key)), y = a(() => u.isIndeterminate(r.node.key)), b = a(() => u.disabled.value || !!r.node.disabled);
|
|
3965
|
+
function S() {
|
|
3966
|
+
b.value || (f.value && u.toggleExpand(r.node.key), u.selectable.value && u.toggleSelect(r.node));
|
|
3967
|
+
}
|
|
3968
|
+
function C(e) {
|
|
3969
|
+
e.stopPropagation(), !b.value && u.toggleExpand(r.node.key);
|
|
3970
|
+
}
|
|
3971
|
+
function w(e) {
|
|
3972
|
+
e.stopPropagation(), !b.value && u.toggleCheck(r.node);
|
|
3973
|
+
}
|
|
3974
|
+
function E(e) {
|
|
3975
|
+
e.key === "ArrowRight" && f.value && !m.value || e.key === "ArrowLeft" && f.value && m.value ? (e.preventDefault(), u.toggleExpand(r.node.key)) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), u.checkable.value ? u.toggleCheck(r.node) : u.selectable.value && u.toggleSelect(r.node));
|
|
3976
|
+
}
|
|
3977
|
+
return (r, i) => {
|
|
3978
|
+
let a = D("UidTreeItem", !0);
|
|
3979
|
+
return x(), c("li", {
|
|
3980
|
+
class: _(["uid-tree-item", {
|
|
3981
|
+
"uid-tree-item--selected": h.value,
|
|
3982
|
+
"uid-tree-item--disabled": b.value,
|
|
3983
|
+
"uid-tree-item--expanded": m.value
|
|
3984
|
+
}]),
|
|
3985
|
+
role: "treeitem",
|
|
3986
|
+
"aria-expanded": f.value ? m.value : void 0,
|
|
3987
|
+
"aria-selected": j(u).selectable.value ? h.value : void 0,
|
|
3988
|
+
"aria-disabled": b.value || void 0
|
|
3989
|
+
}, [l("div", {
|
|
3990
|
+
class: "uid-tree-item__row",
|
|
3991
|
+
style: v({ "--uid-tree-level": n.level }),
|
|
3992
|
+
tabindex: b.value ? -1 : 0,
|
|
3993
|
+
onClick: S,
|
|
3994
|
+
onKeydown: E
|
|
3995
|
+
}, [
|
|
3996
|
+
f.value ? (x(), c("button", {
|
|
3997
|
+
key: 0,
|
|
3998
|
+
type: "button",
|
|
3999
|
+
class: _(["uid-tree-item__chevron", { "uid-tree-item__chevron--open": m.value }]),
|
|
4000
|
+
"aria-label": m.value ? "Свернуть" : "Развернуть",
|
|
4001
|
+
tabindex: "-1",
|
|
4002
|
+
onClick: C
|
|
4003
|
+
}, [d(e, {
|
|
4004
|
+
icon: j(X),
|
|
4005
|
+
size: 14
|
|
4006
|
+
}, null, 8, ["icon"])], 10, Na)) : (x(), c("span", Pa)),
|
|
4007
|
+
j(u).checkable.value ? (x(), c("span", {
|
|
4008
|
+
key: 2,
|
|
4009
|
+
class: _(["uid-tree-item__check", {
|
|
4010
|
+
"uid-tree-item__check--checked": g.value,
|
|
4011
|
+
"uid-tree-item__check--indeterminate": y.value
|
|
4012
|
+
}]),
|
|
4013
|
+
role: "checkbox",
|
|
4014
|
+
"aria-checked": y.value ? "mixed" : g.value,
|
|
4015
|
+
onClick: w
|
|
4016
|
+
}, [g.value && !y.value ? (x(), o(e, {
|
|
4017
|
+
key: 0,
|
|
4018
|
+
icon: j(q),
|
|
4019
|
+
size: 12
|
|
4020
|
+
}, null, 8, ["icon"])) : s("", !0)], 10, Fa)) : s("", !0),
|
|
4021
|
+
n.node.icon ? (x(), c("span", Ia, [d(e, {
|
|
4022
|
+
icon: n.node.icon,
|
|
4023
|
+
size: 16
|
|
4024
|
+
}, null, 8, ["icon"])])) : s("", !0),
|
|
4025
|
+
l("span", La, k(n.node.label), 1)
|
|
4026
|
+
], 44, Ma), f.value && m.value ? (x(), c("ul", Ra, [(x(!0), c(t, null, T(n.node.children, (e) => (x(), o(a, {
|
|
4027
|
+
key: e.key,
|
|
4028
|
+
node: e,
|
|
4029
|
+
level: n.level + 1
|
|
4030
|
+
}, null, 8, ["node", "level"]))), 128))])) : s("", !0)], 10, ja);
|
|
4031
|
+
};
|
|
4032
|
+
}
|
|
4033
|
+
}), Ba = /* @__PURE__ */ f({
|
|
4034
|
+
__name: "UidTreeView",
|
|
4035
|
+
props: /* @__PURE__ */ m({
|
|
4036
|
+
nodes: {},
|
|
4037
|
+
selectable: {
|
|
4038
|
+
type: [String, Boolean],
|
|
4039
|
+
default: "single"
|
|
4040
|
+
},
|
|
4041
|
+
checkable: {
|
|
4042
|
+
type: Boolean,
|
|
4043
|
+
default: !1
|
|
4044
|
+
},
|
|
4045
|
+
disabled: {
|
|
4046
|
+
type: Boolean,
|
|
4047
|
+
default: !1
|
|
4048
|
+
},
|
|
4049
|
+
defaultExpandAll: {
|
|
4050
|
+
type: Boolean,
|
|
4051
|
+
default: !1
|
|
4052
|
+
},
|
|
4053
|
+
showGuides: {
|
|
4054
|
+
type: Boolean,
|
|
4055
|
+
default: !1
|
|
4056
|
+
}
|
|
4057
|
+
}, {
|
|
4058
|
+
expandedKeys: { default: () => [] },
|
|
4059
|
+
expandedKeysModifiers: {},
|
|
4060
|
+
selectedKeys: { default: () => [] },
|
|
4061
|
+
selectedKeysModifiers: {},
|
|
4062
|
+
checkedKeys: { default: () => [] },
|
|
4063
|
+
checkedKeysModifiers: {}
|
|
4064
|
+
}),
|
|
4065
|
+
emits: /* @__PURE__ */ m(["select", "check"], [
|
|
4066
|
+
"update:expandedKeys",
|
|
4067
|
+
"update:selectedKeys",
|
|
4068
|
+
"update:checkedKeys"
|
|
4069
|
+
]),
|
|
4070
|
+
setup(e, { emit: n }) {
|
|
4071
|
+
let r = e, i = n, s = N(e, "expandedKeys"), l = N(e, "selectedKeys"), u = N(e, "checkedKeys");
|
|
4072
|
+
function d(e) {
|
|
4073
|
+
let t = [], n = (e) => {
|
|
4074
|
+
for (let r of e) t.push(r.key), r.children && n(r.children);
|
|
4075
|
+
};
|
|
4076
|
+
return n(e), t;
|
|
4077
|
+
}
|
|
4078
|
+
r.defaultExpandAll && s.value.length === 0 && (s.value = d(r.nodes));
|
|
4079
|
+
let f = a({
|
|
4080
|
+
get: () => new Set(s.value),
|
|
4081
|
+
set: (e) => {
|
|
4082
|
+
s.value = [...e];
|
|
4083
|
+
}
|
|
4084
|
+
}), p = a({
|
|
4085
|
+
get: () => new Set(l.value),
|
|
4086
|
+
set: (e) => {
|
|
4087
|
+
l.value = [...e];
|
|
4088
|
+
}
|
|
4089
|
+
}), m = w(new Set(u.value));
|
|
4090
|
+
L(u, (e) => {
|
|
4091
|
+
m.value = new Set(e);
|
|
4092
|
+
});
|
|
4093
|
+
let h = w(/* @__PURE__ */ new Set());
|
|
4094
|
+
function g(e) {
|
|
4095
|
+
let t = [], n = (e) => {
|
|
4096
|
+
if (e.children) for (let r of e.children) t.push(r.key), n(r);
|
|
4097
|
+
};
|
|
4098
|
+
return n(e), t;
|
|
4099
|
+
}
|
|
4100
|
+
function v() {
|
|
4101
|
+
let e = /* @__PURE__ */ new Set(), t = new Set(m.value), n = (r) => {
|
|
4102
|
+
if (!r.children || r.children.length === 0) {
|
|
4103
|
+
let e = t.has(r.key);
|
|
4104
|
+
return {
|
|
4105
|
+
all: e,
|
|
4106
|
+
some: e
|
|
4107
|
+
};
|
|
4108
|
+
}
|
|
4109
|
+
let i = !0, a = !1;
|
|
4110
|
+
for (let e of r.children) {
|
|
4111
|
+
let t = n(e);
|
|
4112
|
+
t.all || (i = !1), (t.some || t.all) && (a = !0);
|
|
4113
|
+
}
|
|
4114
|
+
return i ? (t.add(r.key), e.delete(r.key)) : a ? (t.delete(r.key), e.add(r.key)) : (t.delete(r.key), e.delete(r.key)), {
|
|
4115
|
+
all: i,
|
|
4116
|
+
some: a
|
|
4117
|
+
};
|
|
4118
|
+
};
|
|
4119
|
+
for (let e of r.nodes) n(e);
|
|
4120
|
+
m.value = t, h.value = e, u.value = [...t];
|
|
4121
|
+
}
|
|
4122
|
+
L(() => r.nodes, v, {
|
|
4123
|
+
immediate: !0,
|
|
4124
|
+
deep: !0
|
|
4125
|
+
}), L(u, () => {
|
|
4126
|
+
[...m.value].sort().join(",") !== [...u.value].sort().join(",") && (m.value = new Set(u.value), v());
|
|
4127
|
+
});
|
|
4128
|
+
function y(e) {
|
|
4129
|
+
let t = new Set(f.value);
|
|
4130
|
+
t.has(e) ? t.delete(e) : t.add(e), f.value = t;
|
|
4131
|
+
}
|
|
4132
|
+
function b(e) {
|
|
4133
|
+
if (r.selectable === !1) return;
|
|
4134
|
+
let t = new Set(p.value);
|
|
4135
|
+
r.selectable === "single" ? t.has(e.key) ? t.delete(e.key) : (t.clear(), t.add(e.key)) : t.has(e.key) ? t.delete(e.key) : t.add(e.key), p.value = t, i("select", e);
|
|
4136
|
+
}
|
|
4137
|
+
function C(e) {
|
|
4138
|
+
let t = m.value.has(e.key), n = new Set(m.value), r = g(e);
|
|
4139
|
+
if (t) {
|
|
4140
|
+
n.delete(e.key);
|
|
4141
|
+
for (let e of r) n.delete(e);
|
|
4142
|
+
} else {
|
|
4143
|
+
n.add(e.key);
|
|
4144
|
+
for (let e of r) n.add(e);
|
|
4145
|
+
}
|
|
4146
|
+
m.value = n, u.value = [...n], v(), i("check", e, !t);
|
|
4147
|
+
}
|
|
4148
|
+
return S(Aa, {
|
|
4149
|
+
selectable: a(() => r.selectable),
|
|
4150
|
+
checkable: a(() => r.checkable),
|
|
4151
|
+
disabled: a(() => r.disabled),
|
|
4152
|
+
expandedKeys: f,
|
|
4153
|
+
selectedKeys: p,
|
|
4154
|
+
checkedKeys: m,
|
|
4155
|
+
isExpanded: (e) => f.value.has(e),
|
|
4156
|
+
isSelected: (e) => p.value.has(e),
|
|
4157
|
+
isChecked: (e) => m.value.has(e),
|
|
4158
|
+
isIndeterminate: (e) => h.value.has(e),
|
|
4159
|
+
toggleExpand: y,
|
|
4160
|
+
toggleSelect: b,
|
|
4161
|
+
toggleCheck: C
|
|
4162
|
+
}), (n, r) => (x(), c("ul", {
|
|
4163
|
+
class: _(["uid-tree", { "uid-tree--guides": e.showGuides }]),
|
|
4164
|
+
role: "tree"
|
|
4165
|
+
}, [(x(!0), c(t, null, T(e.nodes, (e) => (x(), o(za, {
|
|
4166
|
+
key: e.key,
|
|
4167
|
+
node: e,
|
|
4168
|
+
level: 0
|
|
4169
|
+
}, null, 8, ["node"]))), 128))], 2));
|
|
4170
|
+
}
|
|
4171
|
+
}), Va = /* @__PURE__ */ f({
|
|
4172
|
+
__name: "UidTimeline",
|
|
4173
|
+
props: { alternate: {
|
|
4174
|
+
type: Boolean,
|
|
4175
|
+
default: !1
|
|
4176
|
+
} },
|
|
4177
|
+
setup(e) {
|
|
4178
|
+
return (t, n) => (x(), c("ol", { class: _(["uid-timeline", { "uid-timeline--alternate": e.alternate }]) }, [E(t.$slots, "default")], 2));
|
|
4179
|
+
}
|
|
4180
|
+
}), Ha = { class: "uid-timeline-item__rail" }, Ua = { class: "uid-timeline-item__marker" }, Wa = { class: "uid-timeline-item__content" }, Ga = {
|
|
4181
|
+
key: 0,
|
|
4182
|
+
class: "uid-timeline-item__time"
|
|
4183
|
+
}, Ka = {
|
|
4184
|
+
key: 1,
|
|
4185
|
+
class: "uid-timeline-item__title"
|
|
4186
|
+
}, qa = {
|
|
4187
|
+
key: 2,
|
|
4188
|
+
class: "uid-timeline-item__description"
|
|
4189
|
+
}, Ja = {
|
|
4190
|
+
key: 3,
|
|
4191
|
+
class: "uid-timeline-item__description"
|
|
4192
|
+
}, Ya = /* @__PURE__ */ f({
|
|
4193
|
+
__name: "UidTimelineItem",
|
|
4194
|
+
props: {
|
|
4195
|
+
title: {},
|
|
4196
|
+
description: {},
|
|
4197
|
+
time: {},
|
|
4198
|
+
tone: { default: "neutral" },
|
|
4199
|
+
icon: {}
|
|
4200
|
+
},
|
|
4201
|
+
setup(t) {
|
|
4202
|
+
return (n, r) => (x(), c("li", { class: _(["uid-timeline-item", [t.tone !== "neutral" && `uid-timeline-item--${t.tone}`, (t.icon || n.$slots.icon) && "uid-timeline-item--with-icon"]]) }, [l("div", Ha, [l("div", Ua, [E(n.$slots, "icon", {}, () => [t.icon ? (x(), o(e, {
|
|
4203
|
+
key: 0,
|
|
4204
|
+
icon: t.icon,
|
|
4205
|
+
size: 14
|
|
4206
|
+
}, null, 8, ["icon"])) : s("", !0)])]), r[0] ||= l("div", {
|
|
4207
|
+
class: "uid-timeline-item__line",
|
|
4208
|
+
"aria-hidden": "true"
|
|
4209
|
+
}, null, -1)]), l("div", Wa, [
|
|
4210
|
+
t.time || n.$slots.time ? (x(), c("p", Ga, [E(n.$slots, "time", {}, () => [u(k(t.time), 1)])])) : s("", !0),
|
|
4211
|
+
t.title ? (x(), c("h4", Ka, k(t.title), 1)) : s("", !0),
|
|
4212
|
+
t.description && !n.$slots.default ? (x(), c("p", qa, k(t.description), 1)) : s("", !0),
|
|
4213
|
+
n.$slots.default ? (x(), c("div", Ja, [E(n.$slots, "default")])) : s("", !0)
|
|
4214
|
+
])], 2));
|
|
4215
|
+
}
|
|
4216
|
+
}), Xa = ["for"], Za = {
|
|
4217
|
+
key: 0,
|
|
4218
|
+
class: "uid-file-upload__required",
|
|
4219
|
+
"aria-hidden": "true"
|
|
4220
|
+
}, Qa = ["aria-disabled", "aria-invalid"], $a = { class: "uid-file-upload__primary-text" }, eo = ["innerHTML"], to = { class: "uid-file-upload__secondary-text" }, no = [
|
|
4221
|
+
"id",
|
|
4222
|
+
"multiple",
|
|
4223
|
+
"accept",
|
|
4224
|
+
"disabled",
|
|
4225
|
+
"required"
|
|
4226
|
+
], ro = {
|
|
4227
|
+
key: 1,
|
|
4228
|
+
class: "uid-file-upload__list"
|
|
4229
|
+
}, io = { class: "uid-file-upload__file-info" }, ao = { class: "uid-file-upload__file-name" }, oo = { class: "uid-file-upload__file-meta" }, so = { key: 0 }, co = { key: 1 }, lo = {
|
|
4230
|
+
key: 0,
|
|
4231
|
+
class: "uid-file-upload__progress"
|
|
4232
|
+
}, uo = ["aria-label", "onClick"], fo = /* @__PURE__ */ f({
|
|
4233
|
+
__name: "UidFileUpload",
|
|
4234
|
+
props: /* @__PURE__ */ m({
|
|
4235
|
+
multiple: {
|
|
4236
|
+
type: Boolean,
|
|
4237
|
+
default: !1
|
|
4238
|
+
},
|
|
4239
|
+
accept: { default: void 0 },
|
|
4240
|
+
maxSize: { default: void 0 },
|
|
4241
|
+
maxFiles: { default: void 0 },
|
|
4242
|
+
disabled: {
|
|
4243
|
+
type: Boolean,
|
|
4244
|
+
default: !1
|
|
4245
|
+
},
|
|
4246
|
+
label: {},
|
|
4247
|
+
hint: {},
|
|
4248
|
+
error: {},
|
|
4249
|
+
required: {
|
|
4250
|
+
type: Boolean,
|
|
4251
|
+
default: !1
|
|
4252
|
+
},
|
|
4253
|
+
primaryText: { default: "Перетащите файлы или нажмите для выбора" },
|
|
4254
|
+
secondaryText: { default: "Поддерживаются изображения, документы" }
|
|
4255
|
+
}, {
|
|
4256
|
+
modelValue: { default: () => [] },
|
|
4257
|
+
modelModifiers: {}
|
|
4258
|
+
}),
|
|
4259
|
+
emits: /* @__PURE__ */ m([
|
|
4260
|
+
"add",
|
|
4261
|
+
"remove",
|
|
4262
|
+
"reject"
|
|
4263
|
+
], ["update:modelValue"]),
|
|
4264
|
+
setup(n, { emit: r }) {
|
|
4265
|
+
let i = n, o = r, f = N(n, "modelValue"), p = w(null), m = w(!1), h = M(), g = a(() => !!i.error), y = a(() => i.error || i.hint);
|
|
4266
|
+
function b(e) {
|
|
4267
|
+
return e < 1024 ? `${e} Б` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} КБ` : `${(e / 1024 / 1024).toFixed(1)} МБ`;
|
|
4268
|
+
}
|
|
4269
|
+
function S(e) {
|
|
4270
|
+
if (!i.accept) return !0;
|
|
4271
|
+
let t = i.accept.split(",").map((e) => e.trim().toLowerCase()), n = e.name.toLowerCase(), r = e.type.toLowerCase();
|
|
4272
|
+
return t.some((e) => e.startsWith(".") ? n.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r === e);
|
|
4273
|
+
}
|
|
4274
|
+
function C(e) {
|
|
4275
|
+
let t = Array.from(e), n = [];
|
|
4276
|
+
for (let e of t) {
|
|
4277
|
+
if (!S(e)) {
|
|
4278
|
+
o("reject", e, "type");
|
|
4279
|
+
continue;
|
|
4280
|
+
}
|
|
4281
|
+
if (i.maxSize && e.size > i.maxSize) {
|
|
4282
|
+
o("reject", e, "size");
|
|
4283
|
+
continue;
|
|
4284
|
+
}
|
|
4285
|
+
if (i.maxFiles && f.value.length + n.length >= i.maxFiles) {
|
|
4286
|
+
o("reject", e, "limit");
|
|
4287
|
+
continue;
|
|
4288
|
+
}
|
|
4289
|
+
n.push({
|
|
4290
|
+
file: e,
|
|
4291
|
+
id: `${Date.now()}-${Math.random().toString(36).slice(2)}`
|
|
4292
|
+
});
|
|
4293
|
+
}
|
|
4294
|
+
n.length !== 0 && (i.multiple ? f.value = [...f.value, ...n] : f.value = n.slice(0, 1), o("add", n.map((e) => e.file)));
|
|
4295
|
+
}
|
|
4296
|
+
function E(e) {
|
|
4297
|
+
let t = e.target;
|
|
4298
|
+
t.files && (C(t.files), t.value = "");
|
|
4299
|
+
}
|
|
4300
|
+
function D() {
|
|
4301
|
+
i.disabled || p.value?.click();
|
|
4302
|
+
}
|
|
4303
|
+
function O(e) {
|
|
4304
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), D());
|
|
4305
|
+
}
|
|
4306
|
+
function A(e) {
|
|
4307
|
+
if (e.preventDefault(), m.value = !1, i.disabled) return;
|
|
4308
|
+
let t = e.dataTransfer?.files;
|
|
4309
|
+
t && C(t);
|
|
4310
|
+
}
|
|
4311
|
+
function P(e) {
|
|
4312
|
+
e.preventDefault(), i.disabled || (m.value = !0);
|
|
4313
|
+
}
|
|
4314
|
+
function F() {
|
|
4315
|
+
m.value = !1;
|
|
4316
|
+
}
|
|
4317
|
+
function I(e) {
|
|
4318
|
+
f.value = f.value.filter((t) => t.id !== e.id), o("remove", e.file);
|
|
4319
|
+
}
|
|
4320
|
+
return (r, i) => (x(), c("div", { class: _(["uid-file-upload", { "uid-file-upload--disabled": n.disabled }]) }, [
|
|
4321
|
+
n.label ? (x(), c("label", {
|
|
4322
|
+
key: 0,
|
|
4323
|
+
for: j(h),
|
|
4324
|
+
class: "uid-file-upload__label"
|
|
4325
|
+
}, [u(k(n.label) + " ", 1), n.required ? (x(), c("span", Za, "*")) : s("", !0)], 8, Xa)) : s("", !0),
|
|
4326
|
+
l("div", {
|
|
4327
|
+
class: _(["uid-file-upload__dropzone", { "uid-file-upload__dropzone--active": m.value }]),
|
|
4328
|
+
role: "button",
|
|
4329
|
+
tabindex: "0",
|
|
4330
|
+
"aria-disabled": n.disabled,
|
|
4331
|
+
"aria-invalid": g.value ? "true" : void 0,
|
|
4332
|
+
onClick: D,
|
|
4333
|
+
onKeydown: O,
|
|
4334
|
+
onDrop: A,
|
|
4335
|
+
onDragover: P,
|
|
4336
|
+
onDragleave: F
|
|
4337
|
+
}, [
|
|
4338
|
+
d(e, {
|
|
4339
|
+
icon: j(de),
|
|
4340
|
+
size: 32,
|
|
4341
|
+
class: "uid-file-upload__icon",
|
|
4342
|
+
"aria-hidden": "true"
|
|
4343
|
+
}, null, 8, ["icon"]),
|
|
4344
|
+
l("p", $a, [l("span", { innerHTML: n.primaryText }, null, 8, eo)]),
|
|
4345
|
+
l("p", to, k(n.secondaryText), 1),
|
|
4346
|
+
l("input", {
|
|
4347
|
+
id: j(h),
|
|
4348
|
+
ref_key: "inputRef",
|
|
4349
|
+
ref: p,
|
|
4350
|
+
class: "uid-file-upload__input",
|
|
4351
|
+
type: "file",
|
|
4352
|
+
multiple: n.multiple,
|
|
4353
|
+
accept: n.accept,
|
|
4354
|
+
disabled: n.disabled,
|
|
4355
|
+
required: n.required,
|
|
4356
|
+
onChange: E
|
|
4357
|
+
}, null, 40, no)
|
|
4358
|
+
], 42, Qa),
|
|
4359
|
+
f.value.length > 0 ? (x(), c("ul", ro, [(x(!0), c(t, null, T(f.value, (t) => (x(), c("li", {
|
|
4360
|
+
key: t.id,
|
|
4361
|
+
class: _(["uid-file-upload__item", { "uid-file-upload__item--error": t.error }])
|
|
4362
|
+
}, [
|
|
4363
|
+
d(e, {
|
|
4364
|
+
icon: j(ie),
|
|
4365
|
+
size: 20,
|
|
4366
|
+
class: "uid-file-upload__file-icon",
|
|
4367
|
+
"aria-hidden": "true"
|
|
4368
|
+
}, null, 8, ["icon"]),
|
|
4369
|
+
l("div", io, [
|
|
4370
|
+
l("div", ao, k(t.file.name), 1),
|
|
4371
|
+
l("div", oo, [l("span", null, k(b(t.file.size)), 1), t.error ? (x(), c("span", so, "— " + k(t.error), 1)) : t.progress === void 0 ? s("", !0) : (x(), c("span", co, "— " + k(t.progress) + "%", 1))]),
|
|
4372
|
+
t.progress !== void 0 && !t.error ? (x(), c("div", lo, [l("div", {
|
|
4373
|
+
class: "uid-file-upload__progress-bar",
|
|
4374
|
+
style: v({ width: `${t.progress}%` })
|
|
4375
|
+
}, null, 4)])) : s("", !0)
|
|
4376
|
+
]),
|
|
4377
|
+
l("button", {
|
|
4378
|
+
type: "button",
|
|
4379
|
+
class: "uid-file-upload__remove",
|
|
4380
|
+
"aria-label": `Удалить ${t.file.name}`,
|
|
4381
|
+
onClick: (e) => I(t)
|
|
4382
|
+
}, [d(e, {
|
|
4383
|
+
icon: j(Z),
|
|
4384
|
+
size: 16
|
|
4385
|
+
}, null, 8, ["icon"])], 8, uo)
|
|
4386
|
+
], 2))), 128))])) : s("", !0),
|
|
4387
|
+
y.value ? (x(), c("p", {
|
|
4388
|
+
key: 2,
|
|
4389
|
+
class: _(["uid-file-upload__hint", g.value && "uid-file-upload__hint--error"])
|
|
4390
|
+
}, k(y.value), 3)) : s("", !0)
|
|
4391
|
+
], 2));
|
|
4392
|
+
}
|
|
4393
|
+
}), po = {
|
|
4394
|
+
key: 0,
|
|
4395
|
+
class: "uid-code uid-code--inline"
|
|
4396
|
+
}, mo = {
|
|
4397
|
+
key: 0,
|
|
4398
|
+
class: "uid-code__header"
|
|
4399
|
+
}, ho = { class: "uid-code__lang" }, go = ["aria-label"], _o = { class: "uid-code__body" }, vo = {
|
|
4400
|
+
key: 0,
|
|
4401
|
+
class: "uid-code__line-numbers",
|
|
4402
|
+
"aria-hidden": "true"
|
|
4403
|
+
}, yo = { class: "uid-code__pre" }, bo = /* @__PURE__ */ f({
|
|
4404
|
+
__name: "UidCode",
|
|
4405
|
+
props: {
|
|
4406
|
+
code: { default: "" },
|
|
4407
|
+
language: { default: void 0 },
|
|
4408
|
+
inline: {
|
|
4409
|
+
type: Boolean,
|
|
4410
|
+
default: !1
|
|
4411
|
+
},
|
|
4412
|
+
lineNumbers: {
|
|
4413
|
+
type: Boolean,
|
|
4414
|
+
default: !1
|
|
4415
|
+
},
|
|
4416
|
+
copy: {
|
|
4417
|
+
type: Boolean,
|
|
4418
|
+
default: !0
|
|
4419
|
+
},
|
|
4420
|
+
wrap: {
|
|
4421
|
+
type: Boolean,
|
|
4422
|
+
default: !1
|
|
4423
|
+
},
|
|
4424
|
+
maxHeight: { default: void 0 }
|
|
4425
|
+
},
|
|
4426
|
+
setup(n) {
|
|
4427
|
+
let r = n, i = w(!1), o = a(() => r.code.split("\n")), f = a(() => !r.inline && (r.language !== void 0 || r.copy));
|
|
4428
|
+
async function p() {
|
|
4429
|
+
if (navigator?.clipboard) try {
|
|
4430
|
+
await navigator.clipboard.writeText(r.code), i.value = !0, setTimeout(() => {
|
|
4431
|
+
i.value = !1;
|
|
4432
|
+
}, 1500);
|
|
4433
|
+
} catch {}
|
|
4434
|
+
}
|
|
4435
|
+
return (r, a) => n.inline ? (x(), c("code", po, [E(r.$slots, "default", {}, () => [u(k(n.code), 1)])])) : (x(), c("div", {
|
|
4436
|
+
key: 1,
|
|
4437
|
+
class: _(["uid-code", {
|
|
4438
|
+
"uid-code--minimal": !f.value,
|
|
4439
|
+
"uid-code--wrap": n.wrap
|
|
4440
|
+
}]),
|
|
4441
|
+
style: v(n.maxHeight ? { "--uid-code-max-height": n.maxHeight } : void 0)
|
|
4442
|
+
}, [f.value ? (x(), c("div", mo, [l("span", ho, k(n.language || ""), 1), n.copy ? (x(), c("button", {
|
|
4443
|
+
key: 0,
|
|
4444
|
+
type: "button",
|
|
4445
|
+
class: _(["uid-code__copy", { "uid-code__copy--copied": i.value }]),
|
|
4446
|
+
"aria-label": i.value ? "Скопировано" : "Скопировать",
|
|
4447
|
+
onClick: p
|
|
4448
|
+
}, [d(e, {
|
|
4449
|
+
icon: i.value ? j(q) : j(re),
|
|
4450
|
+
size: 12,
|
|
4451
|
+
"aria-hidden": "true"
|
|
4452
|
+
}, null, 8, ["icon"]), l("span", null, k(i.value ? "Скопировано" : "Копировать"), 1)], 10, go)) : s("", !0)])) : s("", !0), l("div", _o, [n.lineNumbers ? (x(), c("div", vo, [(x(!0), c(t, null, T(o.value, (e, t) => (x(), c("span", {
|
|
4453
|
+
key: t,
|
|
4454
|
+
class: "uid-code__line-number"
|
|
4455
|
+
}, k(t + 1), 1))), 128))])) : s("", !0), l("pre", yo, [l("code", null, [E(r.$slots, "default", {}, () => [u(k(n.code), 1)])])])])], 6));
|
|
4456
|
+
}
|
|
4457
|
+
}), xo = ["aria-label"], So = ["aria-current"], Co = { class: "uid-stepper__indicator" }, wo = {
|
|
4458
|
+
key: 1,
|
|
4459
|
+
"aria-hidden": "true"
|
|
4460
|
+
}, To = { class: "uid-stepper__content" }, Eo = { class: "uid-stepper__label" }, Do = {
|
|
4461
|
+
key: 0,
|
|
4462
|
+
class: "uid-stepper__description"
|
|
4463
|
+
}, Oo = /* @__PURE__ */ f({
|
|
4464
|
+
__name: "UidStepper",
|
|
4465
|
+
props: {
|
|
4466
|
+
steps: {},
|
|
4467
|
+
current: { default: 0 },
|
|
4468
|
+
orientation: { default: "horizontal" }
|
|
4469
|
+
},
|
|
4470
|
+
setup(n) {
|
|
4471
|
+
function r(e, t) {
|
|
4472
|
+
return e < t ? "completed" : e === t ? "current" : "pending";
|
|
4473
|
+
}
|
|
4474
|
+
return (i, a) => (x(), c("ol", {
|
|
4475
|
+
class: _(["uid-stepper", [`uid-stepper--${n.orientation}`]]),
|
|
4476
|
+
"aria-label": `Шаги (текущий: ${n.current + 1} из ${n.steps.length})`
|
|
4477
|
+
}, [(x(!0), c(t, null, T(n.steps, (t, i) => (x(), c("li", {
|
|
4478
|
+
key: i,
|
|
4479
|
+
class: _(["uid-stepper__step", [`uid-stepper__step--${r(i, n.current)}`]]),
|
|
4480
|
+
"aria-current": i === n.current ? "step" : void 0
|
|
4481
|
+
}, [l("div", Co, [r(i, n.current) === "completed" ? (x(), o(e, {
|
|
4482
|
+
key: 0,
|
|
4483
|
+
icon: j(q),
|
|
4484
|
+
size: 16,
|
|
4485
|
+
"aria-hidden": "true"
|
|
4486
|
+
}, null, 8, ["icon"])) : (x(), c("span", wo, k(i + 1), 1))]), l("div", To, [l("span", Eo, k(t.label), 1), t.description ? (x(), c("span", Do, k(t.description), 1)) : s("", !0)])], 10, So))), 128))], 10, xo));
|
|
4487
|
+
}
|
|
4488
|
+
}), ko = /* @__PURE__ */ f({
|
|
4489
|
+
__name: "UidStack",
|
|
4490
|
+
props: {
|
|
4491
|
+
direction: { default: "column" },
|
|
4492
|
+
gap: { default: "var(--uid-space-4)" },
|
|
4493
|
+
align: { default: void 0 },
|
|
4494
|
+
justify: { default: void 0 },
|
|
4495
|
+
wrap: {
|
|
4496
|
+
type: Boolean,
|
|
4497
|
+
default: !1
|
|
4498
|
+
},
|
|
4499
|
+
as: { default: "div" },
|
|
4500
|
+
inline: {
|
|
4501
|
+
type: Boolean,
|
|
4502
|
+
default: !1
|
|
4503
|
+
}
|
|
4504
|
+
},
|
|
4505
|
+
setup(e) {
|
|
4506
|
+
let t = e, n = {
|
|
4507
|
+
start: "flex-start",
|
|
4508
|
+
center: "center",
|
|
4509
|
+
end: "flex-end",
|
|
4510
|
+
between: "space-between",
|
|
4511
|
+
around: "space-around",
|
|
4512
|
+
evenly: "space-evenly"
|
|
4513
|
+
}, r = {
|
|
4514
|
+
start: "flex-start",
|
|
4515
|
+
center: "center",
|
|
4516
|
+
end: "flex-end",
|
|
4517
|
+
stretch: "stretch",
|
|
4518
|
+
baseline: "baseline"
|
|
4519
|
+
}, i = a(() => ({
|
|
4520
|
+
flexDirection: t.direction,
|
|
4521
|
+
gap: t.gap,
|
|
4522
|
+
alignItems: t.align ? r[t.align] : void 0,
|
|
4523
|
+
justifyContent: t.justify ? n[t.justify] : void 0,
|
|
4524
|
+
flexWrap: t.wrap ? "wrap" : void 0
|
|
4525
|
+
}));
|
|
4526
|
+
return (t, n) => (x(), o(O(e.as), {
|
|
4527
|
+
class: _(["uid-stack", { "uid-stack--inline": e.inline }]),
|
|
4528
|
+
style: v(i.value)
|
|
4529
|
+
}, {
|
|
4530
|
+
default: R(() => [E(t.$slots, "default")]),
|
|
4531
|
+
_: 3
|
|
4532
|
+
}, 8, ["class", "style"]));
|
|
4533
|
+
}
|
|
4534
|
+
}), Ao = /* @__PURE__ */ f({
|
|
4535
|
+
__name: "UidGrid",
|
|
4536
|
+
props: {
|
|
4537
|
+
cols: { default: 12 },
|
|
4538
|
+
gap: { default: "var(--uid-space-4)" },
|
|
4539
|
+
rowGap: { default: void 0 },
|
|
4540
|
+
colGap: { default: void 0 },
|
|
4541
|
+
align: { default: void 0 },
|
|
4542
|
+
justify: { default: void 0 },
|
|
4543
|
+
as: { default: "div" }
|
|
4544
|
+
},
|
|
4545
|
+
setup(e) {
|
|
4546
|
+
let t = e, n = {
|
|
4547
|
+
start: "start",
|
|
4548
|
+
center: "center",
|
|
4549
|
+
end: "end",
|
|
4550
|
+
stretch: "stretch"
|
|
4551
|
+
}, r = a(() => ({
|
|
4552
|
+
gridTemplateColumns: typeof t.cols == "number" ? `repeat(${t.cols}, minmax(0, 1fr))` : t.cols,
|
|
4553
|
+
gap: t.rowGap || t.colGap ? void 0 : t.gap,
|
|
4554
|
+
rowGap: t.rowGap,
|
|
4555
|
+
columnGap: t.colGap,
|
|
4556
|
+
alignItems: t.align ? n[t.align] : void 0,
|
|
4557
|
+
justifyItems: t.justify ? n[t.justify] : void 0
|
|
4558
|
+
}));
|
|
4559
|
+
return (t, n) => (x(), o(O(e.as), {
|
|
4560
|
+
class: "uid-grid",
|
|
4561
|
+
style: v(r.value)
|
|
4562
|
+
}, {
|
|
4563
|
+
default: R(() => [E(t.$slots, "default")]),
|
|
4564
|
+
_: 3
|
|
4565
|
+
}, 8, ["style"]));
|
|
4566
|
+
}
|
|
4567
|
+
}), jo = /* @__PURE__ */ f({
|
|
4568
|
+
__name: "UidContainer",
|
|
4569
|
+
props: {
|
|
4570
|
+
size: { default: "lg" },
|
|
4571
|
+
padding: {
|
|
4572
|
+
type: Boolean,
|
|
4573
|
+
default: !0
|
|
4574
|
+
},
|
|
4575
|
+
as: { default: "div" }
|
|
4576
|
+
},
|
|
4577
|
+
setup(e) {
|
|
4578
|
+
return (t, n) => (x(), o(O(e.as), { class: _(["uid-container", [`uid-container--${e.size}`, { "uid-container--padded": e.padding }]]) }, {
|
|
4579
|
+
default: R(() => [E(t.$slots, "default")]),
|
|
4580
|
+
_: 3
|
|
4581
|
+
}, 8, ["class"]));
|
|
4582
|
+
}
|
|
4583
|
+
}), Mo = Symbol("uid-wizard"), No = { class: "uid-wizard" }, Po = /* @__PURE__ */ f({
|
|
4584
|
+
__name: "UidWizard",
|
|
4585
|
+
props: /* @__PURE__ */ m({ steps: {} }, {
|
|
4586
|
+
modelValue: { default: 0 },
|
|
4587
|
+
modelModifiers: {}
|
|
4588
|
+
}),
|
|
4589
|
+
emits: ["update:modelValue"],
|
|
4590
|
+
setup(e, { expose: t }) {
|
|
4591
|
+
let n = e, r = N(e, "modelValue"), i = /* @__PURE__ */ new Map(), o = a(() => n.steps), s = a(() => r.value === 0), l = a(() => r.value === n.steps.length - 1);
|
|
4592
|
+
async function u() {
|
|
4593
|
+
let e = i.get(r.value);
|
|
4594
|
+
e && !await e() || l.value || r.value++;
|
|
4595
|
+
}
|
|
4596
|
+
function d() {
|
|
4597
|
+
s.value || r.value--;
|
|
4598
|
+
}
|
|
4599
|
+
function f(e) {
|
|
4600
|
+
e >= 0 && e < n.steps.length && (r.value = e);
|
|
4601
|
+
}
|
|
4602
|
+
function p(e, t) {
|
|
4603
|
+
i.set(e, t);
|
|
4604
|
+
}
|
|
4605
|
+
function m(e) {
|
|
4606
|
+
i.delete(e);
|
|
4607
|
+
}
|
|
4608
|
+
return S(Mo, {
|
|
4609
|
+
current: r,
|
|
4610
|
+
steps: o,
|
|
4611
|
+
isFirst: s,
|
|
4612
|
+
isLast: l,
|
|
4613
|
+
next: u,
|
|
4614
|
+
prev: d,
|
|
4615
|
+
goTo: f,
|
|
4616
|
+
registerValidator: p,
|
|
4617
|
+
unregisterValidator: m
|
|
4618
|
+
}), t({
|
|
4619
|
+
current: r,
|
|
4620
|
+
next: u,
|
|
4621
|
+
prev: d,
|
|
4622
|
+
goTo: f,
|
|
4623
|
+
isFirst: s,
|
|
4624
|
+
isLast: l
|
|
4625
|
+
}), (e, t) => (x(), c("div", No, [E(e.$slots, "default")]));
|
|
4626
|
+
}
|
|
4627
|
+
}), Fo = ["aria-label"], Io = /* @__PURE__ */ f({
|
|
4628
|
+
__name: "UidWizardStep",
|
|
4629
|
+
props: {
|
|
4630
|
+
index: {},
|
|
4631
|
+
validate: {
|
|
4632
|
+
type: Function,
|
|
4633
|
+
default: void 0
|
|
4634
|
+
}
|
|
4635
|
+
},
|
|
4636
|
+
setup(e) {
|
|
4637
|
+
let t = e, n = p(Mo);
|
|
4638
|
+
if (!n) throw Error("UidWizardStep must be inside UidWizard");
|
|
4639
|
+
L(() => t.validate, (e, r) => {
|
|
4640
|
+
r !== void 0 && n.unregisterValidator(t.index), e !== void 0 && n.registerValidator(t.index, e);
|
|
4641
|
+
}, { immediate: !0 }), b(() => n.unregisterValidator(t.index));
|
|
4642
|
+
let r = a(() => n.current.value === t.index);
|
|
4643
|
+
return (t, n) => r.value ? (x(), c("div", {
|
|
4644
|
+
key: 0,
|
|
4645
|
+
class: "uid-wizard-step",
|
|
4646
|
+
role: "tabpanel",
|
|
4647
|
+
"aria-label": `Шаг ${e.index + 1}`
|
|
4648
|
+
}, [E(t.$slots, "default")], 8, Fo)) : s("", !0);
|
|
4649
|
+
}
|
|
4650
|
+
}), Lo = { class: "uid-pattern-header__inner" }, Ro = {
|
|
4651
|
+
key: 0,
|
|
4652
|
+
class: "uid-pattern-header__logo"
|
|
4653
|
+
}, zo = {
|
|
4654
|
+
key: 1,
|
|
4655
|
+
class: "uid-pattern-header__nav",
|
|
4656
|
+
"aria-label": "Основная навигация"
|
|
4657
|
+
}, Bo = {
|
|
4658
|
+
key: 2,
|
|
3057
4659
|
class: "uid-pattern-header__actions"
|
|
3058
|
-
},
|
|
4660
|
+
}, Vo = {
|
|
3059
4661
|
key: 3,
|
|
3060
4662
|
class: "uid-pattern-header__mobile"
|
|
3061
|
-
},
|
|
4663
|
+
}, Ho = /* @__PURE__ */ f({
|
|
3062
4664
|
__name: "UidHeader",
|
|
3063
4665
|
props: {
|
|
3064
4666
|
sticky: {
|
|
@@ -3079,38 +4681,38 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
3079
4681
|
"uid-pattern-header--sticky": e.sticky,
|
|
3080
4682
|
"uid-pattern-header--bordered": e.bordered,
|
|
3081
4683
|
"uid-pattern-header--transparent": e.transparent
|
|
3082
|
-
}]) }, [l("div",
|
|
3083
|
-
t.$slots.logo ? (x(), c("div",
|
|
3084
|
-
t.$slots.nav ? (x(), c("nav",
|
|
3085
|
-
t.$slots.actions ? (x(), c("div",
|
|
3086
|
-
t.$slots.mobile ? (x(), c("div",
|
|
4684
|
+
}]) }, [l("div", Lo, [
|
|
4685
|
+
t.$slots.logo ? (x(), c("div", Ro, [E(t.$slots, "logo")])) : s("", !0),
|
|
4686
|
+
t.$slots.nav ? (x(), c("nav", zo, [E(t.$slots, "nav")])) : s("", !0),
|
|
4687
|
+
t.$slots.actions ? (x(), c("div", Bo, [E(t.$slots, "actions")])) : s("", !0),
|
|
4688
|
+
t.$slots.mobile ? (x(), c("div", Vo, [E(t.$slots, "mobile")])) : s("", !0)
|
|
3087
4689
|
])], 2));
|
|
3088
4690
|
}
|
|
3089
|
-
}),
|
|
4691
|
+
}), Uo = { class: "uid-pattern-footer__inner" }, Wo = {
|
|
3090
4692
|
key: 0,
|
|
3091
4693
|
class: "uid-pattern-footer__columns"
|
|
3092
|
-
},
|
|
4694
|
+
}, Go = {
|
|
3093
4695
|
key: 1,
|
|
3094
4696
|
class: "uid-pattern-footer__content"
|
|
3095
|
-
},
|
|
4697
|
+
}, Ko = {
|
|
3096
4698
|
key: 2,
|
|
3097
4699
|
class: "uid-pattern-footer__bottom"
|
|
3098
|
-
},
|
|
4700
|
+
}, qo = /* @__PURE__ */ f({
|
|
3099
4701
|
__name: "UidFooter",
|
|
3100
4702
|
props: { variant: { default: "minimal" } },
|
|
3101
4703
|
setup(e) {
|
|
3102
|
-
return (t, n) => (x(), c("footer", { class: _(["uid-pattern-footer", `uid-pattern-footer--${e.variant}`]) }, [l("div",
|
|
4704
|
+
return (t, n) => (x(), c("footer", { class: _(["uid-pattern-footer", `uid-pattern-footer--${e.variant}`]) }, [l("div", Uo, [t.$slots.columns ? (x(), c("div", Wo, [E(t.$slots, "columns")])) : t.$slots.default ? (x(), c("div", Go, [E(t.$slots, "default")])) : s("", !0), t.$slots.bottom ? (x(), c("div", Ko, [E(t.$slots, "bottom")])) : s("", !0)])], 2));
|
|
3103
4705
|
}
|
|
3104
|
-
}),
|
|
4706
|
+
}), Jo = {
|
|
3105
4707
|
key: 0,
|
|
3106
4708
|
class: "uid-pattern-sidebar__header"
|
|
3107
|
-
},
|
|
4709
|
+
}, Yo = {
|
|
3108
4710
|
class: "uid-pattern-sidebar__nav",
|
|
3109
4711
|
"aria-label": "Навигация"
|
|
3110
|
-
},
|
|
4712
|
+
}, Xo = {
|
|
3111
4713
|
key: 1,
|
|
3112
4714
|
class: "uid-pattern-sidebar__footer"
|
|
3113
|
-
},
|
|
4715
|
+
}, Zo = /* @__PURE__ */ f({
|
|
3114
4716
|
__name: "UidSidebar",
|
|
3115
4717
|
props: {
|
|
3116
4718
|
collapsed: {
|
|
@@ -3126,19 +4728,19 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
3126
4728
|
style: v(e.width && !e.collapsed ? { "--uid-sidebar-width": e.width } : void 0),
|
|
3127
4729
|
"aria-label": "Боковая навигация"
|
|
3128
4730
|
}, [
|
|
3129
|
-
t.$slots.header ? (x(), c("div",
|
|
3130
|
-
l("nav",
|
|
3131
|
-
t.$slots.footer ? (x(), c("div",
|
|
4731
|
+
t.$slots.header ? (x(), c("div", Jo, [E(t.$slots, "header")])) : s("", !0),
|
|
4732
|
+
l("nav", Yo, [E(t.$slots, "nav")]),
|
|
4733
|
+
t.$slots.footer ? (x(), c("div", Xo, [E(t.$slots, "footer")])) : s("", !0)
|
|
3132
4734
|
], 6));
|
|
3133
4735
|
}
|
|
3134
|
-
}),
|
|
4736
|
+
}), Qo = {
|
|
3135
4737
|
key: 0,
|
|
3136
4738
|
class: "uid-sidebar-item__icon",
|
|
3137
4739
|
"aria-hidden": "true"
|
|
3138
|
-
},
|
|
4740
|
+
}, $o = { class: "uid-sidebar-item__label" }, es = {
|
|
3139
4741
|
key: 1,
|
|
3140
4742
|
class: "uid-sidebar-item__badge"
|
|
3141
|
-
},
|
|
4743
|
+
}, ts = /* @__PURE__ */ f({
|
|
3142
4744
|
__name: "UidSidebarItem",
|
|
3143
4745
|
props: {
|
|
3144
4746
|
href: { default: void 0 },
|
|
@@ -3173,9 +4775,9 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
3173
4775
|
tabindex: e.disabled ? -1 : void 0
|
|
3174
4776
|
}), {
|
|
3175
4777
|
default: R(() => [
|
|
3176
|
-
t.$slots.icon ? (x(), c("span",
|
|
3177
|
-
l("span",
|
|
3178
|
-
e.badge === void 0 ? s("", !0) : (x(), c("span",
|
|
4778
|
+
t.$slots.icon ? (x(), c("span", Qo, [E(t.$slots, "icon")])) : s("", !0),
|
|
4779
|
+
l("span", $o, [E(t.$slots, "default")]),
|
|
4780
|
+
e.badge === void 0 ? s("", !0) : (x(), c("span", es, k(e.badge), 1))
|
|
3179
4781
|
]),
|
|
3180
4782
|
_: 3
|
|
3181
4783
|
}, 16, [
|
|
@@ -3185,10 +4787,10 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
3185
4787
|
"tabindex"
|
|
3186
4788
|
]));
|
|
3187
4789
|
}
|
|
3188
|
-
}),
|
|
4790
|
+
}), ns = { class: "uid-sidebar-group" }, rs = {
|
|
3189
4791
|
key: 0,
|
|
3190
4792
|
class: "uid-sidebar-group__title"
|
|
3191
|
-
},
|
|
4793
|
+
}, is = /* @__PURE__ */ f({
|
|
3192
4794
|
__name: "UidSidebarGroup",
|
|
3193
4795
|
props: {
|
|
3194
4796
|
title: { default: void 0 },
|
|
@@ -3198,29 +4800,29 @@ var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En =
|
|
|
3198
4800
|
}
|
|
3199
4801
|
},
|
|
3200
4802
|
setup(e) {
|
|
3201
|
-
return (t, n) => (x(), c("div",
|
|
4803
|
+
return (t, n) => (x(), c("div", ns, [e.title ? (x(), c("p", rs, k(e.title), 1)) : s("", !0), E(t.$slots, "default")]));
|
|
3202
4804
|
}
|
|
3203
|
-
}),
|
|
4805
|
+
}), as = {}, os = {
|
|
3204
4806
|
class: "uid-sidebar-divider",
|
|
3205
4807
|
role: "separator",
|
|
3206
4808
|
"aria-hidden": "true"
|
|
3207
4809
|
};
|
|
3208
|
-
function
|
|
3209
|
-
return x(), c("div",
|
|
4810
|
+
function ss(e, t) {
|
|
4811
|
+
return x(), c("div", os);
|
|
3210
4812
|
}
|
|
3211
|
-
var
|
|
4813
|
+
var cs = /* @__PURE__ */ Dn(as, [["render", ss]]), ls = { class: "uid-pattern-page-header" }, us = {
|
|
3212
4814
|
key: 0,
|
|
3213
4815
|
class: "uid-pattern-page-header__breadcrumb"
|
|
3214
|
-
},
|
|
4816
|
+
}, ds = { class: "uid-pattern-page-header__row" }, fs = { class: "uid-pattern-page-header__heading" }, ps = { class: "uid-pattern-page-header__title" }, ms = {
|
|
3215
4817
|
key: 0,
|
|
3216
4818
|
class: "uid-pattern-page-header__description"
|
|
3217
|
-
},
|
|
4819
|
+
}, hs = {
|
|
3218
4820
|
key: 0,
|
|
3219
4821
|
class: "uid-pattern-page-header__actions"
|
|
3220
|
-
},
|
|
4822
|
+
}, gs = {
|
|
3221
4823
|
key: 1,
|
|
3222
4824
|
class: "uid-pattern-page-header__tabs"
|
|
3223
|
-
},
|
|
4825
|
+
}, _s = /* @__PURE__ */ f({
|
|
3224
4826
|
__name: "UidPageHeader",
|
|
3225
4827
|
props: {
|
|
3226
4828
|
title: { default: void 0 },
|
|
@@ -3233,9 +4835,9 @@ var ha = /* @__PURE__ */ bn(fa, [["render", ma]]), ga = { class: "uid-pattern-pa
|
|
|
3233
4835
|
emits: ["back"],
|
|
3234
4836
|
setup(t, { emit: n }) {
|
|
3235
4837
|
let r = n;
|
|
3236
|
-
return (n, i) => (x(), c("div",
|
|
3237
|
-
n.$slots.breadcrumb ? (x(), c("div",
|
|
3238
|
-
l("div",
|
|
4838
|
+
return (n, i) => (x(), c("div", ls, [
|
|
4839
|
+
n.$slots.breadcrumb ? (x(), c("div", us, [E(n.$slots, "breadcrumb")])) : s("", !0),
|
|
4840
|
+
l("div", ds, [l("div", fs, [t.back ? (x(), c("button", {
|
|
3239
4841
|
key: 0,
|
|
3240
4842
|
type: "button",
|
|
3241
4843
|
class: "uid-pattern-page-header__back",
|
|
@@ -3244,42 +4846,42 @@ var ha = /* @__PURE__ */ bn(fa, [["render", ma]]), ga = { class: "uid-pattern-pa
|
|
|
3244
4846
|
}, [d(e, {
|
|
3245
4847
|
icon: j(W),
|
|
3246
4848
|
size: 20
|
|
3247
|
-
}, null, 8, ["icon"])])) : s("", !0), l("div", null, [l("h1",
|
|
3248
|
-
n.$slots.tabs ? (x(), c("div",
|
|
4849
|
+
}, null, 8, ["icon"])])) : s("", !0), l("div", null, [l("h1", ps, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), t.description || n.$slots.description ? (x(), c("p", ms, [E(n.$slots, "description", {}, () => [u(k(t.description), 1)])])) : s("", !0)])]), n.$slots.actions ? (x(), c("div", hs, [E(n.$slots, "actions")])) : s("", !0)]),
|
|
4850
|
+
n.$slots.tabs ? (x(), c("div", gs, [E(n.$slots, "tabs")])) : s("", !0)
|
|
3249
4851
|
]));
|
|
3250
4852
|
}
|
|
3251
|
-
}),
|
|
4853
|
+
}), vs = { class: "uid-pattern-empty-state" }, ys = { class: "uid-pattern-empty-state__illustration" }, bs = { class: "uid-pattern-empty-state__content" }, xs = { class: "uid-pattern-empty-state__title" }, Ss = {
|
|
3252
4854
|
key: 0,
|
|
3253
4855
|
class: "uid-pattern-empty-state__description"
|
|
3254
|
-
},
|
|
4856
|
+
}, Cs = {
|
|
3255
4857
|
key: 0,
|
|
3256
4858
|
class: "uid-pattern-empty-state__actions"
|
|
3257
|
-
},
|
|
4859
|
+
}, ws = /* @__PURE__ */ f({
|
|
3258
4860
|
__name: "UidEmptyState",
|
|
3259
4861
|
props: {
|
|
3260
4862
|
title: { default: "Ничего не найдено" },
|
|
3261
4863
|
description: { default: void 0 }
|
|
3262
4864
|
},
|
|
3263
4865
|
setup(t) {
|
|
3264
|
-
return (n, r) => (x(), c("div",
|
|
3265
|
-
l("div",
|
|
3266
|
-
icon: j(
|
|
4866
|
+
return (n, r) => (x(), c("div", vs, [
|
|
4867
|
+
l("div", ys, [E(n.$slots, "illustration", {}, () => [d(e, {
|
|
4868
|
+
icon: j(ae),
|
|
3267
4869
|
size: 48
|
|
3268
4870
|
}, null, 8, ["icon"])])]),
|
|
3269
|
-
l("div",
|
|
3270
|
-
n.$slots.actions ? (x(), c("div",
|
|
4871
|
+
l("div", bs, [l("h2", xs, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), t.description || n.$slots.description ? (x(), c("p", Ss, [E(n.$slots, "description", {}, () => [u(k(t.description), 1)])])) : s("", !0)]),
|
|
4872
|
+
n.$slots.actions ? (x(), c("div", Cs, [E(n.$slots, "actions")])) : s("", !0)
|
|
3271
4873
|
]));
|
|
3272
4874
|
}
|
|
3273
|
-
}),
|
|
4875
|
+
}), Ts = { class: "uid-pattern-error-state" }, Es = { class: "uid-pattern-error-state__illustration" }, Ds = {
|
|
3274
4876
|
key: 0,
|
|
3275
4877
|
class: "uid-pattern-error-state__code"
|
|
3276
|
-
},
|
|
4878
|
+
}, Os = { class: "uid-pattern-error-state__content" }, ks = { class: "uid-pattern-error-state__title" }, As = {
|
|
3277
4879
|
key: 0,
|
|
3278
4880
|
class: "uid-pattern-error-state__description"
|
|
3279
|
-
},
|
|
4881
|
+
}, js = {
|
|
3280
4882
|
key: 1,
|
|
3281
4883
|
class: "uid-pattern-error-state__actions"
|
|
3282
|
-
},
|
|
4884
|
+
}, Ms = /* @__PURE__ */ f({
|
|
3283
4885
|
__name: "UidErrorState",
|
|
3284
4886
|
props: {
|
|
3285
4887
|
code: { default: void 0 },
|
|
@@ -3294,33 +4896,33 @@ var ha = /* @__PURE__ */ bn(fa, [["render", ma]]), ga = { class: "uid-pattern-pa
|
|
|
3294
4896
|
description: "Запрашиваемая страница не существует или была перемещена."
|
|
3295
4897
|
},
|
|
3296
4898
|
500: {
|
|
3297
|
-
icon:
|
|
4899
|
+
icon: ue,
|
|
3298
4900
|
title: "Ошибка сервера",
|
|
3299
4901
|
description: "На сервере произошла ошибка. Мы уже работаем над исправлением."
|
|
3300
4902
|
},
|
|
3301
4903
|
network: {
|
|
3302
|
-
icon:
|
|
4904
|
+
icon: fe,
|
|
3303
4905
|
title: "Нет соединения",
|
|
3304
4906
|
description: "Проверьте подключение к интернету и попробуйте снова."
|
|
3305
4907
|
}
|
|
3306
4908
|
}, i = a(() => n.code ? r[n.code] ?? null : null), o = a(() => i.value?.icon ?? V), f = a(() => n.title ?? i.value?.title ?? "Что-то пошло не так"), p = a(() => n.description ?? i.value?.description);
|
|
3307
|
-
return (n, r) => (x(), c("div",
|
|
3308
|
-
l("div",
|
|
4909
|
+
return (n, r) => (x(), c("div", Ts, [
|
|
4910
|
+
l("div", Es, [E(n.$slots, "illustration", {}, () => [d(e, {
|
|
3309
4911
|
icon: o.value,
|
|
3310
4912
|
size: 48
|
|
3311
4913
|
}, null, 8, ["icon"])])]),
|
|
3312
|
-
t.code ? (x(), c("div",
|
|
3313
|
-
l("div",
|
|
3314
|
-
n.$slots.actions ? (x(), c("div",
|
|
4914
|
+
t.code ? (x(), c("div", Ds, k(t.code), 1)) : s("", !0),
|
|
4915
|
+
l("div", Os, [l("h2", ks, [E(n.$slots, "title", {}, () => [u(k(f.value), 1)])]), p.value || n.$slots.description ? (x(), c("p", As, [E(n.$slots, "description", {}, () => [u(k(p.value), 1)])])) : s("", !0)]),
|
|
4916
|
+
n.$slots.actions ? (x(), c("div", js, [E(n.$slots, "actions")])) : s("", !0)
|
|
3315
4917
|
]));
|
|
3316
4918
|
}
|
|
3317
|
-
}),
|
|
4919
|
+
}), Ns = {
|
|
3318
4920
|
key: 0,
|
|
3319
4921
|
class: "uid-layout-simple__header"
|
|
3320
|
-
},
|
|
4922
|
+
}, Ps = { class: "uid-layout-simple__content" }, Fs = {
|
|
3321
4923
|
key: 1,
|
|
3322
4924
|
class: "uid-layout-simple__footer"
|
|
3323
|
-
},
|
|
4925
|
+
}, Is = /* @__PURE__ */ f({
|
|
3324
4926
|
__name: "UidSimpleLayout",
|
|
3325
4927
|
props: { full: {
|
|
3326
4928
|
type: Boolean,
|
|
@@ -3328,26 +4930,26 @@ var ha = /* @__PURE__ */ bn(fa, [["render", ma]]), ga = { class: "uid-pattern-pa
|
|
|
3328
4930
|
} },
|
|
3329
4931
|
setup(e) {
|
|
3330
4932
|
return (t, n) => (x(), c("div", { class: _(["uid-layout-simple", { "uid-layout-simple--full": e.full }]) }, [
|
|
3331
|
-
t.$slots.header ? (x(), c("div",
|
|
3332
|
-
l("main",
|
|
3333
|
-
t.$slots.footer ? (x(), c("div",
|
|
4933
|
+
t.$slots.header ? (x(), c("div", Ns, [E(t.$slots, "header")])) : s("", !0),
|
|
4934
|
+
l("main", Ps, [E(t.$slots, "default")]),
|
|
4935
|
+
t.$slots.footer ? (x(), c("div", Fs, [E(t.$slots, "footer")])) : s("", !0)
|
|
3334
4936
|
], 2));
|
|
3335
4937
|
}
|
|
3336
|
-
}),
|
|
3337
|
-
function
|
|
3338
|
-
let e = p(
|
|
4938
|
+
}), Ls = Symbol("uid-sidebar-layout");
|
|
4939
|
+
function Rs() {
|
|
4940
|
+
let e = p(Ls);
|
|
3339
4941
|
if (!e) throw Error("useSidebar() must be used inside UidSidebarLayout");
|
|
3340
4942
|
return e;
|
|
3341
4943
|
}
|
|
3342
4944
|
//#endregion
|
|
3343
4945
|
//#region src/layouts/Sidebar/UidSidebarLayout.vue?vue&type=script&setup=true&lang.ts
|
|
3344
|
-
var
|
|
4946
|
+
var zs = { class: "uid-layout-sidebar__sidebar" }, Bs = { class: "uid-layout-sidebar__main" }, Vs = {
|
|
3345
4947
|
key: 0,
|
|
3346
4948
|
class: "uid-layout-sidebar__main-header"
|
|
3347
|
-
},
|
|
4949
|
+
}, Hs = { class: "uid-layout-sidebar__main-content" }, Us = {
|
|
3348
4950
|
key: 1,
|
|
3349
4951
|
class: "uid-layout-sidebar__main-footer"
|
|
3350
|
-
},
|
|
4952
|
+
}, Ws = /* @__PURE__ */ f({
|
|
3351
4953
|
__name: "UidSidebarLayout",
|
|
3352
4954
|
props: /* @__PURE__ */ m({ sidebarWidth: { default: void 0 } }, {
|
|
3353
4955
|
modelValue: {
|
|
@@ -3365,7 +4967,7 @@ var Ka = { class: "uid-layout-sidebar__sidebar" }, qa = { class: "uid-layout-sid
|
|
|
3365
4967
|
}, o = () => {
|
|
3366
4968
|
n.value = !0;
|
|
3367
4969
|
};
|
|
3368
|
-
S(
|
|
4970
|
+
S(Ls, {
|
|
3369
4971
|
collapsed: n,
|
|
3370
4972
|
toggle: r,
|
|
3371
4973
|
open: i,
|
|
@@ -3376,63 +4978,63 @@ var Ka = { class: "uid-layout-sidebar__sidebar" }, qa = { class: "uid-layout-sid
|
|
|
3376
4978
|
class: _(["uid-layout-sidebar", { "uid-layout-sidebar--collapsed": n.value }]),
|
|
3377
4979
|
style: v(u.value)
|
|
3378
4980
|
}, [
|
|
3379
|
-
l("aside",
|
|
4981
|
+
l("aside", zs, [E(e.$slots, "sidebar")]),
|
|
3380
4982
|
l("div", {
|
|
3381
4983
|
class: "uid-layout-sidebar__backdrop",
|
|
3382
4984
|
"aria-hidden": "true",
|
|
3383
4985
|
onClick: o
|
|
3384
4986
|
}),
|
|
3385
|
-
l("div",
|
|
3386
|
-
e.$slots.header ? (x(), c("div",
|
|
3387
|
-
l("main",
|
|
3388
|
-
e.$slots.footer ? (x(), c("div",
|
|
4987
|
+
l("div", Bs, [
|
|
4988
|
+
e.$slots.header ? (x(), c("div", Vs, [E(e.$slots, "header")])) : s("", !0),
|
|
4989
|
+
l("main", Hs, [E(e.$slots, "default")]),
|
|
4990
|
+
e.$slots.footer ? (x(), c("div", Us, [E(e.$slots, "footer")])) : s("", !0)
|
|
3389
4991
|
])
|
|
3390
4992
|
], 6));
|
|
3391
4993
|
}
|
|
3392
|
-
}),
|
|
4994
|
+
}), Gs = {
|
|
3393
4995
|
key: 0,
|
|
3394
4996
|
class: "uid-layout-auth__brand"
|
|
3395
|
-
},
|
|
4997
|
+
}, Ks = { class: "uid-layout-auth__main" }, qs = { class: "uid-layout-auth__card" }, Js = {
|
|
3396
4998
|
key: 0,
|
|
3397
4999
|
class: "uid-layout-auth__footer"
|
|
3398
|
-
},
|
|
5000
|
+
}, Ys = /* @__PURE__ */ f({
|
|
3399
5001
|
__name: "UidAuthLayout",
|
|
3400
5002
|
props: { variant: { default: "centered" } },
|
|
3401
5003
|
setup(e) {
|
|
3402
|
-
return (t, n) => (x(), c("div", { class: _(["uid-layout-auth", [`uid-layout-auth--${e.variant}`]]) }, [e.variant === "split" && t.$slots.brand ? (x(), c("div",
|
|
5004
|
+
return (t, n) => (x(), c("div", { class: _(["uid-layout-auth", [`uid-layout-auth--${e.variant}`]]) }, [e.variant === "split" && t.$slots.brand ? (x(), c("div", Gs, [E(t.$slots, "brand")])) : s("", !0), l("div", Ks, [l("div", qs, [E(t.$slots, "default")]), t.$slots.footer ? (x(), c("div", Js, [E(t.$slots, "footer")])) : s("", !0)])], 2));
|
|
3403
5005
|
}
|
|
3404
|
-
}),
|
|
5006
|
+
}), Xs = { class: "uid-layout-wizard" }, Zs = {
|
|
3405
5007
|
key: 0,
|
|
3406
5008
|
class: "uid-layout-wizard__header"
|
|
3407
|
-
},
|
|
5009
|
+
}, Qs = {
|
|
3408
5010
|
key: 1,
|
|
3409
5011
|
class: "uid-layout-wizard__stepper"
|
|
3410
|
-
},
|
|
5012
|
+
}, $s = { class: "uid-layout-wizard__content" }, ec = {
|
|
3411
5013
|
key: 2,
|
|
3412
5014
|
class: "uid-layout-wizard__nav"
|
|
3413
|
-
},
|
|
5015
|
+
}, tc = /* @__PURE__ */ f({
|
|
3414
5016
|
__name: "UidWizardLayout",
|
|
3415
5017
|
setup(e) {
|
|
3416
|
-
return (e, t) => (x(), c("div",
|
|
3417
|
-
e.$slots.header ? (x(), c("div",
|
|
3418
|
-
e.$slots.stepper ? (x(), c("div",
|
|
3419
|
-
l("main",
|
|
3420
|
-
e.$slots.nav ? (x(), c("div",
|
|
5018
|
+
return (e, t) => (x(), c("div", Xs, [
|
|
5019
|
+
e.$slots.header ? (x(), c("div", Zs, [E(e.$slots, "header")])) : s("", !0),
|
|
5020
|
+
e.$slots.stepper ? (x(), c("div", Qs, [E(e.$slots, "stepper")])) : s("", !0),
|
|
5021
|
+
l("main", $s, [E(e.$slots, "default")]),
|
|
5022
|
+
e.$slots.nav ? (x(), c("div", ec, [E(e.$slots, "nav")])) : s("", !0)
|
|
3421
5023
|
]));
|
|
3422
5024
|
}
|
|
3423
|
-
}),
|
|
3424
|
-
function
|
|
5025
|
+
}), nc = w("light");
|
|
5026
|
+
function rc() {
|
|
3425
5027
|
let e = null;
|
|
3426
5028
|
function t(e) {
|
|
3427
|
-
|
|
5029
|
+
nc.value = e, document.documentElement.dataset.theme = e;
|
|
3428
5030
|
}
|
|
3429
5031
|
function n() {
|
|
3430
|
-
t(
|
|
5032
|
+
t(nc.value === "light" ? "dark" : "light");
|
|
3431
5033
|
}
|
|
3432
5034
|
function r() {
|
|
3433
5035
|
let e = document.documentElement.dataset.theme;
|
|
3434
5036
|
if (e === "light" || e === "dark") {
|
|
3435
|
-
|
|
5037
|
+
nc.value = e;
|
|
3436
5038
|
return;
|
|
3437
5039
|
}
|
|
3438
5040
|
let n = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
@@ -3444,7 +5046,7 @@ function uo() {
|
|
|
3444
5046
|
e.addEventListener("change", n), b(() => e?.removeEventListener("change", n));
|
|
3445
5047
|
}
|
|
3446
5048
|
return {
|
|
3447
|
-
theme:
|
|
5049
|
+
theme: nc,
|
|
3448
5050
|
setTheme: t,
|
|
3449
5051
|
toggle: n,
|
|
3450
5052
|
initFromSystem: r,
|
|
@@ -3453,27 +5055,27 @@ function uo() {
|
|
|
3453
5055
|
}
|
|
3454
5056
|
//#endregion
|
|
3455
5057
|
//#region src/composables/useWizard.ts
|
|
3456
|
-
function
|
|
3457
|
-
let e = p(
|
|
5058
|
+
function ic() {
|
|
5059
|
+
let e = p(Mo);
|
|
3458
5060
|
if (!e) throw Error("useWizard() must be used inside UidWizard");
|
|
3459
5061
|
return e;
|
|
3460
5062
|
}
|
|
3461
5063
|
//#endregion
|
|
3462
5064
|
//#region src/composables/useCommandPalette.ts
|
|
3463
|
-
var
|
|
3464
|
-
function
|
|
5065
|
+
var ac = w(!1);
|
|
5066
|
+
function oc() {
|
|
3465
5067
|
return {
|
|
3466
|
-
open:
|
|
5068
|
+
open: ac,
|
|
3467
5069
|
show: () => {
|
|
3468
|
-
|
|
5070
|
+
ac.value = !0;
|
|
3469
5071
|
},
|
|
3470
5072
|
hide: () => {
|
|
3471
|
-
|
|
5073
|
+
ac.value = !1;
|
|
3472
5074
|
},
|
|
3473
5075
|
toggle: () => {
|
|
3474
|
-
|
|
5076
|
+
ac.value = !ac.value;
|
|
3475
5077
|
}
|
|
3476
5078
|
};
|
|
3477
5079
|
}
|
|
3478
5080
|
//#endregion
|
|
3479
|
-
export {
|
|
5081
|
+
export { Ar as UidAccordion, Ir as UidAccordionItem, Lt as UidAlert, Ys as UidAuthLayout, xr as UidAvatar, wr as UidAvatarGroup, Mt as UidBadge, Vn as UidBreadcrumb, Gn as UidBreadcrumbItem, ge as UidButton, vr as UidCard, it as UidCheckbox, bo as UidCode, wi as UidColorPicker, ka as UidCombobox, Pi as UidCommand, jo as UidContainer, li as UidDatePicker, ua as UidDateRangePicker, Dr as UidDivider, hn as UidDrawer, ws as UidEmptyState, Ms as UidErrorState, fo as UidFileUpload, qo as UidFooter, Dt as UidFormField, Ao as UidGrid, Ho as UidHeader, e as UidIcon, cr as UidInfiniteScroll, Je as UidInput, St as UidLabel, Kn as UidLink, ar as UidLoadMore, wn as UidMenu, En as UidMenuItem, jn as UidMenuSeparator, ln as UidModal, Hi as UidNumberInput, _s as UidPageHeader, pr as UidPageSize, Qn as UidPagination, nr as UidPaginationCursor, Sn as UidPopover, Qt as UidProgress, ct as UidRadio, mt as UidRadioGroup, ti as UidSelect, Zo as UidSidebar, cs as UidSidebarDivider, is as UidSidebarGroup, ts as UidSidebarItem, Ws as UidSidebarLayout, Is as UidSimpleLayout, jt as UidSkeleton, hi as UidSlider, kt as UidSpinner, ko as UidStack, Oo as UidStepper, yt as UidSwitch, Ln as UidTab, zn as UidTabPanel, Kr as UidTable, Fn as UidTabs, Tr as UidTag, ga as UidTagsInput, $e as UidTextarea, Yi as UidTimePicker, Va as UidTimeline, Ya as UidTimelineItem, Ht as UidToast, Kt as UidToastProvider, xn as UidTooltip, za as UidTreeItem, Ba as UidTreeView, ui as UidVirtualList, Po as UidWizard, tc as UidWizardLayout, Io as UidWizardStep, we as email, Q as getMessage, Ne as inList, De as integer, ke as max, je as maxValue, Oe as min, Ae as minValue, Ce as nullable, Ee as numeric, Re as parseRules, Me as regex, Se as required, Fe as requiredIf, Ie as requiredUnless, ze as runRules, Pe as sameAs, ye as setMessages, Te as url, oc as useCommandPalette, Be as useField, en as useFocusTrap, vn as usePopover, nn as useScrollLock, Rs as useSidebar, rc as useTheme, Gt as useToast, ic as useWizard };
|