@dskripchenko/ui 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/dist/UidIcon-5947kXOj.js +31 -0
- package/dist/UidIcon-DUeT_lN-.cjs +1 -0
- package/dist/components/Accordion/UidAccordion.vue.d.ts +32 -0
- package/dist/components/Accordion/UidAccordionItem.vue.d.ts +28 -0
- package/dist/components/Accordion/context.d.ts +6 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Alert/UidAlert.vue.d.ts +38 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/UidAvatar.vue.d.ts +15 -0
- package/dist/components/Avatar/UidAvatarGroup.vue.d.ts +25 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/Badge/UidBadge.vue.d.ts +30 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Breadcrumb/UidBreadcrumb.vue.d.ts +26 -0
- package/dist/components/Breadcrumb/UidBreadcrumbItem.vue.d.ts +26 -0
- package/dist/components/Breadcrumb/index.d.ts +4 -0
- package/dist/components/Button/UidButton.vue.d.ts +42 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/UidCard.vue.d.ts +32 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/UidCheckbox.vue.d.ts +33 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColorPicker/UidColorPicker.vue.d.ts +26 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/Command/UidCommand.vue.d.ts +30 -0
- package/dist/components/Command/index.d.ts +2 -0
- package/dist/components/Container/UidContainer.vue.d.ts +28 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/DatePicker/UidDatePicker.vue.d.ts +26 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/Divider/UidDivider.vue.d.ts +9 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Drawer/UidDrawer.vue.d.ts +52 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/FormField/UidFormField.vue.d.ts +36 -0
- package/dist/components/FormField/UidLabel.vue.d.ts +28 -0
- package/dist/components/FormField/index.d.ts +4 -0
- package/dist/components/Grid/UidGrid.vue.d.ts +36 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Input/UidInput.vue.d.ts +58 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Link/UidLink.vue.d.ts +33 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Menu/UidMenu.vue.d.ts +27 -0
- package/dist/components/Menu/UidMenuItem.vue.d.ts +33 -0
- package/dist/components/Menu/UidMenuSeparator.vue.d.ts +2 -0
- package/dist/components/Menu/context.d.ts +2 -0
- package/dist/components/Menu/index.d.ts +4 -0
- package/dist/components/Modal/UidModal.vue.d.ts +48 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Pagination/UidInfiniteScroll.vue.d.ts +17 -0
- package/dist/components/Pagination/UidLoadMore.vue.d.ts +15 -0
- package/dist/components/Pagination/UidPageSize.vue.d.ts +17 -0
- package/dist/components/Pagination/UidPagination.vue.d.ts +20 -0
- package/dist/components/Pagination/UidPaginationCursor.vue.d.ts +19 -0
- package/dist/components/Pagination/index.d.ts +10 -0
- package/dist/components/Popover/UidPopover.vue.d.ts +33 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Progress/UidProgress.vue.d.ts +19 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Radio/UidRadio.vue.d.ts +23 -0
- package/dist/components/Radio/UidRadioGroup.vue.d.ts +45 -0
- package/dist/components/Radio/context.d.ts +9 -0
- package/dist/components/Radio/index.d.ts +5 -0
- package/dist/components/Select/UidSelect.vue.d.ts +37 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Skeleton/UidSkeleton.vue.d.ts +13 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Slider/UidSlider.vue.d.ts +27 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Spinner/UidSpinner.vue.d.ts +10 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Stack/UidStack.vue.d.ts +36 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stepper/UidStepper.vue.d.ts +14 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Switch/UidSwitch.vue.d.ts +32 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/UidTable.vue.d.ts +49 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Tabs/UidTab.vue.d.ts +26 -0
- package/dist/components/Tabs/UidTabPanel.vue.d.ts +23 -0
- package/dist/components/Tabs/UidTabs.vue.d.ts +35 -0
- package/dist/components/Tabs/context.d.ts +8 -0
- package/dist/components/Tabs/index.d.ts +7 -0
- package/dist/components/Tag/UidTag.vue.d.ts +34 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Textarea/UidTextarea.vue.d.ts +53 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Toast/UidToast.vue.d.ts +16 -0
- package/dist/components/Toast/UidToastProvider.vue.d.ts +2 -0
- package/dist/components/Toast/index.d.ts +3 -0
- package/dist/components/Tooltip/UidTooltip.vue.d.ts +34 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/VirtualList/UidVirtualList.vue.d.ts +29 -0
- package/dist/components/VirtualList/index.d.ts +2 -0
- package/dist/composables/useCommandPalette.d.ts +6 -0
- package/dist/composables/useField.d.ts +14 -0
- package/dist/composables/useFocusTrap.d.ts +5 -0
- package/dist/composables/usePopover.d.ts +17 -0
- package/dist/composables/useScrollLock.d.ts +4 -0
- package/dist/composables/useSidebar.d.ts +9 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useToast.d.ts +38 -0
- package/dist/composables/useWizard.d.ts +2 -0
- package/dist/icons/UidIcon.vue.d.ts +12 -0
- package/dist/icons/index.cjs +1 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.mjs +3 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.mjs +3479 -0
- package/dist/layouts/Auth/UidAuthLayout.vue.d.ts +24 -0
- package/dist/layouts/Auth/index.d.ts +2 -0
- package/dist/layouts/Sidebar/UidSidebarLayout.vue.d.ts +33 -0
- package/dist/layouts/Sidebar/index.d.ts +2 -0
- package/dist/layouts/Simple/UidSimpleLayout.vue.d.ts +24 -0
- package/dist/layouts/Simple/index.d.ts +2 -0
- package/dist/layouts/Wizard/UidWizardLayout.vue.d.ts +20 -0
- package/dist/layouts/Wizard/index.d.ts +1 -0
- package/dist/patterns/EmptyState/UidEmptyState.vue.d.ts +32 -0
- package/dist/patterns/EmptyState/index.d.ts +2 -0
- package/dist/patterns/ErrorState/UidErrorState.vue.d.ts +34 -0
- package/dist/patterns/ErrorState/index.d.ts +2 -0
- package/dist/patterns/Footer/UidFooter.vue.d.ts +28 -0
- package/dist/patterns/Footer/index.d.ts +2 -0
- package/dist/patterns/Header/UidHeader.vue.d.ts +34 -0
- package/dist/patterns/Header/index.d.ts +2 -0
- package/dist/patterns/PageHeader/UidPageHeader.vue.d.ts +40 -0
- package/dist/patterns/PageHeader/index.d.ts +2 -0
- package/dist/patterns/Sidebar/UidSidebar.vue.d.ts +32 -0
- package/dist/patterns/Sidebar/UidSidebarDivider.vue.d.ts +2 -0
- package/dist/patterns/Sidebar/UidSidebarGroup.vue.d.ts +26 -0
- package/dist/patterns/Sidebar/UidSidebarItem.vue.d.ts +37 -0
- package/dist/patterns/Sidebar/index.d.ts +7 -0
- package/dist/patterns/Wizard/UidWizard.vue.d.ts +39 -0
- package/dist/patterns/Wizard/UidWizardStep.vue.d.ts +23 -0
- package/dist/patterns/Wizard/context.d.ts +17 -0
- package/dist/patterns/Wizard/index.d.ts +5 -0
- package/dist/styles/UidIcon.css +1 -0
- package/dist/styles/index.css +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/utils/validation/index.d.ts +4 -0
- package/dist/utils/validation/messages.d.ts +3 -0
- package/dist/utils/validation/parseRules.d.ts +3 -0
- package/dist/utils/validation/rules.d.ts +18 -0
- package/dist/utils/validation/types.d.ts +11 -0
- package/package.json +70 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3479 @@
|
|
|
1
|
+
import { t as e } from "./UidIcon-5947kXOj.js";
|
|
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 te, CheckCircle2 as K, ChevronDown as ne, ChevronLeft as q, ChevronRight as J, FolderOpen as Y, Info as re, Search as ie, ServerCrash as ae, WifiOff as oe, X } from "lucide-vue-next";
|
|
4
|
+
//#region src/components/Button/UidButton.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var se = [
|
|
6
|
+
"type",
|
|
7
|
+
"disabled",
|
|
8
|
+
"aria-disabled",
|
|
9
|
+
"data-loading"
|
|
10
|
+
], ce = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "uid-button__prepend"
|
|
13
|
+
}, le = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "uid-button__append"
|
|
16
|
+
}, ue = /* @__PURE__ */ f({
|
|
17
|
+
__name: "UidButton",
|
|
18
|
+
props: {
|
|
19
|
+
variant: { default: "primary" },
|
|
20
|
+
size: { default: "md" },
|
|
21
|
+
disabled: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
loading: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
type: { default: "button" }
|
|
30
|
+
},
|
|
31
|
+
emits: ["click"],
|
|
32
|
+
setup(e, { emit: t }) {
|
|
33
|
+
let n = e, r = t;
|
|
34
|
+
function i(e) {
|
|
35
|
+
!n.disabled && !n.loading && r("click", e);
|
|
36
|
+
}
|
|
37
|
+
return (t, n) => (x(), c("button", {
|
|
38
|
+
class: _(["uid-button", [`uid-button--${e.variant}`, `uid-button--${e.size}`]]),
|
|
39
|
+
type: e.type,
|
|
40
|
+
disabled: e.disabled || e.loading,
|
|
41
|
+
"aria-disabled": e.disabled || e.loading ? "true" : void 0,
|
|
42
|
+
"data-loading": e.loading ? "true" : void 0,
|
|
43
|
+
onClick: i
|
|
44
|
+
}, [
|
|
45
|
+
t.$slots.prepend ? (x(), c("span", ce, [E(t.$slots, "prepend")])) : s("", !0),
|
|
46
|
+
E(t.$slots, "default"),
|
|
47
|
+
t.$slots.append ? (x(), c("span", le, [E(t.$slots, "append")])) : s("", !0)
|
|
48
|
+
], 10, se));
|
|
49
|
+
}
|
|
50
|
+
}), de = {
|
|
51
|
+
required: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`,
|
|
52
|
+
email: () => "Введите корректный email",
|
|
53
|
+
url: () => "Введите корректный URL",
|
|
54
|
+
numeric: () => "Введите число",
|
|
55
|
+
integer: () => "Введите целое число",
|
|
56
|
+
min: ({ params: e }) => `Минимум ${e?.[0]} символов`,
|
|
57
|
+
max: ({ params: e }) => `Максимум ${e?.[0]} символов`,
|
|
58
|
+
min_value: ({ params: e }) => `Значение не менее ${e?.[0]}`,
|
|
59
|
+
max_value: ({ params: e }) => `Значение не более ${e?.[0]}`,
|
|
60
|
+
regex: () => "Неверный формат",
|
|
61
|
+
in: () => "Выберите допустимое значение",
|
|
62
|
+
same_as: () => "Значения не совпадают",
|
|
63
|
+
required_if: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`,
|
|
64
|
+
required_unless: ({ label: e }) => `Поле «${e ?? "значение"}» обязательно`
|
|
65
|
+
}, fe = {};
|
|
66
|
+
function pe(e) {
|
|
67
|
+
fe = {
|
|
68
|
+
...fe,
|
|
69
|
+
...e
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function Z(e, t) {
|
|
73
|
+
let n = fe[e];
|
|
74
|
+
return n ? typeof n == "function" ? n(t) : n : de[e]?.(t) ?? `Ошибка валидации: ${e}`;
|
|
75
|
+
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region src/utils/validation/rules.ts
|
|
78
|
+
var me = "__uid_nullable__";
|
|
79
|
+
function Q(e) {
|
|
80
|
+
return e == null || String(e).trim() === "";
|
|
81
|
+
}
|
|
82
|
+
function $(e, t) {
|
|
83
|
+
return t ? {
|
|
84
|
+
...e,
|
|
85
|
+
params: t
|
|
86
|
+
} : e;
|
|
87
|
+
}
|
|
88
|
+
var he = (e) => (t, n) => !Q(t) || (e ?? Z("required", n)), ge = () => (e) => Q(e) ? me : !0, _e = (e) => (t, n) => Q(t) || /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(String(t)) || (e ?? Z("email", n)), ve = (e) => (t, n) => {
|
|
89
|
+
if (Q(t)) return !0;
|
|
90
|
+
try {
|
|
91
|
+
return new URL(String(t)), !0;
|
|
92
|
+
} catch {
|
|
93
|
+
return e ?? Z("url", n);
|
|
94
|
+
}
|
|
95
|
+
}, ye = (e) => (t, n) => Q(t) || !isNaN(Number(t)) || (e ?? Z("numeric", n)), be = (e) => (t, n) => Q(t) || Number.isInteger(Number(t)) || (e ?? Z("integer", n)), xe = (e, t) => (n, r) => Q(n) || String(n).length >= e || (t ?? Z("min", $(r, [String(e)]))), Se = (e, t) => (n, r) => Q(n) || String(n).length <= e || (t ?? Z("max", $(r, [String(e)]))), Ce = (e, t) => (n, r) => Q(n) || Number(n) >= e || (t ?? Z("min_value", $(r, [String(e)]))), we = (e, t) => (n, r) => Q(n) || Number(n) <= e || (t ?? Z("max_value", $(r, [String(e)]))), Te = (e, t) => (n, r) => Q(n) ? !0 : (typeof e == "string" ? new RegExp(e) : e).test(String(n)) || (t ?? Z("regex", r)), Ee = (e, t) => (n, r) => Q(n) || e.includes(String(n)) || (t ?? Z("in", r)), De = (e, t) => (n, r) => r.form ? n === r.form[e] || (t ?? Z("same_as", r)) : !0, Oe = (e, t, n) => (r, i) => !i.form || i.form[e] !== t ? !0 : !Q(r) || (n ?? Z("required_if", i)), ke = (e, t, n) => (r, i) => !i.form || i.form[e] === t ? !0 : !Q(r) || (n ?? Z("required_unless", i)), Ae = {
|
|
96
|
+
required: () => he(),
|
|
97
|
+
nullable: () => ge(),
|
|
98
|
+
email: () => _e(),
|
|
99
|
+
url: () => ve(),
|
|
100
|
+
numeric: () => ye(),
|
|
101
|
+
integer: () => be(),
|
|
102
|
+
min: ([e]) => xe(Number(e)),
|
|
103
|
+
max: ([e]) => Se(Number(e)),
|
|
104
|
+
min_value: ([e]) => Ce(Number(e)),
|
|
105
|
+
max_value: ([e]) => we(Number(e)),
|
|
106
|
+
regex: ([e]) => Te(e),
|
|
107
|
+
in: (e) => Ee(e),
|
|
108
|
+
same_as: ([e]) => De(e)
|
|
109
|
+
};
|
|
110
|
+
function je(e) {
|
|
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 = Ae[n];
|
|
113
|
+
if (!a) throw Error(`Unknown validation rule: "${n}"`);
|
|
114
|
+
return a(i);
|
|
115
|
+
})) : [];
|
|
116
|
+
}
|
|
117
|
+
function Me(e, t, n) {
|
|
118
|
+
for (let r of t) {
|
|
119
|
+
let t = r(e, n);
|
|
120
|
+
if (t === "__uid_nullable__") return "";
|
|
121
|
+
if (t !== !0) return t;
|
|
122
|
+
}
|
|
123
|
+
return "";
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
//#region src/composables/useField.ts
|
|
127
|
+
function Ne(e, t, n) {
|
|
128
|
+
let r = w(""), i = w(!1);
|
|
129
|
+
function a() {
|
|
130
|
+
let i = je(t && "value" in t ? t.value : t), a = {
|
|
131
|
+
field: n?.name ?? "",
|
|
132
|
+
label: n?.label,
|
|
133
|
+
form: n?.form?.value
|
|
134
|
+
};
|
|
135
|
+
return r.value = Me(e.value, i, a), !r.value;
|
|
136
|
+
}
|
|
137
|
+
function o() {
|
|
138
|
+
i.value = !0, a();
|
|
139
|
+
}
|
|
140
|
+
function s() {
|
|
141
|
+
r.value = "", i.value = !1;
|
|
142
|
+
}
|
|
143
|
+
return L(e, () => {
|
|
144
|
+
i.value && a();
|
|
145
|
+
}), {
|
|
146
|
+
error: r,
|
|
147
|
+
touched: i,
|
|
148
|
+
validate: a,
|
|
149
|
+
onBlur: o,
|
|
150
|
+
reset: s
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/components/Input/UidInput.vue?vue&type=script&setup=true&lang.ts
|
|
155
|
+
var Pe = ["for"], Fe = {
|
|
156
|
+
key: 0,
|
|
157
|
+
class: "uid-input-field__required",
|
|
158
|
+
"aria-hidden": "true"
|
|
159
|
+
}, Ie = { class: "uid-input-field__control" }, Le = {
|
|
160
|
+
key: 0,
|
|
161
|
+
class: "uid-input-field__prepend"
|
|
162
|
+
}, Re = [
|
|
163
|
+
"id",
|
|
164
|
+
"type",
|
|
165
|
+
"name",
|
|
166
|
+
"placeholder",
|
|
167
|
+
"disabled",
|
|
168
|
+
"readonly",
|
|
169
|
+
"required",
|
|
170
|
+
"autocomplete",
|
|
171
|
+
"aria-invalid",
|
|
172
|
+
"aria-describedby"
|
|
173
|
+
], ze = {
|
|
174
|
+
key: 1,
|
|
175
|
+
class: "uid-input-field__append"
|
|
176
|
+
}, Be = ["id"], Ve = /* @__PURE__ */ f({
|
|
177
|
+
__name: "UidInput",
|
|
178
|
+
props: /* @__PURE__ */ m({
|
|
179
|
+
type: { default: "text" },
|
|
180
|
+
placeholder: {},
|
|
181
|
+
disabled: {
|
|
182
|
+
type: Boolean,
|
|
183
|
+
default: !1
|
|
184
|
+
},
|
|
185
|
+
readonly: {
|
|
186
|
+
type: Boolean,
|
|
187
|
+
default: !1
|
|
188
|
+
},
|
|
189
|
+
size: { default: "md" },
|
|
190
|
+
label: {},
|
|
191
|
+
hint: {},
|
|
192
|
+
error: {},
|
|
193
|
+
required: {
|
|
194
|
+
type: Boolean,
|
|
195
|
+
default: !1
|
|
196
|
+
},
|
|
197
|
+
name: {},
|
|
198
|
+
rules: {},
|
|
199
|
+
id: {},
|
|
200
|
+
autocomplete: {}
|
|
201
|
+
}, {
|
|
202
|
+
modelValue: { default: "" },
|
|
203
|
+
modelModifiers: {}
|
|
204
|
+
}),
|
|
205
|
+
emits: /* @__PURE__ */ m(["blur", "focus"], ["update:modelValue"]),
|
|
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 } = Ne(o, a(() => r.rules), {
|
|
208
|
+
name: r.name,
|
|
209
|
+
label: r.label
|
|
210
|
+
}), h = a(() => r.error || f.value), g = a(() => !!h.value), v = a(() => h.value || r.hint);
|
|
211
|
+
function y(e) {
|
|
212
|
+
m(), i("blur", e);
|
|
213
|
+
}
|
|
214
|
+
return t({ validate: p }), (t, n) => (x(), c("div", { class: _(["uid-input-field", [
|
|
215
|
+
`uid-input-field--${e.size}`,
|
|
216
|
+
g.value && "uid-input-field--error",
|
|
217
|
+
e.disabled && "uid-input-field--disabled",
|
|
218
|
+
e.readonly && "uid-input-field--readonly"
|
|
219
|
+
]]) }, [
|
|
220
|
+
e.label ? (x(), c("label", {
|
|
221
|
+
key: 0,
|
|
222
|
+
for: j(d),
|
|
223
|
+
class: "uid-input-field__label"
|
|
224
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", Fe, "*")) : s("", !0)], 8, Pe)) : s("", !0),
|
|
225
|
+
l("div", Ie, [
|
|
226
|
+
t.$slots.prepend ? (x(), c("span", Le, [E(t.$slots, "prepend")])) : s("", !0),
|
|
227
|
+
z(l("input", {
|
|
228
|
+
id: j(d),
|
|
229
|
+
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
230
|
+
class: "uid-input-field__input",
|
|
231
|
+
type: e.type,
|
|
232
|
+
name: e.name,
|
|
233
|
+
placeholder: e.placeholder,
|
|
234
|
+
disabled: e.disabled,
|
|
235
|
+
readonly: e.readonly,
|
|
236
|
+
required: e.required,
|
|
237
|
+
autocomplete: e.autocomplete,
|
|
238
|
+
"aria-invalid": g.value ? "true" : void 0,
|
|
239
|
+
"aria-describedby": v.value ? `${j(d)}-hint` : void 0,
|
|
240
|
+
onBlur: y,
|
|
241
|
+
onFocus: n[1] ||= (e) => i("focus", e)
|
|
242
|
+
}, null, 40, Re), [[F, o.value]]),
|
|
243
|
+
t.$slots.append ? (x(), c("span", ze, [E(t.$slots, "append")])) : s("", !0)
|
|
244
|
+
]),
|
|
245
|
+
v.value ? (x(), c("p", {
|
|
246
|
+
key: 1,
|
|
247
|
+
id: `${j(d)}-hint`,
|
|
248
|
+
class: _(["uid-input-field__hint", g.value && "uid-input-field__hint--error"])
|
|
249
|
+
}, k(v.value), 11, Be)) : s("", !0)
|
|
250
|
+
], 2));
|
|
251
|
+
}
|
|
252
|
+
}), He = ["for"], Ue = {
|
|
253
|
+
key: 0,
|
|
254
|
+
class: "uid-textarea-field__required",
|
|
255
|
+
"aria-hidden": "true"
|
|
256
|
+
}, We = [
|
|
257
|
+
"id",
|
|
258
|
+
"name",
|
|
259
|
+
"placeholder",
|
|
260
|
+
"disabled",
|
|
261
|
+
"readonly",
|
|
262
|
+
"required",
|
|
263
|
+
"rows",
|
|
264
|
+
"aria-invalid",
|
|
265
|
+
"aria-describedby"
|
|
266
|
+
], Ge = ["id"], Ke = /* @__PURE__ */ f({
|
|
267
|
+
__name: "UidTextarea",
|
|
268
|
+
props: /* @__PURE__ */ m({
|
|
269
|
+
placeholder: { default: void 0 },
|
|
270
|
+
disabled: {
|
|
271
|
+
type: Boolean,
|
|
272
|
+
default: !1
|
|
273
|
+
},
|
|
274
|
+
readonly: {
|
|
275
|
+
type: Boolean,
|
|
276
|
+
default: !1
|
|
277
|
+
},
|
|
278
|
+
size: { default: "md" },
|
|
279
|
+
label: { default: void 0 },
|
|
280
|
+
hint: { default: void 0 },
|
|
281
|
+
error: { default: void 0 },
|
|
282
|
+
required: {
|
|
283
|
+
type: Boolean,
|
|
284
|
+
default: !1
|
|
285
|
+
},
|
|
286
|
+
name: { default: void 0 },
|
|
287
|
+
rules: {
|
|
288
|
+
type: [
|
|
289
|
+
String,
|
|
290
|
+
Function,
|
|
291
|
+
Array
|
|
292
|
+
],
|
|
293
|
+
default: void 0
|
|
294
|
+
},
|
|
295
|
+
id: { default: void 0 },
|
|
296
|
+
rows: { default: 3 },
|
|
297
|
+
autoGrow: {
|
|
298
|
+
type: Boolean,
|
|
299
|
+
default: !1
|
|
300
|
+
},
|
|
301
|
+
maxRows: { default: void 0 },
|
|
302
|
+
resize: { default: "vertical" }
|
|
303
|
+
}, {
|
|
304
|
+
modelValue: { default: "" },
|
|
305
|
+
modelModifiers: {}
|
|
306
|
+
}),
|
|
307
|
+
emits: /* @__PURE__ */ m(["blur", "focus"], ["update:modelValue"]),
|
|
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 } = Ne(o, a(() => r.rules), {
|
|
310
|
+
name: r.name,
|
|
311
|
+
label: r.label
|
|
312
|
+
}), S = a(() => r.error || m.value), C = a(() => !!S.value), T = a(() => S.value || r.hint);
|
|
313
|
+
function E() {
|
|
314
|
+
let e = d.value;
|
|
315
|
+
if (!e) return;
|
|
316
|
+
let t = getComputedStyle(e);
|
|
317
|
+
e.style.height = "auto";
|
|
318
|
+
let n = e.scrollHeight;
|
|
319
|
+
if (r.maxRows) {
|
|
320
|
+
let e = parseFloat(t.lineHeight) || parseFloat(t.fontSize) * 1.5, i = parseFloat(t.paddingTop) + parseFloat(t.paddingBottom);
|
|
321
|
+
n = Math.min(n, e * r.maxRows + i);
|
|
322
|
+
}
|
|
323
|
+
e.style.height = `${n}px`;
|
|
324
|
+
}
|
|
325
|
+
y(() => {
|
|
326
|
+
r.autoGrow && E();
|
|
327
|
+
}), L(o, async () => {
|
|
328
|
+
r.autoGrow && (await g(), E());
|
|
329
|
+
});
|
|
330
|
+
function D(e) {
|
|
331
|
+
b(), i("blur", e);
|
|
332
|
+
}
|
|
333
|
+
return t({ validate: h }), (t, n) => (x(), c("div", { class: _(["uid-textarea-field", [
|
|
334
|
+
`uid-textarea-field--${e.size}`,
|
|
335
|
+
C.value && "uid-textarea-field--error",
|
|
336
|
+
e.disabled && "uid-textarea-field--disabled",
|
|
337
|
+
e.readonly && "uid-textarea-field--readonly"
|
|
338
|
+
]]) }, [
|
|
339
|
+
e.label ? (x(), c("label", {
|
|
340
|
+
key: 0,
|
|
341
|
+
for: j(p),
|
|
342
|
+
class: "uid-textarea-field__label"
|
|
343
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", Ue, "*")) : s("", !0)], 8, He)) : s("", !0),
|
|
344
|
+
z(l("textarea", {
|
|
345
|
+
id: j(p),
|
|
346
|
+
ref_key: "textareaRef",
|
|
347
|
+
ref: d,
|
|
348
|
+
"onUpdate:modelValue": n[0] ||= (e) => o.value = e,
|
|
349
|
+
class: "uid-textarea-field__textarea",
|
|
350
|
+
name: e.name,
|
|
351
|
+
placeholder: e.placeholder,
|
|
352
|
+
disabled: e.disabled,
|
|
353
|
+
readonly: e.readonly,
|
|
354
|
+
required: e.required,
|
|
355
|
+
rows: e.rows,
|
|
356
|
+
"aria-invalid": C.value ? "true" : void 0,
|
|
357
|
+
"aria-describedby": T.value ? `${j(p)}-hint` : void 0,
|
|
358
|
+
style: v(e.autoGrow ? {
|
|
359
|
+
resize: "none",
|
|
360
|
+
overflow: "hidden"
|
|
361
|
+
} : { resize: e.resize }),
|
|
362
|
+
onBlur: D,
|
|
363
|
+
onFocus: n[1] ||= (e) => i("focus", e)
|
|
364
|
+
}, null, 44, We), [[I, o.value]]),
|
|
365
|
+
T.value ? (x(), c("p", {
|
|
366
|
+
key: 1,
|
|
367
|
+
id: `${j(p)}-hint`,
|
|
368
|
+
class: _(["uid-textarea-field__hint", C.value && "uid-textarea-field__hint--error"])
|
|
369
|
+
}, k(T.value), 11, Ge)) : s("", !0)
|
|
370
|
+
], 2));
|
|
371
|
+
}
|
|
372
|
+
}), qe = { class: "uid-checkbox__label" }, Je = [
|
|
373
|
+
"id",
|
|
374
|
+
"name",
|
|
375
|
+
"checked",
|
|
376
|
+
"disabled",
|
|
377
|
+
"required",
|
|
378
|
+
"aria-describedby",
|
|
379
|
+
"aria-invalid"
|
|
380
|
+
], Ye = {
|
|
381
|
+
key: 0,
|
|
382
|
+
class: "uid-checkbox__text"
|
|
383
|
+
}, Xe = {
|
|
384
|
+
key: 0,
|
|
385
|
+
class: "uid-checkbox__required",
|
|
386
|
+
"aria-hidden": "true"
|
|
387
|
+
}, Ze = /* @__PURE__ */ f({
|
|
388
|
+
__name: "UidCheckbox",
|
|
389
|
+
props: /* @__PURE__ */ m({
|
|
390
|
+
label: { default: void 0 },
|
|
391
|
+
hint: { default: void 0 },
|
|
392
|
+
error: { default: void 0 },
|
|
393
|
+
disabled: {
|
|
394
|
+
type: Boolean,
|
|
395
|
+
default: !1
|
|
396
|
+
},
|
|
397
|
+
required: {
|
|
398
|
+
type: Boolean,
|
|
399
|
+
default: !1
|
|
400
|
+
},
|
|
401
|
+
name: { default: void 0 },
|
|
402
|
+
id: { default: void 0 },
|
|
403
|
+
indeterminate: {
|
|
404
|
+
type: Boolean,
|
|
405
|
+
default: !1
|
|
406
|
+
}
|
|
407
|
+
}, {
|
|
408
|
+
modelValue: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
default: !1
|
|
411
|
+
},
|
|
412
|
+
modelModifiers: {}
|
|
413
|
+
}),
|
|
414
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
415
|
+
setup(e, { emit: t }) {
|
|
416
|
+
let n = e, r = t, i = N(e, "modelValue"), o = w(null), d = M(), f = n.id ?? d, p = `${f}-hint`, m = a(() => !!n.error), h = a(() => n.error || n.hint);
|
|
417
|
+
function g(e) {
|
|
418
|
+
o.value && (o.value.indeterminate = e);
|
|
419
|
+
}
|
|
420
|
+
y(() => g(n.indeterminate)), L(() => n.indeterminate, g);
|
|
421
|
+
function v(e) {
|
|
422
|
+
let t = e.target.checked;
|
|
423
|
+
i.value = t, r("change", t);
|
|
424
|
+
}
|
|
425
|
+
return (t, n) => (x(), c("div", { class: _(["uid-checkbox", [m.value && "uid-checkbox--error", e.disabled && "uid-checkbox--disabled"]]) }, [l("label", qe, [
|
|
426
|
+
l("input", {
|
|
427
|
+
id: j(f),
|
|
428
|
+
ref_key: "inputRef",
|
|
429
|
+
ref: o,
|
|
430
|
+
type: "checkbox",
|
|
431
|
+
class: "uid-checkbox__input",
|
|
432
|
+
name: e.name,
|
|
433
|
+
checked: i.value,
|
|
434
|
+
disabled: e.disabled,
|
|
435
|
+
required: e.required,
|
|
436
|
+
"aria-describedby": h.value ? p : void 0,
|
|
437
|
+
"aria-invalid": m.value ? "true" : void 0,
|
|
438
|
+
onChange: v
|
|
439
|
+
}, null, 40, Je),
|
|
440
|
+
n[0] ||= l("span", {
|
|
441
|
+
class: "uid-checkbox__box",
|
|
442
|
+
"aria-hidden": "true"
|
|
443
|
+
}, null, -1),
|
|
444
|
+
e.label ? (x(), c("span", Ye, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", Xe, "*")) : s("", !0)])) : s("", !0)
|
|
445
|
+
]), h.value ? (x(), c("p", {
|
|
446
|
+
key: 0,
|
|
447
|
+
id: p,
|
|
448
|
+
class: _(["uid-checkbox__hint", m.value && "uid-checkbox__hint--error"])
|
|
449
|
+
}, k(h.value), 3)) : s("", !0)], 2));
|
|
450
|
+
}
|
|
451
|
+
}), Qe = Symbol("uid-radio-group"), $e = [
|
|
452
|
+
"id",
|
|
453
|
+
"name",
|
|
454
|
+
"checked",
|
|
455
|
+
"disabled"
|
|
456
|
+
], et = {
|
|
457
|
+
key: 0,
|
|
458
|
+
class: "uid-radio__text"
|
|
459
|
+
}, tt = /* @__PURE__ */ f({
|
|
460
|
+
__name: "UidRadio",
|
|
461
|
+
props: /* @__PURE__ */ m({
|
|
462
|
+
value: { type: [
|
|
463
|
+
String,
|
|
464
|
+
Number,
|
|
465
|
+
Boolean,
|
|
466
|
+
null
|
|
467
|
+
] },
|
|
468
|
+
label: { default: void 0 },
|
|
469
|
+
disabled: {
|
|
470
|
+
type: Boolean,
|
|
471
|
+
default: !1
|
|
472
|
+
},
|
|
473
|
+
name: { default: void 0 },
|
|
474
|
+
id: { default: void 0 }
|
|
475
|
+
}, {
|
|
476
|
+
modelValue: { type: [
|
|
477
|
+
String,
|
|
478
|
+
Number,
|
|
479
|
+
Boolean,
|
|
480
|
+
null
|
|
481
|
+
] },
|
|
482
|
+
modelModifiers: {}
|
|
483
|
+
}),
|
|
484
|
+
emits: ["update:modelValue"],
|
|
485
|
+
setup(e) {
|
|
486
|
+
let t = e, n = N(e, "modelValue"), r = p(Qe, 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
|
+
function m() {
|
|
488
|
+
r ? r.update(t.value) : n.value = t.value;
|
|
489
|
+
}
|
|
490
|
+
return (t, n) => (x(), c("label", { class: _(["uid-radio", f.value && "uid-radio--disabled"]) }, [
|
|
491
|
+
l("input", {
|
|
492
|
+
id: j(o),
|
|
493
|
+
type: "radio",
|
|
494
|
+
class: "uid-radio__input",
|
|
495
|
+
name: d.value,
|
|
496
|
+
checked: u.value,
|
|
497
|
+
disabled: f.value,
|
|
498
|
+
onChange: m
|
|
499
|
+
}, null, 40, $e),
|
|
500
|
+
n[0] ||= l("span", {
|
|
501
|
+
class: "uid-radio__circle",
|
|
502
|
+
"aria-hidden": "true"
|
|
503
|
+
}, null, -1),
|
|
504
|
+
e.label ? (x(), c("span", et, k(e.label), 1)) : s("", !0)
|
|
505
|
+
], 2));
|
|
506
|
+
}
|
|
507
|
+
}), nt = [
|
|
508
|
+
"aria-labelledby",
|
|
509
|
+
"aria-describedby",
|
|
510
|
+
"aria-required",
|
|
511
|
+
"aria-invalid",
|
|
512
|
+
"aria-disabled"
|
|
513
|
+
], rt = ["id"], it = {
|
|
514
|
+
key: 0,
|
|
515
|
+
class: "uid-radio-group__required",
|
|
516
|
+
"aria-hidden": "true"
|
|
517
|
+
}, at = { class: "uid-radio-group__options" }, ot = ["id"], st = /* @__PURE__ */ f({
|
|
518
|
+
__name: "UidRadioGroup",
|
|
519
|
+
props: /* @__PURE__ */ m({
|
|
520
|
+
name: { default: void 0 },
|
|
521
|
+
label: { default: void 0 },
|
|
522
|
+
hint: { default: void 0 },
|
|
523
|
+
error: { default: void 0 },
|
|
524
|
+
required: {
|
|
525
|
+
type: Boolean,
|
|
526
|
+
default: !1
|
|
527
|
+
},
|
|
528
|
+
disabled: {
|
|
529
|
+
type: Boolean,
|
|
530
|
+
default: !1
|
|
531
|
+
},
|
|
532
|
+
direction: { default: "vertical" }
|
|
533
|
+
}, {
|
|
534
|
+
modelValue: { type: [
|
|
535
|
+
String,
|
|
536
|
+
Number,
|
|
537
|
+
Boolean,
|
|
538
|
+
null
|
|
539
|
+
] },
|
|
540
|
+
modelModifiers: {}
|
|
541
|
+
}),
|
|
542
|
+
emits: ["update:modelValue"],
|
|
543
|
+
setup(e) {
|
|
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(Qe, {
|
|
546
|
+
modelValue: n,
|
|
547
|
+
update: (e) => {
|
|
548
|
+
n.value = e;
|
|
549
|
+
},
|
|
550
|
+
name: i,
|
|
551
|
+
disabled: a(() => t.disabled)
|
|
552
|
+
}), (t, n) => (x(), c("div", {
|
|
553
|
+
role: "radiogroup",
|
|
554
|
+
class: _(["uid-radio-group", [
|
|
555
|
+
`uid-radio-group--${e.direction}`,
|
|
556
|
+
f.value && "uid-radio-group--error",
|
|
557
|
+
e.disabled && "uid-radio-group--disabled"
|
|
558
|
+
]]),
|
|
559
|
+
"aria-labelledby": e.label ? j(o) : void 0,
|
|
560
|
+
"aria-describedby": p.value ? j(d) : void 0,
|
|
561
|
+
"aria-required": e.required ? "true" : void 0,
|
|
562
|
+
"aria-invalid": f.value ? "true" : void 0,
|
|
563
|
+
"aria-disabled": e.disabled ? "true" : void 0
|
|
564
|
+
}, [
|
|
565
|
+
e.label ? (x(), c("p", {
|
|
566
|
+
key: 0,
|
|
567
|
+
id: j(o),
|
|
568
|
+
class: "uid-radio-group__legend"
|
|
569
|
+
}, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", it, "*")) : s("", !0)], 8, rt)) : s("", !0),
|
|
570
|
+
l("div", at, [E(t.$slots, "default")]),
|
|
571
|
+
p.value ? (x(), c("p", {
|
|
572
|
+
key: 1,
|
|
573
|
+
id: j(d),
|
|
574
|
+
class: _(["uid-radio-group__hint", f.value && "uid-radio-group__hint--error"])
|
|
575
|
+
}, k(p.value), 11, ot)) : s("", !0)
|
|
576
|
+
], 10, nt));
|
|
577
|
+
}
|
|
578
|
+
}), ct = { class: "uid-switch__label" }, lt = [
|
|
579
|
+
"id",
|
|
580
|
+
"name",
|
|
581
|
+
"checked",
|
|
582
|
+
"disabled",
|
|
583
|
+
"required",
|
|
584
|
+
"aria-describedby",
|
|
585
|
+
"aria-invalid"
|
|
586
|
+
], ut = {
|
|
587
|
+
key: 0,
|
|
588
|
+
class: "uid-switch__text"
|
|
589
|
+
}, dt = {
|
|
590
|
+
key: 0,
|
|
591
|
+
class: "uid-switch__required",
|
|
592
|
+
"aria-hidden": "true"
|
|
593
|
+
}, ft = /* @__PURE__ */ f({
|
|
594
|
+
__name: "UidSwitch",
|
|
595
|
+
props: /* @__PURE__ */ m({
|
|
596
|
+
label: { default: void 0 },
|
|
597
|
+
hint: { default: void 0 },
|
|
598
|
+
error: { default: void 0 },
|
|
599
|
+
disabled: {
|
|
600
|
+
type: Boolean,
|
|
601
|
+
default: !1
|
|
602
|
+
},
|
|
603
|
+
required: {
|
|
604
|
+
type: Boolean,
|
|
605
|
+
default: !1
|
|
606
|
+
},
|
|
607
|
+
name: { default: void 0 },
|
|
608
|
+
id: { default: void 0 },
|
|
609
|
+
size: { default: "md" }
|
|
610
|
+
}, {
|
|
611
|
+
modelValue: {
|
|
612
|
+
type: Boolean,
|
|
613
|
+
default: !1
|
|
614
|
+
},
|
|
615
|
+
modelModifiers: {}
|
|
616
|
+
}),
|
|
617
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
618
|
+
setup(e, { emit: t }) {
|
|
619
|
+
let n = e, r = t, i = N(e, "modelValue"), o = M(), d = n.id ?? o, f = `${d}-hint`, p = a(() => !!n.error), m = a(() => n.error || n.hint);
|
|
620
|
+
function h(e) {
|
|
621
|
+
let t = e.target.checked;
|
|
622
|
+
i.value = t, r("change", t);
|
|
623
|
+
}
|
|
624
|
+
return (t, n) => (x(), c("div", { class: _(["uid-switch", [
|
|
625
|
+
`uid-switch--${e.size}`,
|
|
626
|
+
p.value && "uid-switch--error",
|
|
627
|
+
e.disabled && "uid-switch--disabled"
|
|
628
|
+
]]) }, [l("label", ct, [
|
|
629
|
+
l("input", {
|
|
630
|
+
id: j(d),
|
|
631
|
+
type: "checkbox",
|
|
632
|
+
role: "switch",
|
|
633
|
+
class: "uid-switch__input",
|
|
634
|
+
name: e.name,
|
|
635
|
+
checked: i.value,
|
|
636
|
+
disabled: e.disabled,
|
|
637
|
+
required: e.required,
|
|
638
|
+
"aria-describedby": m.value ? f : void 0,
|
|
639
|
+
"aria-invalid": p.value ? "true" : void 0,
|
|
640
|
+
onChange: h
|
|
641
|
+
}, null, 40, lt),
|
|
642
|
+
n[0] ||= l("span", {
|
|
643
|
+
class: "uid-switch__track",
|
|
644
|
+
"aria-hidden": "true"
|
|
645
|
+
}, [l("span", { class: "uid-switch__thumb" })], -1),
|
|
646
|
+
e.label ? (x(), c("span", ut, [u(k(e.label) + " ", 1), e.required ? (x(), c("span", dt, "*")) : s("", !0)])) : s("", !0)
|
|
647
|
+
]), m.value ? (x(), c("p", {
|
|
648
|
+
key: 0,
|
|
649
|
+
id: f,
|
|
650
|
+
class: _(["uid-switch__hint", p.value && "uid-switch__hint--error"])
|
|
651
|
+
}, k(m.value), 3)) : s("", !0)], 2));
|
|
652
|
+
}
|
|
653
|
+
}), pt = ["for"], mt = {
|
|
654
|
+
key: 0,
|
|
655
|
+
class: "uid-label__required",
|
|
656
|
+
"aria-hidden": "true"
|
|
657
|
+
}, ht = /* @__PURE__ */ f({
|
|
658
|
+
__name: "UidLabel",
|
|
659
|
+
props: {
|
|
660
|
+
for: { default: void 0 },
|
|
661
|
+
required: {
|
|
662
|
+
type: Boolean,
|
|
663
|
+
default: !1
|
|
664
|
+
},
|
|
665
|
+
disabled: {
|
|
666
|
+
type: Boolean,
|
|
667
|
+
default: !1
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
setup(e) {
|
|
671
|
+
return (t, n) => (x(), c("label", {
|
|
672
|
+
class: _(["uid-label", e.disabled && "uid-label--disabled"]),
|
|
673
|
+
for: t.$props.for
|
|
674
|
+
}, [E(t.$slots, "default"), e.required ? (x(), c("span", mt, "*")) : s("", !0)], 10, pt));
|
|
675
|
+
}
|
|
676
|
+
}), gt = ["for"], _t = {
|
|
677
|
+
key: 0,
|
|
678
|
+
class: "uid-form-field__required",
|
|
679
|
+
"aria-hidden": "true"
|
|
680
|
+
}, vt = { class: "uid-form-field__content" }, yt = ["id"], bt = /* @__PURE__ */ f({
|
|
681
|
+
__name: "UidFormField",
|
|
682
|
+
props: {
|
|
683
|
+
label: { default: void 0 },
|
|
684
|
+
labelFor: { default: void 0 },
|
|
685
|
+
hint: { default: void 0 },
|
|
686
|
+
error: { default: void 0 },
|
|
687
|
+
required: {
|
|
688
|
+
type: Boolean,
|
|
689
|
+
default: !1
|
|
690
|
+
},
|
|
691
|
+
disabled: {
|
|
692
|
+
type: Boolean,
|
|
693
|
+
default: !1
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
setup(e) {
|
|
697
|
+
let t = e, n = M(), r = a(() => !!(t.error || t.hint)), i = a(() => t.error || t.hint), o = a(() => !!t.error);
|
|
698
|
+
return (t, a) => (x(), c("div", { class: _(["uid-form-field", [o.value && "uid-form-field--error", e.disabled && "uid-form-field--disabled"]]) }, [
|
|
699
|
+
e.label || t.$slots.label ? (x(), c("label", {
|
|
700
|
+
key: 0,
|
|
701
|
+
class: "uid-form-field__label",
|
|
702
|
+
for: e.labelFor
|
|
703
|
+
}, [E(t.$slots, "label", {}, () => [u(k(e.label), 1)]), e.required ? (x(), c("span", _t, "*")) : s("", !0)], 8, gt)) : s("", !0),
|
|
704
|
+
l("div", vt, [E(t.$slots, "default")]),
|
|
705
|
+
r.value ? (x(), c("p", {
|
|
706
|
+
key: 1,
|
|
707
|
+
id: j(n),
|
|
708
|
+
class: _(["uid-form-field__hint", o.value && "uid-form-field__hint--error"])
|
|
709
|
+
}, k(i.value), 11, yt)) : s("", !0)
|
|
710
|
+
], 2));
|
|
711
|
+
}
|
|
712
|
+
}), xt = ["aria-label"], St = /* @__PURE__ */ f({
|
|
713
|
+
__name: "UidSpinner",
|
|
714
|
+
props: {
|
|
715
|
+
size: { default: "md" },
|
|
716
|
+
label: { default: "Загрузка..." }
|
|
717
|
+
},
|
|
718
|
+
setup(e) {
|
|
719
|
+
return (t, n) => (x(), c("span", {
|
|
720
|
+
class: _(["uid-spinner", `uid-spinner--${e.size}`]),
|
|
721
|
+
role: "status",
|
|
722
|
+
"aria-label": e.label
|
|
723
|
+
}, null, 10, xt));
|
|
724
|
+
}
|
|
725
|
+
}), Ct = {
|
|
726
|
+
key: 0,
|
|
727
|
+
class: "uid-skeleton-lines",
|
|
728
|
+
"aria-hidden": "true"
|
|
729
|
+
}, wt = /* @__PURE__ */ f({
|
|
730
|
+
__name: "UidSkeleton",
|
|
731
|
+
props: {
|
|
732
|
+
width: { default: "100%" },
|
|
733
|
+
height: { default: "1em" },
|
|
734
|
+
rounded: {
|
|
735
|
+
type: [Boolean, String],
|
|
736
|
+
default: !1
|
|
737
|
+
},
|
|
738
|
+
lines: { default: 1 }
|
|
739
|
+
},
|
|
740
|
+
setup(e) {
|
|
741
|
+
return (n, r) => e.lines > 1 ? (x(), c("div", Ct, [(x(!0), c(t, null, T(e.lines, (t) => (x(), c("span", {
|
|
742
|
+
key: t,
|
|
743
|
+
class: _(["uid-skeleton", [e.rounded === !0 && "uid-skeleton--rounded", e.rounded === "full" && "uid-skeleton--full"]]),
|
|
744
|
+
style: v({
|
|
745
|
+
width: t === e.lines ? "60%" : e.width,
|
|
746
|
+
height: e.height
|
|
747
|
+
})
|
|
748
|
+
}, null, 6))), 128))])) : (x(), c("span", {
|
|
749
|
+
key: 1,
|
|
750
|
+
class: _(["uid-skeleton", [e.rounded === !0 && "uid-skeleton--rounded", e.rounded === "full" && "uid-skeleton--full"]]),
|
|
751
|
+
style: v({
|
|
752
|
+
width: e.width,
|
|
753
|
+
height: e.height
|
|
754
|
+
}),
|
|
755
|
+
"aria-hidden": "true"
|
|
756
|
+
}, null, 6));
|
|
757
|
+
}
|
|
758
|
+
}), Tt = /* @__PURE__ */ f({
|
|
759
|
+
__name: "UidBadge",
|
|
760
|
+
props: {
|
|
761
|
+
variant: { default: "default" },
|
|
762
|
+
size: { default: "md" },
|
|
763
|
+
dot: {
|
|
764
|
+
type: Boolean,
|
|
765
|
+
default: !1
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
setup(e) {
|
|
769
|
+
return (t, n) => (x(), c("span", { class: _(["uid-badge", [
|
|
770
|
+
`uid-badge--${e.variant}`,
|
|
771
|
+
`uid-badge--${e.size}`,
|
|
772
|
+
e.dot && "uid-badge--dot"
|
|
773
|
+
]]) }, [e.dot ? s("", !0) : E(t.$slots, "default", { key: 0 })], 2));
|
|
774
|
+
}
|
|
775
|
+
}), Et = { class: "uid-alert__icon" }, Dt = { class: "uid-alert__content" }, Ot = {
|
|
776
|
+
key: 0,
|
|
777
|
+
class: "uid-alert__title"
|
|
778
|
+
}, kt = { class: "uid-alert__body" }, At = /* @__PURE__ */ f({
|
|
779
|
+
__name: "UidAlert",
|
|
780
|
+
props: {
|
|
781
|
+
variant: { default: "info" },
|
|
782
|
+
title: { default: void 0 },
|
|
783
|
+
dismissible: {
|
|
784
|
+
type: Boolean,
|
|
785
|
+
default: !1
|
|
786
|
+
},
|
|
787
|
+
icon: { default: void 0 }
|
|
788
|
+
},
|
|
789
|
+
emits: ["dismiss"],
|
|
790
|
+
setup(t, { emit: n }) {
|
|
791
|
+
let r = t, i = n, o = {
|
|
792
|
+
info: re,
|
|
793
|
+
success: K,
|
|
794
|
+
warning: H,
|
|
795
|
+
danger: V
|
|
796
|
+
}, u = a(() => o[r.variant ?? "info"]);
|
|
797
|
+
return (n, r) => (x(), c("div", {
|
|
798
|
+
class: _(["uid-alert", `uid-alert--${t.variant}`]),
|
|
799
|
+
role: "alert"
|
|
800
|
+
}, [
|
|
801
|
+
l("span", Et, [E(n.$slots, "icon", {}, () => [d(e, {
|
|
802
|
+
icon: t.icon ?? u.value,
|
|
803
|
+
size: 18
|
|
804
|
+
}, null, 8, ["icon"])])]),
|
|
805
|
+
l("div", Dt, [t.title ? (x(), c("p", Ot, k(t.title), 1)) : s("", !0), l("div", kt, [E(n.$slots, "default")])]),
|
|
806
|
+
t.dismissible ? (x(), c("button", {
|
|
807
|
+
key: 0,
|
|
808
|
+
type: "button",
|
|
809
|
+
class: "uid-alert__close",
|
|
810
|
+
"aria-label": "Закрыть",
|
|
811
|
+
onClick: r[0] ||= (e) => i("dismiss")
|
|
812
|
+
}, [d(e, {
|
|
813
|
+
icon: j(X),
|
|
814
|
+
size: 16
|
|
815
|
+
}, null, 8, ["icon"])])) : s("", !0)
|
|
816
|
+
], 2));
|
|
817
|
+
}
|
|
818
|
+
}), jt = { class: "uid-toast__icon" }, Mt = { class: "uid-toast__content" }, Nt = {
|
|
819
|
+
key: 0,
|
|
820
|
+
class: "uid-toast__title"
|
|
821
|
+
}, Pt = { class: "uid-toast__message" }, Ft = /* @__PURE__ */ f({
|
|
822
|
+
__name: "UidToast",
|
|
823
|
+
props: {
|
|
824
|
+
id: {},
|
|
825
|
+
message: {},
|
|
826
|
+
variant: { default: "info" },
|
|
827
|
+
title: { default: void 0 }
|
|
828
|
+
},
|
|
829
|
+
emits: ["dismiss"],
|
|
830
|
+
setup(t, { emit: n }) {
|
|
831
|
+
let r = t, i = n, o = {
|
|
832
|
+
info: re,
|
|
833
|
+
success: K,
|
|
834
|
+
warning: H,
|
|
835
|
+
danger: V
|
|
836
|
+
}, u = a(() => o[r.variant ?? "info"]);
|
|
837
|
+
return (n, r) => (x(), c("div", {
|
|
838
|
+
class: _(["uid-toast", `uid-toast--${t.variant}`]),
|
|
839
|
+
role: "alert",
|
|
840
|
+
"aria-live": "polite",
|
|
841
|
+
"aria-atomic": "true"
|
|
842
|
+
}, [
|
|
843
|
+
l("span", jt, [d(e, {
|
|
844
|
+
icon: u.value,
|
|
845
|
+
size: 18
|
|
846
|
+
}, null, 8, ["icon"])]),
|
|
847
|
+
l("div", Mt, [t.title ? (x(), c("p", Nt, k(t.title), 1)) : s("", !0), l("p", Pt, k(t.message), 1)]),
|
|
848
|
+
l("button", {
|
|
849
|
+
type: "button",
|
|
850
|
+
class: "uid-toast__close",
|
|
851
|
+
"aria-label": "Закрыть",
|
|
852
|
+
onClick: r[0] ||= (e) => i("dismiss", t.id)
|
|
853
|
+
}, [d(e, {
|
|
854
|
+
icon: j(X),
|
|
855
|
+
size: 14
|
|
856
|
+
}, null, 8, ["icon"])])
|
|
857
|
+
], 2));
|
|
858
|
+
}
|
|
859
|
+
}), It = w([]), Lt = 0;
|
|
860
|
+
function Rt() {
|
|
861
|
+
function e(e) {
|
|
862
|
+
let n = typeof e == "string" ? { message: e } : e, r = {
|
|
863
|
+
id: ++Lt,
|
|
864
|
+
variant: "info",
|
|
865
|
+
duration: 4e3,
|
|
866
|
+
...n
|
|
867
|
+
};
|
|
868
|
+
return It.value.push(r), r.duration > 0 && setTimeout(() => t(r.id), r.duration), r.id;
|
|
869
|
+
}
|
|
870
|
+
function t(e) {
|
|
871
|
+
let t = It.value.findIndex((t) => t.id === e);
|
|
872
|
+
t !== -1 && It.value.splice(t, 1);
|
|
873
|
+
}
|
|
874
|
+
function n() {
|
|
875
|
+
It.value = [];
|
|
876
|
+
}
|
|
877
|
+
function r(t) {
|
|
878
|
+
return e(typeof t == "string" ? {
|
|
879
|
+
message: t,
|
|
880
|
+
variant: "success"
|
|
881
|
+
} : {
|
|
882
|
+
...t,
|
|
883
|
+
variant: "success"
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
function i(t) {
|
|
887
|
+
return e(typeof t == "string" ? {
|
|
888
|
+
message: t,
|
|
889
|
+
variant: "danger"
|
|
890
|
+
} : {
|
|
891
|
+
...t,
|
|
892
|
+
variant: "danger"
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
function a(t) {
|
|
896
|
+
return e(typeof t == "string" ? {
|
|
897
|
+
message: t,
|
|
898
|
+
variant: "warning"
|
|
899
|
+
} : {
|
|
900
|
+
...t,
|
|
901
|
+
variant: "warning"
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
function o(t) {
|
|
905
|
+
return e(typeof t == "string" ? {
|
|
906
|
+
message: t,
|
|
907
|
+
variant: "info"
|
|
908
|
+
} : {
|
|
909
|
+
...t,
|
|
910
|
+
variant: "info"
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
return {
|
|
914
|
+
toasts: C(It),
|
|
915
|
+
add: e,
|
|
916
|
+
dismiss: t,
|
|
917
|
+
clear: n,
|
|
918
|
+
success: r,
|
|
919
|
+
error: i,
|
|
920
|
+
warning: a,
|
|
921
|
+
info: o
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
//#endregion
|
|
925
|
+
//#region src/components/Toast/UidToastProvider.vue
|
|
926
|
+
var zt = /* @__PURE__ */ f({
|
|
927
|
+
__name: "UidToastProvider",
|
|
928
|
+
setup(e) {
|
|
929
|
+
let { toasts: r, dismiss: a } = Rt();
|
|
930
|
+
return (e, s) => (x(), o(n, { to: "body" }, [d(i, {
|
|
931
|
+
tag: "div",
|
|
932
|
+
name: "uid-toast",
|
|
933
|
+
class: "uid-toast-list"
|
|
934
|
+
}, {
|
|
935
|
+
default: R(() => [(x(!0), c(t, null, T(j(r), (e) => (x(), o(Ft, h({ key: e.id }, { ref_for: !0 }, e, { onDismiss: j(a) }), null, 16, ["onDismiss"]))), 128))]),
|
|
936
|
+
_: 1
|
|
937
|
+
})]));
|
|
938
|
+
}
|
|
939
|
+
}), Bt = { class: "uid-progress-wrapper" }, Vt = {
|
|
940
|
+
key: 0,
|
|
941
|
+
class: "uid-progress-header"
|
|
942
|
+
}, Ht = {
|
|
943
|
+
key: 0,
|
|
944
|
+
class: "uid-progress-label"
|
|
945
|
+
}, Ut = {
|
|
946
|
+
key: 1,
|
|
947
|
+
class: "uid-progress-value"
|
|
948
|
+
}, Wt = [
|
|
949
|
+
"aria-valuemax",
|
|
950
|
+
"aria-valuenow",
|
|
951
|
+
"aria-label"
|
|
952
|
+
], Gt = /* @__PURE__ */ f({
|
|
953
|
+
__name: "UidProgress",
|
|
954
|
+
props: {
|
|
955
|
+
value: { default: void 0 },
|
|
956
|
+
max: { default: 100 },
|
|
957
|
+
size: { default: "md" },
|
|
958
|
+
variant: { default: "default" },
|
|
959
|
+
label: { default: void 0 },
|
|
960
|
+
showValue: {
|
|
961
|
+
type: Boolean,
|
|
962
|
+
default: !1
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
setup(e) {
|
|
966
|
+
let t = e, n = a(() => {
|
|
967
|
+
if (t.value !== void 0) return Math.min(100, Math.max(0, t.value / (t.max ?? 100) * 100));
|
|
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", Bt, [e.label || e.showValue && i.value ? (x(), c("div", Vt, [e.label ? (x(), c("span", Ht, k(e.label), 1)) : s("", !0), e.showValue && i.value ? (x(), c("span", Ut, k(i.value), 1)) : s("", !0)])) : s("", !0), l("div", {
|
|
970
|
+
class: _(["uid-progress", [
|
|
971
|
+
`uid-progress--${e.size}`,
|
|
972
|
+
`uid-progress--${e.variant}`,
|
|
973
|
+
r.value && "uid-progress--indeterminate"
|
|
974
|
+
]]),
|
|
975
|
+
role: "progressbar",
|
|
976
|
+
"aria-valuemin": 0,
|
|
977
|
+
"aria-valuemax": e.max,
|
|
978
|
+
"aria-valuenow": e.value,
|
|
979
|
+
"aria-label": e.label
|
|
980
|
+
}, [r.value ? s("", !0) : (x(), c("div", {
|
|
981
|
+
key: 0,
|
|
982
|
+
class: "uid-progress__bar",
|
|
983
|
+
style: v({ width: `${n.value}%` })
|
|
984
|
+
}, null, 4))], 10, Wt)]));
|
|
985
|
+
}
|
|
986
|
+
}), Kt = [
|
|
987
|
+
"a[href]",
|
|
988
|
+
"button:not([disabled])",
|
|
989
|
+
"input:not([disabled])",
|
|
990
|
+
"select:not([disabled])",
|
|
991
|
+
"textarea:not([disabled])",
|
|
992
|
+
"[tabindex]:not([tabindex=\"-1\"])"
|
|
993
|
+
].join(", ");
|
|
994
|
+
function qt(e) {
|
|
995
|
+
let t = w(null);
|
|
996
|
+
function n() {
|
|
997
|
+
return e.value ? Array.from(e.value.querySelectorAll(Kt)).filter((e) => !e.closest("[aria-hidden=\"true\"]")) : [];
|
|
998
|
+
}
|
|
999
|
+
function r(e) {
|
|
1000
|
+
if (e.key !== "Tab") return;
|
|
1001
|
+
let t = n();
|
|
1002
|
+
if (!t.length) {
|
|
1003
|
+
e.preventDefault();
|
|
1004
|
+
return;
|
|
1005
|
+
}
|
|
1006
|
+
let r = t[0], i = t[t.length - 1];
|
|
1007
|
+
e.shiftKey ? document.activeElement === r && (e.preventDefault(), i.focus()) : document.activeElement === i && (e.preventDefault(), r.focus());
|
|
1008
|
+
}
|
|
1009
|
+
function i(i) {
|
|
1010
|
+
t.value = document.activeElement, document.addEventListener("keydown", r), (i?.value ?? n()[0] ?? e.value)?.focus();
|
|
1011
|
+
}
|
|
1012
|
+
function a() {
|
|
1013
|
+
document.removeEventListener("keydown", r), t.value?.focus(), t.value = null;
|
|
1014
|
+
}
|
|
1015
|
+
return {
|
|
1016
|
+
activate: i,
|
|
1017
|
+
deactivate: a
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
//#endregion
|
|
1021
|
+
//#region src/composables/useScrollLock.ts
|
|
1022
|
+
var Jt = 0;
|
|
1023
|
+
function Yt() {
|
|
1024
|
+
let e = !1;
|
|
1025
|
+
function t() {
|
|
1026
|
+
if (!e && (e = !0, Jt++, Jt === 1)) {
|
|
1027
|
+
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
1028
|
+
document.body.style.overflow = "hidden", e > 0 && (document.body.style.paddingRight = `${e}px`);
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
function n() {
|
|
1032
|
+
e && (e = !1, Jt--, Jt === 0 && (document.body.style.overflow = "", document.body.style.paddingRight = ""));
|
|
1033
|
+
}
|
|
1034
|
+
return {
|
|
1035
|
+
lock: t,
|
|
1036
|
+
unlock: n
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
//#endregion
|
|
1040
|
+
//#region src/components/Modal/UidModal.vue?vue&type=script&setup=true&lang.ts
|
|
1041
|
+
var Xt = ["aria-labelledby"], Zt = { class: "uid-modal__header" }, Qt = ["id"], $t = { class: "uid-modal__body" }, en = {
|
|
1042
|
+
key: 0,
|
|
1043
|
+
class: "uid-modal__footer"
|
|
1044
|
+
}, tn = /* @__PURE__ */ f({
|
|
1045
|
+
__name: "UidModal",
|
|
1046
|
+
props: /* @__PURE__ */ m({
|
|
1047
|
+
title: { default: void 0 },
|
|
1048
|
+
size: { default: "md" },
|
|
1049
|
+
closeOnOverlay: {
|
|
1050
|
+
type: Boolean,
|
|
1051
|
+
default: !0
|
|
1052
|
+
},
|
|
1053
|
+
hideClose: {
|
|
1054
|
+
type: Boolean,
|
|
1055
|
+
default: !1
|
|
1056
|
+
}
|
|
1057
|
+
}, {
|
|
1058
|
+
modelValue: {
|
|
1059
|
+
type: Boolean,
|
|
1060
|
+
default: !1
|
|
1061
|
+
},
|
|
1062
|
+
modelModifiers: {}
|
|
1063
|
+
}),
|
|
1064
|
+
emits: /* @__PURE__ */ m(["close"], ["update:modelValue"]),
|
|
1065
|
+
setup(t, { emit: i }) {
|
|
1066
|
+
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: v } = qt(m), { lock: y, unlock: b } = Yt();
|
|
1067
|
+
function S() {
|
|
1068
|
+
a.value = !1, f("close");
|
|
1069
|
+
}
|
|
1070
|
+
function C() {
|
|
1071
|
+
u.closeOnOverlay && S();
|
|
1072
|
+
}
|
|
1073
|
+
L(a, async (e) => {
|
|
1074
|
+
e ? (y(), await g(), h(), document.addEventListener("keydown", T)) : (b(), v(), document.removeEventListener("keydown", T));
|
|
1075
|
+
});
|
|
1076
|
+
function T(e) {
|
|
1077
|
+
e.key === "Escape" && S();
|
|
1078
|
+
}
|
|
1079
|
+
return (i, u) => (x(), o(n, { to: "body" }, [d(r, { name: "uid-modal" }, {
|
|
1080
|
+
default: R(() => [a.value ? (x(), c("div", {
|
|
1081
|
+
key: 0,
|
|
1082
|
+
class: "uid-modal-overlay",
|
|
1083
|
+
onClick: B(C, ["self"])
|
|
1084
|
+
}, [l("div", {
|
|
1085
|
+
ref_key: "dialogRef",
|
|
1086
|
+
ref: m,
|
|
1087
|
+
class: _(["uid-modal", `uid-modal--${t.size}`]),
|
|
1088
|
+
role: "dialog",
|
|
1089
|
+
"aria-modal": "true",
|
|
1090
|
+
"aria-labelledby": t.title ? j(p) : void 0,
|
|
1091
|
+
tabindex: "-1"
|
|
1092
|
+
}, [
|
|
1093
|
+
l("div", Zt, [E(i.$slots, "header", {}, () => [t.title ? (x(), c("p", {
|
|
1094
|
+
key: 0,
|
|
1095
|
+
id: j(p),
|
|
1096
|
+
class: "uid-modal__title"
|
|
1097
|
+
}, k(t.title), 9, Qt)) : s("", !0)]), t.hideClose ? s("", !0) : (x(), c("button", {
|
|
1098
|
+
key: 0,
|
|
1099
|
+
type: "button",
|
|
1100
|
+
class: "uid-modal__close",
|
|
1101
|
+
"aria-label": "Закрыть",
|
|
1102
|
+
onClick: S
|
|
1103
|
+
}, [d(e, {
|
|
1104
|
+
icon: j(X),
|
|
1105
|
+
size: 18
|
|
1106
|
+
}, null, 8, ["icon"])]))]),
|
|
1107
|
+
l("div", $t, [E(i.$slots, "default")]),
|
|
1108
|
+
i.$slots.footer ? (x(), c("div", en, [E(i.$slots, "footer")])) : s("", !0)
|
|
1109
|
+
], 10, Xt)])) : s("", !0)]),
|
|
1110
|
+
_: 3
|
|
1111
|
+
})]));
|
|
1112
|
+
}
|
|
1113
|
+
}), nn = ["aria-labelledby"], rn = { class: "uid-drawer__header" }, an = ["id"], on = { class: "uid-drawer__body" }, sn = {
|
|
1114
|
+
key: 0,
|
|
1115
|
+
class: "uid-drawer__footer"
|
|
1116
|
+
}, cn = /* @__PURE__ */ f({
|
|
1117
|
+
__name: "UidDrawer",
|
|
1118
|
+
props: /* @__PURE__ */ m({
|
|
1119
|
+
title: { default: void 0 },
|
|
1120
|
+
side: { default: "right" },
|
|
1121
|
+
closeOnOverlay: {
|
|
1122
|
+
type: Boolean,
|
|
1123
|
+
default: !0
|
|
1124
|
+
},
|
|
1125
|
+
hideClose: {
|
|
1126
|
+
type: Boolean,
|
|
1127
|
+
default: !1
|
|
1128
|
+
},
|
|
1129
|
+
width: { default: void 0 },
|
|
1130
|
+
height: { default: void 0 }
|
|
1131
|
+
}, {
|
|
1132
|
+
modelValue: {
|
|
1133
|
+
type: Boolean,
|
|
1134
|
+
default: !1
|
|
1135
|
+
},
|
|
1136
|
+
modelModifiers: {}
|
|
1137
|
+
}),
|
|
1138
|
+
emits: /* @__PURE__ */ m(["close"], ["update:modelValue"]),
|
|
1139
|
+
setup(t, { emit: i }) {
|
|
1140
|
+
let a = N(t, "modelValue"), u = t, f = i, p = M(), m = w(null), { activate: h, deactivate: y } = qt(m), { lock: b, unlock: S } = Yt();
|
|
1141
|
+
function C() {
|
|
1142
|
+
a.value = !1, f("close");
|
|
1143
|
+
}
|
|
1144
|
+
function T() {
|
|
1145
|
+
u.closeOnOverlay && C();
|
|
1146
|
+
}
|
|
1147
|
+
function D(e) {
|
|
1148
|
+
e.key === "Escape" && C();
|
|
1149
|
+
}
|
|
1150
|
+
return L(a, async (e) => {
|
|
1151
|
+
e ? (b(), await g(), h(), document.addEventListener("keydown", D)) : (S(), y(), document.removeEventListener("keydown", D));
|
|
1152
|
+
}), (i, u) => (x(), o(n, { to: "body" }, [d(r, { name: `uid-drawer-${t.side}` }, {
|
|
1153
|
+
default: R(() => [a.value ? (x(), c("div", {
|
|
1154
|
+
key: 0,
|
|
1155
|
+
class: "uid-drawer-overlay",
|
|
1156
|
+
onClick: B(T, ["self"])
|
|
1157
|
+
}, [l("div", {
|
|
1158
|
+
ref_key: "panelRef",
|
|
1159
|
+
ref: m,
|
|
1160
|
+
class: _(["uid-drawer", `uid-drawer--${t.side}`]),
|
|
1161
|
+
style: v({
|
|
1162
|
+
width: t.side === "bottom" ? void 0 : t.width,
|
|
1163
|
+
height: t.side === "bottom" ? t.height : void 0
|
|
1164
|
+
}),
|
|
1165
|
+
role: "dialog",
|
|
1166
|
+
"aria-modal": "true",
|
|
1167
|
+
"aria-labelledby": t.title ? j(p) : void 0,
|
|
1168
|
+
tabindex: "-1"
|
|
1169
|
+
}, [
|
|
1170
|
+
l("div", rn, [E(i.$slots, "header", {}, () => [t.title ? (x(), c("p", {
|
|
1171
|
+
key: 0,
|
|
1172
|
+
id: j(p),
|
|
1173
|
+
class: "uid-drawer__title"
|
|
1174
|
+
}, k(t.title), 9, an)) : s("", !0)]), t.hideClose ? s("", !0) : (x(), c("button", {
|
|
1175
|
+
key: 0,
|
|
1176
|
+
type: "button",
|
|
1177
|
+
class: "uid-drawer__close",
|
|
1178
|
+
"aria-label": "Закрыть",
|
|
1179
|
+
onClick: C
|
|
1180
|
+
}, [d(e, {
|
|
1181
|
+
icon: j(X),
|
|
1182
|
+
size: 18
|
|
1183
|
+
}, null, 8, ["icon"])]))]),
|
|
1184
|
+
l("div", on, [E(i.$slots, "default")]),
|
|
1185
|
+
i.$slots.footer ? (x(), c("div", sn, [E(i.$slots, "footer")])) : s("", !0)
|
|
1186
|
+
], 14, nn)])) : s("", !0)]),
|
|
1187
|
+
_: 3
|
|
1188
|
+
}, 8, ["name"])]));
|
|
1189
|
+
}
|
|
1190
|
+
}), ln = 8, un = 8;
|
|
1191
|
+
function dn(e, t, n = {}) {
|
|
1192
|
+
let r = w(0), i = w(0), o = w(A(n.placement) ?? "bottom"), s = a(() => ({
|
|
1193
|
+
position: "fixed",
|
|
1194
|
+
left: `${r.value}px`,
|
|
1195
|
+
top: `${i.value}px`
|
|
1196
|
+
}));
|
|
1197
|
+
function c() {
|
|
1198
|
+
let a = e.value, s = t.value;
|
|
1199
|
+
if (!a || !s) return;
|
|
1200
|
+
let c = a.getBoundingClientRect(), l = s.getBoundingClientRect(), u = n.offset ?? ln, d = window.innerWidth, f = window.innerHeight, p = A(n.placement) ?? "bottom";
|
|
1201
|
+
if (p.startsWith("bottom")) {
|
|
1202
|
+
let e = f - c.bottom, t = c.top;
|
|
1203
|
+
e < l.height + u && t > e && (p = p.replace("bottom", "top"));
|
|
1204
|
+
} else if (p.startsWith("top")) {
|
|
1205
|
+
let e = c.top, t = f - c.bottom;
|
|
1206
|
+
e < l.height + u && t > e && (p = p.replace("top", "bottom"));
|
|
1207
|
+
}
|
|
1208
|
+
o.value = p;
|
|
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(un, Math.min(m, d - l.width - un)), i.value = Math.max(un, Math.min(h, f - l.height - un));
|
|
1211
|
+
}
|
|
1212
|
+
return {
|
|
1213
|
+
x: r,
|
|
1214
|
+
y: i,
|
|
1215
|
+
actualPlacement: o,
|
|
1216
|
+
floatingStyle: s,
|
|
1217
|
+
update: c
|
|
1218
|
+
};
|
|
1219
|
+
}
|
|
1220
|
+
//#endregion
|
|
1221
|
+
//#region src/components/Tooltip/UidTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
1222
|
+
var fn = ["aria-describedby"], pn = ["id"], mn = /* @__PURE__ */ f({
|
|
1223
|
+
__name: "UidTooltip",
|
|
1224
|
+
props: {
|
|
1225
|
+
content: {},
|
|
1226
|
+
placement: { default: "top" },
|
|
1227
|
+
disabled: {
|
|
1228
|
+
type: Boolean,
|
|
1229
|
+
default: !1
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
1232
|
+
setup(e) {
|
|
1233
|
+
let i = e, u = M(), f = w(null), p = w(null), m = w(!1), { floatingStyle: h, update: _ } = dn(f, p, { placement: a(() => i.placement) });
|
|
1234
|
+
async function y() {
|
|
1235
|
+
i.disabled || (m.value = !0, await g(), _());
|
|
1236
|
+
}
|
|
1237
|
+
function b() {
|
|
1238
|
+
m.value = !1;
|
|
1239
|
+
}
|
|
1240
|
+
return (i, a) => (x(), c(t, null, [l("div", {
|
|
1241
|
+
ref_key: "referenceRef",
|
|
1242
|
+
ref: f,
|
|
1243
|
+
class: "uid-tooltip-anchor",
|
|
1244
|
+
"aria-describedby": m.value ? j(u) : void 0,
|
|
1245
|
+
onMouseenter: y,
|
|
1246
|
+
onMouseleave: b,
|
|
1247
|
+
onFocusin: y,
|
|
1248
|
+
onFocusout: b
|
|
1249
|
+
}, [E(i.$slots, "default")], 40, fn), (x(), o(n, { to: "body" }, [d(r, { name: "uid-tooltip" }, {
|
|
1250
|
+
default: R(() => [m.value ? (x(), c("div", {
|
|
1251
|
+
key: 0,
|
|
1252
|
+
id: j(u),
|
|
1253
|
+
ref_key: "floatingRef",
|
|
1254
|
+
ref: p,
|
|
1255
|
+
class: "uid-tooltip",
|
|
1256
|
+
role: "tooltip",
|
|
1257
|
+
style: v(j(h))
|
|
1258
|
+
}, k(e.content), 13, pn)) : s("", !0)]),
|
|
1259
|
+
_: 1
|
|
1260
|
+
})]))], 64));
|
|
1261
|
+
}
|
|
1262
|
+
}), hn = /* @__PURE__ */ f({
|
|
1263
|
+
__name: "UidPopover",
|
|
1264
|
+
props: { placement: { default: "bottom" } },
|
|
1265
|
+
setup(e) {
|
|
1266
|
+
let i = e, u = w(null), f = w(null), p = w(!1), { floatingStyle: m, update: h } = dn(u, f, { placement: a(() => i.placement) });
|
|
1267
|
+
async function _() {
|
|
1268
|
+
p.value = !p.value, p.value && (await g(), h());
|
|
1269
|
+
}
|
|
1270
|
+
function S() {
|
|
1271
|
+
p.value = !1;
|
|
1272
|
+
}
|
|
1273
|
+
function C(e) {
|
|
1274
|
+
let t = e.target;
|
|
1275
|
+
u.value?.contains(t) || f.value?.contains(t) || S();
|
|
1276
|
+
}
|
|
1277
|
+
function T(e) {
|
|
1278
|
+
e.key === "Escape" && p.value && S();
|
|
1279
|
+
}
|
|
1280
|
+
return y(() => {
|
|
1281
|
+
document.addEventListener("mousedown", C), document.addEventListener("keydown", T);
|
|
1282
|
+
}), b(() => {
|
|
1283
|
+
document.removeEventListener("mousedown", C), document.removeEventListener("keydown", T);
|
|
1284
|
+
}), (e, i) => (x(), c(t, null, [l("div", {
|
|
1285
|
+
ref_key: "referenceRef",
|
|
1286
|
+
ref: u,
|
|
1287
|
+
class: "uid-popover-trigger",
|
|
1288
|
+
onClick: _
|
|
1289
|
+
}, [E(e.$slots, "trigger")], 512), (x(), o(n, { to: "body" }, [d(r, { name: "uid-popover" }, {
|
|
1290
|
+
default: R(() => [p.value ? (x(), c("div", {
|
|
1291
|
+
key: 0,
|
|
1292
|
+
ref_key: "floatingRef",
|
|
1293
|
+
ref: f,
|
|
1294
|
+
class: "uid-popover",
|
|
1295
|
+
style: v(j(m))
|
|
1296
|
+
}, [E(e.$slots, "default")], 4)) : s("", !0)]),
|
|
1297
|
+
_: 3
|
|
1298
|
+
})]))], 64));
|
|
1299
|
+
}
|
|
1300
|
+
}), gn = Symbol("uid-menu-close"), _n = /* @__PURE__ */ f({
|
|
1301
|
+
__name: "UidMenu",
|
|
1302
|
+
setup(e) {
|
|
1303
|
+
let i = w(null), a = w(null), u = w(!1), { floatingStyle: f, update: p } = dn(i, a, { placement: "bottom-start" });
|
|
1304
|
+
function m() {
|
|
1305
|
+
return Array.from(a.value?.querySelectorAll("[role=\"menuitem\"]:not([disabled])") ?? []);
|
|
1306
|
+
}
|
|
1307
|
+
function h() {
|
|
1308
|
+
u.value = !1, i.value?.querySelector("button, [tabindex]")?.focus();
|
|
1309
|
+
}
|
|
1310
|
+
S(gn, h);
|
|
1311
|
+
async function _() {
|
|
1312
|
+
u.value = !u.value, u.value && (await g(), p(), m()[0]?.focus());
|
|
1313
|
+
}
|
|
1314
|
+
function y(e) {
|
|
1315
|
+
(e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") && !u.value && (e.preventDefault(), _());
|
|
1316
|
+
}
|
|
1317
|
+
function C(e) {
|
|
1318
|
+
let t = m(), n = t.indexOf(document.activeElement);
|
|
1319
|
+
e.key === "ArrowDown" ? (e.preventDefault(), t[(n + 1) % t.length]?.focus()) : e.key === "ArrowUp" ? (e.preventDefault(), t[(n - 1 + t.length) % t.length]?.focus()) : e.key === "Escape" ? (e.preventDefault(), h()) : e.key === "Tab" && h();
|
|
1320
|
+
}
|
|
1321
|
+
function T(e) {
|
|
1322
|
+
let t = e.target;
|
|
1323
|
+
i.value?.contains(t) || a.value?.contains(t) || (u.value = !1);
|
|
1324
|
+
}
|
|
1325
|
+
return L(u, (e) => {
|
|
1326
|
+
e ? document.addEventListener("mousedown", T) : document.removeEventListener("mousedown", T);
|
|
1327
|
+
}), b(() => {
|
|
1328
|
+
document.removeEventListener("mousedown", T);
|
|
1329
|
+
}), (e, p) => (x(), c(t, null, [l("div", {
|
|
1330
|
+
ref_key: "triggerRef",
|
|
1331
|
+
ref: i,
|
|
1332
|
+
class: "uid-menu-trigger",
|
|
1333
|
+
onClick: _,
|
|
1334
|
+
onKeydown: y
|
|
1335
|
+
}, [E(e.$slots, "trigger")], 544), (x(), o(n, { to: "body" }, [d(r, { name: "uid-menu" }, {
|
|
1336
|
+
default: R(() => [u.value ? (x(), c("div", {
|
|
1337
|
+
key: 0,
|
|
1338
|
+
ref_key: "menuRef",
|
|
1339
|
+
ref: a,
|
|
1340
|
+
class: "uid-menu",
|
|
1341
|
+
role: "menu",
|
|
1342
|
+
style: v(j(f)),
|
|
1343
|
+
onKeydown: C
|
|
1344
|
+
}, [E(e.$slots, "default")], 36)) : s("", !0)]),
|
|
1345
|
+
_: 3
|
|
1346
|
+
})]))], 64));
|
|
1347
|
+
}
|
|
1348
|
+
}), vn = ["disabled"], yn = /* @__PURE__ */ f({
|
|
1349
|
+
__name: "UidMenuItem",
|
|
1350
|
+
props: {
|
|
1351
|
+
icon: { default: void 0 },
|
|
1352
|
+
disabled: {
|
|
1353
|
+
type: Boolean,
|
|
1354
|
+
default: !1
|
|
1355
|
+
},
|
|
1356
|
+
variant: { default: "default" }
|
|
1357
|
+
},
|
|
1358
|
+
emits: ["click"],
|
|
1359
|
+
setup(e, { emit: t }) {
|
|
1360
|
+
let n = e, r = t, i = p(gn, () => {});
|
|
1361
|
+
function a(e) {
|
|
1362
|
+
n.disabled || (r("click", e), i());
|
|
1363
|
+
}
|
|
1364
|
+
return (t, n) => (x(), c("button", {
|
|
1365
|
+
type: "button",
|
|
1366
|
+
class: _(["uid-menu-item", [`uid-menu-item--${e.variant}`, { "uid-menu-item--disabled": e.disabled }]]),
|
|
1367
|
+
role: "menuitem",
|
|
1368
|
+
disabled: e.disabled,
|
|
1369
|
+
onClick: a
|
|
1370
|
+
}, [E(t.$slots, "default")], 10, vn));
|
|
1371
|
+
}
|
|
1372
|
+
}), bn = (e, t) => {
|
|
1373
|
+
let n = e.__vccOpts || e;
|
|
1374
|
+
for (let [e, r] of t) n[e] = r;
|
|
1375
|
+
return n;
|
|
1376
|
+
}, xn = {}, Sn = {
|
|
1377
|
+
class: "uid-menu-separator",
|
|
1378
|
+
role: "separator",
|
|
1379
|
+
"aria-hidden": "true"
|
|
1380
|
+
};
|
|
1381
|
+
function Cn(e, t) {
|
|
1382
|
+
return x(), c("div", Sn);
|
|
1383
|
+
}
|
|
1384
|
+
var wn = /* @__PURE__ */ bn(xn, [["render", Cn]]), Tn = Symbol("uid-tabs"), En = ["aria-orientation"], Dn = { class: "uid-tabs__panels" }, On = /* @__PURE__ */ f({
|
|
1385
|
+
__name: "UidTabs",
|
|
1386
|
+
props: /* @__PURE__ */ m({ orientation: { default: "horizontal" } }, {
|
|
1387
|
+
modelValue: { required: !0 },
|
|
1388
|
+
modelModifiers: {}
|
|
1389
|
+
}),
|
|
1390
|
+
emits: ["update:modelValue"],
|
|
1391
|
+
setup(e) {
|
|
1392
|
+
let t = N(e, "modelValue");
|
|
1393
|
+
return S(Tn, {
|
|
1394
|
+
activeTab: t,
|
|
1395
|
+
setTab: (e) => {
|
|
1396
|
+
t.value = e;
|
|
1397
|
+
},
|
|
1398
|
+
idPrefix: M()
|
|
1399
|
+
}), (t, n) => (x(), c("div", { class: _(["uid-tabs", `uid-tabs--${e.orientation}`]) }, [l("div", {
|
|
1400
|
+
class: "uid-tabs__list",
|
|
1401
|
+
role: "tablist",
|
|
1402
|
+
"aria-orientation": e.orientation
|
|
1403
|
+
}, [E(t.$slots, "list")], 8, En), l("div", Dn, [E(t.$slots, "default")])], 2));
|
|
1404
|
+
}
|
|
1405
|
+
}), kn = [
|
|
1406
|
+
"id",
|
|
1407
|
+
"aria-selected",
|
|
1408
|
+
"aria-controls",
|
|
1409
|
+
"disabled",
|
|
1410
|
+
"tabindex"
|
|
1411
|
+
], An = /* @__PURE__ */ f({
|
|
1412
|
+
__name: "UidTab",
|
|
1413
|
+
props: {
|
|
1414
|
+
value: {},
|
|
1415
|
+
disabled: {
|
|
1416
|
+
type: Boolean,
|
|
1417
|
+
default: !1
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
setup(e) {
|
|
1421
|
+
let t = e, n = p(Tn), r = a(() => n.activeTab.value === t.value), i = a(() => `${n.idPrefix}-tab-${t.value}`), o = a(() => `${n.idPrefix}-panel-${t.value}`);
|
|
1422
|
+
function s() {
|
|
1423
|
+
t.disabled || n.setTab(t.value);
|
|
1424
|
+
}
|
|
1425
|
+
function l(e) {
|
|
1426
|
+
let t = e.currentTarget, n = t.closest("[role=\"tablist\"]");
|
|
1427
|
+
if (!n) return;
|
|
1428
|
+
let r = Array.from(n.querySelectorAll("[role=\"tab\"]:not([disabled])")), i = r.indexOf(t), a = n.getAttribute("aria-orientation") === "vertical", o = a ? "ArrowUp" : "ArrowLeft", s = a ? "ArrowDown" : "ArrowRight";
|
|
1429
|
+
if (e.key === s) {
|
|
1430
|
+
e.preventDefault();
|
|
1431
|
+
let t = r[(i + 1) % r.length];
|
|
1432
|
+
t?.focus(), t?.click();
|
|
1433
|
+
} else if (e.key === o) {
|
|
1434
|
+
e.preventDefault();
|
|
1435
|
+
let t = r[(i - 1 + r.length) % r.length];
|
|
1436
|
+
t?.focus(), t?.click();
|
|
1437
|
+
} else e.key === "Home" ? (e.preventDefault(), r[0]?.focus(), r[0]?.click()) : e.key === "End" && (e.preventDefault(), r[r.length - 1]?.focus(), r[r.length - 1]?.click());
|
|
1438
|
+
}
|
|
1439
|
+
return (t, n) => (x(), c("button", {
|
|
1440
|
+
id: i.value,
|
|
1441
|
+
type: "button",
|
|
1442
|
+
class: _(["uid-tab", { "uid-tab--active": r.value }]),
|
|
1443
|
+
role: "tab",
|
|
1444
|
+
"aria-selected": r.value,
|
|
1445
|
+
"aria-controls": o.value,
|
|
1446
|
+
disabled: e.disabled || void 0,
|
|
1447
|
+
tabindex: r.value ? 0 : -1,
|
|
1448
|
+
onClick: s,
|
|
1449
|
+
onKeydown: l
|
|
1450
|
+
}, [E(t.$slots, "default")], 42, kn));
|
|
1451
|
+
}
|
|
1452
|
+
}), jn = ["id", "aria-labelledby"], Mn = /* @__PURE__ */ f({
|
|
1453
|
+
__name: "UidTabPanel",
|
|
1454
|
+
props: { value: {} },
|
|
1455
|
+
setup(e) {
|
|
1456
|
+
let t = e, n = p(Tn), r = a(() => n.activeTab.value === t.value), i = a(() => `${n.idPrefix}-panel-${t.value}`), o = a(() => `${n.idPrefix}-tab-${t.value}`);
|
|
1457
|
+
return (e, t) => r.value ? (x(), c("div", {
|
|
1458
|
+
key: 0,
|
|
1459
|
+
id: i.value,
|
|
1460
|
+
class: "uid-tab-panel",
|
|
1461
|
+
role: "tabpanel",
|
|
1462
|
+
"aria-labelledby": o.value,
|
|
1463
|
+
tabindex: "0"
|
|
1464
|
+
}, [E(e.$slots, "default")], 8, jn)) : s("", !0);
|
|
1465
|
+
}
|
|
1466
|
+
}), Nn = ["aria-label"], Pn = /* @__PURE__ */ f({
|
|
1467
|
+
__name: "UidBreadcrumb",
|
|
1468
|
+
props: {
|
|
1469
|
+
label: { default: "Навигация" },
|
|
1470
|
+
separator: { default: "/" }
|
|
1471
|
+
},
|
|
1472
|
+
setup(e) {
|
|
1473
|
+
return (t, n) => (x(), c("nav", {
|
|
1474
|
+
class: "uid-breadcrumb",
|
|
1475
|
+
"aria-label": e.label
|
|
1476
|
+
}, [l("ol", {
|
|
1477
|
+
class: "uid-breadcrumb__list",
|
|
1478
|
+
style: v({ "--uid-breadcrumb-sep": `'${e.separator}'` })
|
|
1479
|
+
}, [E(t.$slots, "default")], 4)], 8, Nn));
|
|
1480
|
+
}
|
|
1481
|
+
}), Fn = { class: "uid-breadcrumb__item" }, In = ["href"], Ln = ["aria-current"], Rn = /* @__PURE__ */ f({
|
|
1482
|
+
__name: "UidBreadcrumbItem",
|
|
1483
|
+
props: {
|
|
1484
|
+
href: { default: void 0 },
|
|
1485
|
+
current: {
|
|
1486
|
+
type: Boolean,
|
|
1487
|
+
default: !1
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
setup(e) {
|
|
1491
|
+
return (t, n) => (x(), c("li", Fn, [e.href && !e.current ? (x(), c("a", {
|
|
1492
|
+
key: 0,
|
|
1493
|
+
class: "uid-breadcrumb__link",
|
|
1494
|
+
href: e.href
|
|
1495
|
+
}, [E(t.$slots, "default")], 8, In)) : (x(), c("span", {
|
|
1496
|
+
key: 1,
|
|
1497
|
+
class: "uid-breadcrumb__current",
|
|
1498
|
+
"aria-current": e.current ? "page" : void 0
|
|
1499
|
+
}, [E(t.$slots, "default")], 8, Ln))]));
|
|
1500
|
+
}
|
|
1501
|
+
}), zn = /* @__PURE__ */ f({
|
|
1502
|
+
__name: "UidLink",
|
|
1503
|
+
props: {
|
|
1504
|
+
href: { default: void 0 },
|
|
1505
|
+
to: { default: void 0 },
|
|
1506
|
+
external: {
|
|
1507
|
+
type: Boolean,
|
|
1508
|
+
default: !1
|
|
1509
|
+
},
|
|
1510
|
+
disabled: {
|
|
1511
|
+
type: Boolean,
|
|
1512
|
+
default: !1
|
|
1513
|
+
},
|
|
1514
|
+
as: { default: void 0 }
|
|
1515
|
+
},
|
|
1516
|
+
setup(e) {
|
|
1517
|
+
let t = e, n = a(() => {
|
|
1518
|
+
if (t.as) return t.as;
|
|
1519
|
+
if (t.to !== void 0) try {
|
|
1520
|
+
return D("RouterLink");
|
|
1521
|
+
} catch {
|
|
1522
|
+
return "a";
|
|
1523
|
+
}
|
|
1524
|
+
return "a";
|
|
1525
|
+
}), r = a(() => t.to === void 0 ? {
|
|
1526
|
+
href: t.disabled ? void 0 : t.href,
|
|
1527
|
+
target: t.external ? "_blank" : void 0,
|
|
1528
|
+
rel: t.external ? "noopener noreferrer" : void 0
|
|
1529
|
+
} : { to: t.to });
|
|
1530
|
+
return (t, i) => (x(), o(O(n.value), h({ class: ["uid-link", { "uid-link--disabled": e.disabled }] }, r.value, {
|
|
1531
|
+
"aria-disabled": e.disabled || void 0,
|
|
1532
|
+
tabindex: e.disabled ? -1 : void 0
|
|
1533
|
+
}), {
|
|
1534
|
+
default: R(() => [E(t.$slots, "default")]),
|
|
1535
|
+
_: 3
|
|
1536
|
+
}, 16, [
|
|
1537
|
+
"class",
|
|
1538
|
+
"aria-disabled",
|
|
1539
|
+
"tabindex"
|
|
1540
|
+
]));
|
|
1541
|
+
}
|
|
1542
|
+
}), Bn = {
|
|
1543
|
+
class: "uid-pagination",
|
|
1544
|
+
"aria-label": "Пагинация"
|
|
1545
|
+
}, Vn = ["disabled"], Hn = {
|
|
1546
|
+
key: 0,
|
|
1547
|
+
class: "uid-pagination__ellipsis",
|
|
1548
|
+
"aria-hidden": "true"
|
|
1549
|
+
}, Un = [
|
|
1550
|
+
"aria-label",
|
|
1551
|
+
"aria-current",
|
|
1552
|
+
"onClick"
|
|
1553
|
+
], Wn = ["disabled"], Gn = /* @__PURE__ */ f({
|
|
1554
|
+
__name: "UidPagination",
|
|
1555
|
+
props: /* @__PURE__ */ m({
|
|
1556
|
+
total: {},
|
|
1557
|
+
perPage: { default: 10 },
|
|
1558
|
+
siblingCount: { default: 1 },
|
|
1559
|
+
showEdges: {
|
|
1560
|
+
type: Boolean,
|
|
1561
|
+
default: !0
|
|
1562
|
+
}
|
|
1563
|
+
}, {
|
|
1564
|
+
modelValue: { default: 1 },
|
|
1565
|
+
modelModifiers: {}
|
|
1566
|
+
}),
|
|
1567
|
+
emits: ["update:modelValue"],
|
|
1568
|
+
setup(n) {
|
|
1569
|
+
let r = N(n, "modelValue"), i = n, o = a(() => Math.max(1, Math.ceil(i.total / i.perPage)));
|
|
1570
|
+
function s(e, t, n) {
|
|
1571
|
+
if (t <= 1) return [1];
|
|
1572
|
+
if (t <= 5 + n * 2) return Array.from({ length: t }, (e, t) => t + 1);
|
|
1573
|
+
let r = Math.max(2, e - n), i = Math.min(t - 1, e + n), a = [1];
|
|
1574
|
+
r > 2 && a.push("...");
|
|
1575
|
+
for (let e = r; e <= i; e++) a.push(e);
|
|
1576
|
+
return i < t - 1 && a.push("..."), a.push(t), a;
|
|
1577
|
+
}
|
|
1578
|
+
let u = a(() => s(r.value, o.value, i.siblingCount));
|
|
1579
|
+
function f(e) {
|
|
1580
|
+
e < 1 || e > o.value || e === r.value || (r.value = e);
|
|
1581
|
+
}
|
|
1582
|
+
return (n, i) => (x(), c("nav", Bn, [
|
|
1583
|
+
l("button", {
|
|
1584
|
+
type: "button",
|
|
1585
|
+
class: "uid-pagination__btn uid-pagination__btn--nav",
|
|
1586
|
+
disabled: r.value <= 1,
|
|
1587
|
+
"aria-label": "Предыдущая страница",
|
|
1588
|
+
onClick: i[0] ||= (e) => f(r.value - 1)
|
|
1589
|
+
}, [d(e, {
|
|
1590
|
+
icon: j(q),
|
|
1591
|
+
size: 16
|
|
1592
|
+
}, null, 8, ["icon"])], 8, Vn),
|
|
1593
|
+
(x(!0), c(t, null, T(u.value, (e, n) => (x(), c(t, { key: `${n}-${e}` }, [e === "..." ? (x(), c("span", Hn, " … ")) : (x(), c("button", {
|
|
1594
|
+
key: 1,
|
|
1595
|
+
type: "button",
|
|
1596
|
+
class: _(["uid-pagination__btn", { "uid-pagination__btn--active": e === r.value }]),
|
|
1597
|
+
"aria-label": `Страница ${e}`,
|
|
1598
|
+
"aria-current": e === r.value ? "page" : void 0,
|
|
1599
|
+
onClick: (t) => f(e)
|
|
1600
|
+
}, k(e), 11, Un))], 64))), 128)),
|
|
1601
|
+
l("button", {
|
|
1602
|
+
type: "button",
|
|
1603
|
+
class: "uid-pagination__btn uid-pagination__btn--nav",
|
|
1604
|
+
disabled: r.value >= o.value,
|
|
1605
|
+
"aria-label": "Следующая страница",
|
|
1606
|
+
onClick: i[1] ||= (e) => f(r.value + 1)
|
|
1607
|
+
}, [d(e, {
|
|
1608
|
+
icon: j(J),
|
|
1609
|
+
size: 16
|
|
1610
|
+
}, null, 8, ["icon"])], 8, Wn)
|
|
1611
|
+
]));
|
|
1612
|
+
}
|
|
1613
|
+
}), Kn = {
|
|
1614
|
+
class: "uid-pagination uid-pagination--cursor",
|
|
1615
|
+
"aria-label": "Навигация по страницам"
|
|
1616
|
+
}, qn = ["disabled", "aria-label"], Jn = ["disabled", "aria-label"], Yn = /* @__PURE__ */ f({
|
|
1617
|
+
__name: "UidPaginationCursor",
|
|
1618
|
+
props: {
|
|
1619
|
+
hasPrev: {
|
|
1620
|
+
type: Boolean,
|
|
1621
|
+
default: !1
|
|
1622
|
+
},
|
|
1623
|
+
hasNext: {
|
|
1624
|
+
type: Boolean,
|
|
1625
|
+
default: !1
|
|
1626
|
+
},
|
|
1627
|
+
prevLabel: { default: "Назад" },
|
|
1628
|
+
nextLabel: { default: "Вперёд" }
|
|
1629
|
+
},
|
|
1630
|
+
emits: ["prev", "next"],
|
|
1631
|
+
setup(t, { emit: n }) {
|
|
1632
|
+
let r = n;
|
|
1633
|
+
return (n, i) => (x(), c("nav", Kn, [l("button", {
|
|
1634
|
+
type: "button",
|
|
1635
|
+
class: "uid-pagination__btn uid-pagination__btn--nav uid-pagination__btn--labeled",
|
|
1636
|
+
disabled: !t.hasPrev,
|
|
1637
|
+
"aria-label": t.prevLabel,
|
|
1638
|
+
onClick: i[0] ||= (e) => r("prev")
|
|
1639
|
+
}, [d(e, {
|
|
1640
|
+
icon: j(q),
|
|
1641
|
+
size: 16
|
|
1642
|
+
}, null, 8, ["icon"]), u(" " + k(t.prevLabel), 1)], 8, qn), l("button", {
|
|
1643
|
+
type: "button",
|
|
1644
|
+
class: "uid-pagination__btn uid-pagination__btn--nav uid-pagination__btn--labeled",
|
|
1645
|
+
disabled: !t.hasNext,
|
|
1646
|
+
"aria-label": t.nextLabel,
|
|
1647
|
+
onClick: i[1] ||= (e) => r("next")
|
|
1648
|
+
}, [u(k(t.nextLabel) + " ", 1), d(e, {
|
|
1649
|
+
icon: j(J),
|
|
1650
|
+
size: 16
|
|
1651
|
+
}, null, 8, ["icon"])], 8, Jn)]));
|
|
1652
|
+
}
|
|
1653
|
+
}), Xn = { class: "uid-load-more" }, Zn = ["disabled"], Qn = /* @__PURE__ */ f({
|
|
1654
|
+
__name: "UidLoadMore",
|
|
1655
|
+
props: {
|
|
1656
|
+
loading: {
|
|
1657
|
+
type: Boolean,
|
|
1658
|
+
default: !1
|
|
1659
|
+
},
|
|
1660
|
+
disabled: {
|
|
1661
|
+
type: Boolean,
|
|
1662
|
+
default: !1
|
|
1663
|
+
},
|
|
1664
|
+
label: { default: "Показать ещё" }
|
|
1665
|
+
},
|
|
1666
|
+
emits: ["load"],
|
|
1667
|
+
setup(e, { emit: t }) {
|
|
1668
|
+
let n = t;
|
|
1669
|
+
return (t, r) => (x(), c("div", Xn, [l("button", {
|
|
1670
|
+
type: "button",
|
|
1671
|
+
class: "uid-load-more__btn",
|
|
1672
|
+
disabled: e.disabled || e.loading,
|
|
1673
|
+
onClick: r[0] ||= (e) => n("load")
|
|
1674
|
+
}, [e.loading ? (x(), o(St, {
|
|
1675
|
+
key: 0,
|
|
1676
|
+
size: "sm"
|
|
1677
|
+
})) : s("", !0), l("span", null, k(e.label), 1)], 8, Zn)]));
|
|
1678
|
+
}
|
|
1679
|
+
}), $n = { class: "uid-infinite-scroll" }, er = {
|
|
1680
|
+
key: 0,
|
|
1681
|
+
class: "uid-infinite-scroll__loader"
|
|
1682
|
+
}, tr = /* @__PURE__ */ f({
|
|
1683
|
+
__name: "UidInfiniteScroll",
|
|
1684
|
+
props: {
|
|
1685
|
+
loading: {
|
|
1686
|
+
type: Boolean,
|
|
1687
|
+
default: !1
|
|
1688
|
+
},
|
|
1689
|
+
disabled: {
|
|
1690
|
+
type: Boolean,
|
|
1691
|
+
default: !1
|
|
1692
|
+
},
|
|
1693
|
+
rootMargin: { default: "200px" }
|
|
1694
|
+
},
|
|
1695
|
+
emits: ["load"],
|
|
1696
|
+
setup(e, { emit: t }) {
|
|
1697
|
+
let n = e, r = t, i = w(null), a = null;
|
|
1698
|
+
function o() {
|
|
1699
|
+
a?.disconnect(), a = null;
|
|
1700
|
+
}
|
|
1701
|
+
function u() {
|
|
1702
|
+
!i.value || n.disabled || (o(), a = new IntersectionObserver(([e]) => {
|
|
1703
|
+
e.isIntersecting && !n.loading && !n.disabled && r("load");
|
|
1704
|
+
}, { rootMargin: n.rootMargin }), a.observe(i.value));
|
|
1705
|
+
}
|
|
1706
|
+
return L(i, (e) => {
|
|
1707
|
+
e && u();
|
|
1708
|
+
}, { immediate: !0 }), L(() => n.disabled, (e) => {
|
|
1709
|
+
e ? o() : u();
|
|
1710
|
+
}), b(o), (t, n) => (x(), c("div", $n, [e.loading ? (x(), c("div", er, [d(St, { size: "sm" })])) : s("", !0), l("div", {
|
|
1711
|
+
ref_key: "sentinelRef",
|
|
1712
|
+
ref: i,
|
|
1713
|
+
class: "uid-infinite-scroll__sentinel",
|
|
1714
|
+
"aria-hidden": "true"
|
|
1715
|
+
}, null, 512)]));
|
|
1716
|
+
}
|
|
1717
|
+
}), nr = { class: "uid-page-size" }, rr = { class: "uid-page-size__label" }, ir = ["value"], ar = ["value"], or = /* @__PURE__ */ f({
|
|
1718
|
+
__name: "UidPageSize",
|
|
1719
|
+
props: /* @__PURE__ */ m({
|
|
1720
|
+
options: { default: () => [
|
|
1721
|
+
10,
|
|
1722
|
+
25,
|
|
1723
|
+
50,
|
|
1724
|
+
100
|
|
1725
|
+
] },
|
|
1726
|
+
label: { default: "Строк на странице:" }
|
|
1727
|
+
}, {
|
|
1728
|
+
modelValue: { default: 10 },
|
|
1729
|
+
modelModifiers: {}
|
|
1730
|
+
}),
|
|
1731
|
+
emits: ["update:modelValue"],
|
|
1732
|
+
setup(e) {
|
|
1733
|
+
let n = N(e, "modelValue");
|
|
1734
|
+
return (r, i) => (x(), c("div", nr, [l("span", rr, k(e.label), 1), l("select", {
|
|
1735
|
+
class: "uid-page-size__select",
|
|
1736
|
+
value: n.value,
|
|
1737
|
+
onChange: i[0] ||= (e) => n.value = Number(e.target.value)
|
|
1738
|
+
}, [(x(!0), c(t, null, T(e.options, (e) => (x(), c("option", {
|
|
1739
|
+
key: e,
|
|
1740
|
+
value: e
|
|
1741
|
+
}, k(e), 9, ar))), 128))], 40, ir)]));
|
|
1742
|
+
}
|
|
1743
|
+
}), sr = {
|
|
1744
|
+
key: 0,
|
|
1745
|
+
class: "uid-card__media"
|
|
1746
|
+
}, cr = {
|
|
1747
|
+
key: 1,
|
|
1748
|
+
class: "uid-card__header"
|
|
1749
|
+
}, lr = { class: "uid-card__body" }, ur = {
|
|
1750
|
+
key: 2,
|
|
1751
|
+
class: "uid-card__footer"
|
|
1752
|
+
}, dr = /* @__PURE__ */ f({
|
|
1753
|
+
__name: "UidCard",
|
|
1754
|
+
props: {
|
|
1755
|
+
padding: { default: "md" },
|
|
1756
|
+
clickable: {
|
|
1757
|
+
type: Boolean,
|
|
1758
|
+
default: !1
|
|
1759
|
+
}
|
|
1760
|
+
},
|
|
1761
|
+
setup(e) {
|
|
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", sr, [E(t.$slots, "media")])) : s("", !0),
|
|
1764
|
+
t.$slots.header ? (x(), c("div", cr, [E(t.$slots, "header")])) : s("", !0),
|
|
1765
|
+
l("div", lr, [E(t.$slots, "default")]),
|
|
1766
|
+
t.$slots.footer ? (x(), c("div", ur, [E(t.$slots, "footer")])) : s("", !0)
|
|
1767
|
+
], 2));
|
|
1768
|
+
}
|
|
1769
|
+
}), fr = ["title", "aria-label"], pr = ["src", "alt"], mr = /* @__PURE__ */ f({
|
|
1770
|
+
__name: "UidAvatar",
|
|
1771
|
+
props: {
|
|
1772
|
+
src: { default: void 0 },
|
|
1773
|
+
alt: { default: void 0 },
|
|
1774
|
+
name: { default: void 0 },
|
|
1775
|
+
size: { default: "md" },
|
|
1776
|
+
shape: { default: "circle" }
|
|
1777
|
+
},
|
|
1778
|
+
setup(e) {
|
|
1779
|
+
let t = e, n = w(!1), r = a(() => {
|
|
1780
|
+
if (!t.name) return "?";
|
|
1781
|
+
let e = t.name.trim().split(/\s+/);
|
|
1782
|
+
return e.length === 1 ? e[0][0].toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
|
|
1783
|
+
}), i = a(() => t.name ? t.name.split("").reduce((e, t) => e + t.charCodeAt(0), 0) % o.length : 0), o = [
|
|
1784
|
+
"#6366f1",
|
|
1785
|
+
"#8b5cf6",
|
|
1786
|
+
"#ec4899",
|
|
1787
|
+
"#f97316",
|
|
1788
|
+
"#22c55e",
|
|
1789
|
+
"#14b8a6",
|
|
1790
|
+
"#3b82f6",
|
|
1791
|
+
"#ef4444"
|
|
1792
|
+
], s = a(() => o[i.value]);
|
|
1793
|
+
function l() {
|
|
1794
|
+
n.value = !0;
|
|
1795
|
+
}
|
|
1796
|
+
return (t, i) => (x(), c("span", {
|
|
1797
|
+
class: _(["uid-avatar", [`uid-avatar--${e.size}`, `uid-avatar--${e.shape}`]]),
|
|
1798
|
+
title: e.name,
|
|
1799
|
+
"aria-label": e.alt ?? e.name,
|
|
1800
|
+
role: "img"
|
|
1801
|
+
}, [e.src && !n.value ? (x(), c("img", {
|
|
1802
|
+
key: 0,
|
|
1803
|
+
src: e.src,
|
|
1804
|
+
alt: e.alt ?? e.name,
|
|
1805
|
+
class: "uid-avatar__img",
|
|
1806
|
+
onError: l
|
|
1807
|
+
}, null, 40, pr)) : (x(), c("span", {
|
|
1808
|
+
key: 1,
|
|
1809
|
+
class: "uid-avatar__initials",
|
|
1810
|
+
style: v({ background: s.value }),
|
|
1811
|
+
"aria-hidden": "true"
|
|
1812
|
+
}, k(r.value), 5))], 10, fr));
|
|
1813
|
+
}
|
|
1814
|
+
}), hr = { class: "uid-avatar-group" }, gr = ["aria-label"], _r = /* @__PURE__ */ f({
|
|
1815
|
+
__name: "UidAvatarGroup",
|
|
1816
|
+
props: { max: { default: void 0 } },
|
|
1817
|
+
setup(e) {
|
|
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", hr, [(x(!0), c(t, null, T(l.value, (e, t) => (x(), o(O(e), { key: t }))), 128)), u.value > 0 ? (x(), c("span", {
|
|
1820
|
+
key: 0,
|
|
1821
|
+
class: "uid-avatar uid-avatar--md uid-avatar--circle uid-avatar-group__overflow",
|
|
1822
|
+
"aria-label": `Ещё ${u.value}`,
|
|
1823
|
+
role: "img"
|
|
1824
|
+
}, " +" + k(u.value), 9, gr)) : s("", !0)]));
|
|
1825
|
+
}
|
|
1826
|
+
}), vr = /* @__PURE__ */ f({
|
|
1827
|
+
__name: "UidTag",
|
|
1828
|
+
props: {
|
|
1829
|
+
variant: { default: "default" },
|
|
1830
|
+
size: { default: "md" },
|
|
1831
|
+
dismissible: {
|
|
1832
|
+
type: Boolean,
|
|
1833
|
+
default: !1
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
emits: ["dismiss"],
|
|
1837
|
+
setup(t, { emit: n }) {
|
|
1838
|
+
let r = n;
|
|
1839
|
+
return (n, i) => (x(), c("span", { class: _(["uid-tag", [`uid-tag--${t.variant}`, `uid-tag--${t.size}`]]) }, [E(n.$slots, "default"), t.dismissible ? (x(), c("button", {
|
|
1840
|
+
key: 0,
|
|
1841
|
+
type: "button",
|
|
1842
|
+
class: "uid-tag__dismiss",
|
|
1843
|
+
"aria-label": "Удалить",
|
|
1844
|
+
onClick: i[0] ||= B((e) => r("dismiss"), ["stop"])
|
|
1845
|
+
}, [d(e, {
|
|
1846
|
+
icon: j(X),
|
|
1847
|
+
size: 10
|
|
1848
|
+
}, null, 8, ["icon"])])) : s("", !0)], 2));
|
|
1849
|
+
}
|
|
1850
|
+
}), yr = {
|
|
1851
|
+
key: 0,
|
|
1852
|
+
class: "uid-divider__label"
|
|
1853
|
+
}, br = /* @__PURE__ */ f({
|
|
1854
|
+
__name: "UidDivider",
|
|
1855
|
+
props: {
|
|
1856
|
+
label: { default: void 0 },
|
|
1857
|
+
orientation: { default: "horizontal" }
|
|
1858
|
+
},
|
|
1859
|
+
setup(e) {
|
|
1860
|
+
return (t, n) => (x(), c("div", {
|
|
1861
|
+
class: _(["uid-divider", `uid-divider--${e.orientation}`]),
|
|
1862
|
+
role: "separator"
|
|
1863
|
+
}, [e.label && e.orientation === "horizontal" ? (x(), c("span", yr, k(e.label), 1)) : s("", !0)], 2));
|
|
1864
|
+
}
|
|
1865
|
+
}), xr = Symbol("uid-accordion"), Sr = { class: "uid-accordion" }, Cr = /* @__PURE__ */ f({
|
|
1866
|
+
__name: "UidAccordion",
|
|
1867
|
+
props: /* @__PURE__ */ m({ multiple: {
|
|
1868
|
+
type: Boolean,
|
|
1869
|
+
default: !1
|
|
1870
|
+
} }, {
|
|
1871
|
+
modelValue: { default: "" },
|
|
1872
|
+
modelModifiers: {}
|
|
1873
|
+
}),
|
|
1874
|
+
emits: ["update:modelValue"],
|
|
1875
|
+
setup(e) {
|
|
1876
|
+
let t = N(e, "modelValue"), n = a(() => {
|
|
1877
|
+
let e = t.value;
|
|
1878
|
+
return Array.isArray(e) ? new Set(e) : e ? new Set([e]) : /* @__PURE__ */ new Set();
|
|
1879
|
+
});
|
|
1880
|
+
function r(e) {
|
|
1881
|
+
return n.value.has(e);
|
|
1882
|
+
}
|
|
1883
|
+
function i(e) {
|
|
1884
|
+
let n = t.value;
|
|
1885
|
+
if (Array.isArray(n)) {
|
|
1886
|
+
let r = new Set(n);
|
|
1887
|
+
r.has(e) ? r.delete(e) : r.add(e), t.value = [...r];
|
|
1888
|
+
} else t.value = n === e ? "" : e;
|
|
1889
|
+
}
|
|
1890
|
+
return S(xr, {
|
|
1891
|
+
isOpen: r,
|
|
1892
|
+
toggle: i
|
|
1893
|
+
}), (e, t) => (x(), c("div", Sr, [E(e.$slots, "default")]));
|
|
1894
|
+
}
|
|
1895
|
+
}), wr = ["aria-expanded", "disabled"], Tr = { class: "uid-accordion-item__title" }, Er = {
|
|
1896
|
+
class: "uid-accordion-item__chevron",
|
|
1897
|
+
"aria-hidden": "true"
|
|
1898
|
+
}, Dr = ["hidden"], Or = { class: "uid-accordion-item__body-inner" }, kr = /* @__PURE__ */ f({
|
|
1899
|
+
__name: "UidAccordionItem",
|
|
1900
|
+
props: {
|
|
1901
|
+
value: {},
|
|
1902
|
+
title: {},
|
|
1903
|
+
disabled: {
|
|
1904
|
+
type: Boolean,
|
|
1905
|
+
default: !1
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
setup(t) {
|
|
1909
|
+
let n = t, r = M(), i = `${r}-header`, o = `${r}-panel`, s = p(xr), f = a(() => s.isOpen(n.value));
|
|
1910
|
+
function m() {
|
|
1911
|
+
n.disabled || s.toggle(n.value);
|
|
1912
|
+
}
|
|
1913
|
+
return (n, r) => (x(), c("div", { class: _(["uid-accordion-item", {
|
|
1914
|
+
"uid-accordion-item--open": f.value,
|
|
1915
|
+
"uid-accordion-item--disabled": t.disabled
|
|
1916
|
+
}]) }, [l("button", {
|
|
1917
|
+
id: i,
|
|
1918
|
+
type: "button",
|
|
1919
|
+
class: "uid-accordion-item__trigger",
|
|
1920
|
+
"aria-expanded": f.value,
|
|
1921
|
+
"aria-controls": o,
|
|
1922
|
+
disabled: t.disabled || void 0,
|
|
1923
|
+
onClick: m
|
|
1924
|
+
}, [l("span", Tr, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), l("span", Er, [d(e, {
|
|
1925
|
+
icon: j(ne),
|
|
1926
|
+
size: 16
|
|
1927
|
+
}, null, 8, ["icon"])])], 8, wr), l("div", {
|
|
1928
|
+
id: o,
|
|
1929
|
+
class: "uid-accordion-item__body",
|
|
1930
|
+
role: "region",
|
|
1931
|
+
"aria-labelledby": i,
|
|
1932
|
+
hidden: !f.value
|
|
1933
|
+
}, [l("div", Or, [E(n.$slots, "default")])], 8, Dr)], 2));
|
|
1934
|
+
}
|
|
1935
|
+
}), Ar = { class: "uid-table-scroll" }, jr = { class: "uid-table__head" }, Mr = ["aria-sort", "onClick"], Nr = { class: "uid-table__th-content" }, Pr = { class: "uid-table__body" }, Fr = { key: 0 }, Ir = ["colspan"], Lr = { key: 1 }, Rr = ["colspan"], zr = /* @__PURE__ */ f({
|
|
1936
|
+
__name: "UidTable",
|
|
1937
|
+
props: {
|
|
1938
|
+
columns: {},
|
|
1939
|
+
data: {},
|
|
1940
|
+
sortKey: { default: void 0 },
|
|
1941
|
+
sortDirection: { default: "asc" },
|
|
1942
|
+
loading: {
|
|
1943
|
+
type: Boolean,
|
|
1944
|
+
default: !1
|
|
1945
|
+
},
|
|
1946
|
+
emptyText: { default: "Нет данных" },
|
|
1947
|
+
striped: {
|
|
1948
|
+
type: Boolean,
|
|
1949
|
+
default: !1
|
|
1950
|
+
},
|
|
1951
|
+
bordered: {
|
|
1952
|
+
type: Boolean,
|
|
1953
|
+
default: !1
|
|
1954
|
+
}
|
|
1955
|
+
},
|
|
1956
|
+
emits: ["update:sortKey", "update:sortDirection"],
|
|
1957
|
+
setup(n, { emit: r }) {
|
|
1958
|
+
let i = n, f = r;
|
|
1959
|
+
function p(e) {
|
|
1960
|
+
e.sortable && (i.sortKey === e.key ? f("update:sortDirection", i.sortDirection === "asc" ? "desc" : "asc") : (f("update:sortKey", e.key), f("update:sortDirection", "asc")));
|
|
1961
|
+
}
|
|
1962
|
+
function m(e) {
|
|
1963
|
+
return e.sortable ? i.sortKey === e.key ? i.sortDirection === "asc" ? G : U : ee : null;
|
|
1964
|
+
}
|
|
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", Ar, [l("table", { class: _(["uid-table", { "uid-table--striped": n.striped }]) }, [l("thead", jr, [l("tr", null, [(x(!0), c(t, null, T(n.columns, (t) => (x(), c("th", {
|
|
1967
|
+
key: t.key,
|
|
1968
|
+
class: _(["uid-table__th", [
|
|
1969
|
+
`uid-table__th--${t.align ?? "left"}`,
|
|
1970
|
+
{ "uid-table__th--sortable": t.sortable },
|
|
1971
|
+
{ "uid-table__th--active": n.sortKey === t.key }
|
|
1972
|
+
]]),
|
|
1973
|
+
style: v(t.width ? { width: t.width } : void 0),
|
|
1974
|
+
"aria-sort": n.sortKey === t.key ? n.sortDirection === "asc" ? "ascending" : "descending" : t.sortable ? "none" : void 0,
|
|
1975
|
+
onClick: (e) => p(t)
|
|
1976
|
+
}, [l("span", Nr, [u(k(t.label) + " ", 1), t.sortable ? (x(), o(e, {
|
|
1977
|
+
key: 0,
|
|
1978
|
+
icon: m(t),
|
|
1979
|
+
size: 14,
|
|
1980
|
+
class: "uid-table__sort-icon"
|
|
1981
|
+
}, null, 8, ["icon"])) : s("", !0)])], 14, Mr))), 128))])]), l("tbody", Pr, [n.loading ? (x(), c("tr", Fr, [l("td", {
|
|
1982
|
+
colspan: n.columns.length,
|
|
1983
|
+
class: "uid-table__td uid-table__td--center"
|
|
1984
|
+
}, [d(St, { size: "md" })], 8, Ir)])) : h.value ? (x(), c("tr", Lr, [l("td", {
|
|
1985
|
+
colspan: n.columns.length,
|
|
1986
|
+
class: "uid-table__td uid-table__td--empty"
|
|
1987
|
+
}, [E(r.$slots, "empty", {}, () => [u(k(n.emptyText), 1)])], 8, Rr)])) : (x(!0), c(t, { key: 2 }, T(n.data, (e, i) => (x(), c("tr", {
|
|
1988
|
+
key: i,
|
|
1989
|
+
class: "uid-table__row"
|
|
1990
|
+
}, [(x(!0), c(t, null, T(n.columns, (t) => (x(), c("td", {
|
|
1991
|
+
key: t.key,
|
|
1992
|
+
class: _(["uid-table__td", `uid-table__td--${t.align ?? "left"}`])
|
|
1993
|
+
}, [E(r.$slots, t.key, { row: e }, () => [u(k(e[t.key]), 1)])], 2))), 128))]))), 128))])], 2)])], 2));
|
|
1994
|
+
}
|
|
1995
|
+
}), Br = [
|
|
1996
|
+
"aria-expanded",
|
|
1997
|
+
"aria-controls",
|
|
1998
|
+
"aria-disabled"
|
|
1999
|
+
], Vr = { class: "uid-select__suffix" }, Hr = {
|
|
2000
|
+
key: 0,
|
|
2001
|
+
class: "uid-select__dropdown"
|
|
2002
|
+
}, Ur = {
|
|
2003
|
+
key: 0,
|
|
2004
|
+
class: "uid-select__search"
|
|
2005
|
+
}, Wr = ["id"], Gr = {
|
|
2006
|
+
key: 0,
|
|
2007
|
+
class: "uid-select__group-label"
|
|
2008
|
+
}, Kr = [
|
|
2009
|
+
"data-active",
|
|
2010
|
+
"aria-selected",
|
|
2011
|
+
"aria-disabled",
|
|
2012
|
+
"onClick",
|
|
2013
|
+
"onMouseenter"
|
|
2014
|
+
], qr = {
|
|
2015
|
+
key: 1,
|
|
2016
|
+
class: "uid-select__empty"
|
|
2017
|
+
}, Jr = /* @__PURE__ */ f({
|
|
2018
|
+
__name: "UidSelect",
|
|
2019
|
+
props: /* @__PURE__ */ m({
|
|
2020
|
+
options: {},
|
|
2021
|
+
placeholder: { default: "Выберите..." },
|
|
2022
|
+
disabled: {
|
|
2023
|
+
type: Boolean,
|
|
2024
|
+
default: !1
|
|
2025
|
+
},
|
|
2026
|
+
searchable: {
|
|
2027
|
+
type: Boolean,
|
|
2028
|
+
default: !1
|
|
2029
|
+
},
|
|
2030
|
+
clearable: {
|
|
2031
|
+
type: Boolean,
|
|
2032
|
+
default: !1
|
|
2033
|
+
},
|
|
2034
|
+
size: { default: "md" }
|
|
2035
|
+
}, {
|
|
2036
|
+
modelValue: { default: null },
|
|
2037
|
+
modelModifiers: {}
|
|
2038
|
+
}),
|
|
2039
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
2040
|
+
setup(n, { emit: i }) {
|
|
2041
|
+
let u = n, f = i, p = N(n, "modelValue"), m = w(!1), h = w(""), v = w(0), y = w(null), S = w(null), C = w(null), E = w(null), D = M(), O = a(() => u.options.find((e) => e.value === p.value) ?? null), A = a(() => {
|
|
2042
|
+
if (!u.searchable || !h.value.trim()) return u.options;
|
|
2043
|
+
let e = h.value.toLowerCase();
|
|
2044
|
+
return u.options.filter((t) => t.label.toLowerCase().includes(e));
|
|
2045
|
+
}), P = a(() => {
|
|
2046
|
+
let e = /* @__PURE__ */ new Map();
|
|
2047
|
+
for (let t of A.value) {
|
|
2048
|
+
let n = t.group ?? "";
|
|
2049
|
+
e.has(n) || e.set(n, []), e.get(n).push(t);
|
|
2050
|
+
}
|
|
2051
|
+
return e;
|
|
2052
|
+
});
|
|
2053
|
+
L(m, async (e) => {
|
|
2054
|
+
if (e) {
|
|
2055
|
+
h.value = "";
|
|
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(), Y(), document.addEventListener("pointerdown", W);
|
|
2058
|
+
} else document.removeEventListener("pointerdown", W);
|
|
2059
|
+
}), L(h, () => {
|
|
2060
|
+
v.value = 0;
|
|
2061
|
+
});
|
|
2062
|
+
function F() {
|
|
2063
|
+
u.disabled || (m.value = !0);
|
|
2064
|
+
}
|
|
2065
|
+
function B() {
|
|
2066
|
+
m.value = !1;
|
|
2067
|
+
}
|
|
2068
|
+
function V() {
|
|
2069
|
+
m.value ? B() : F();
|
|
2070
|
+
}
|
|
2071
|
+
function H(e) {
|
|
2072
|
+
e.disabled || (p.value = e.value, f("change", e.value), B(), S.value?.focus());
|
|
2073
|
+
}
|
|
2074
|
+
function U(e) {
|
|
2075
|
+
e.stopPropagation(), p.value = null, f("change", null);
|
|
2076
|
+
}
|
|
2077
|
+
function W(e) {
|
|
2078
|
+
let t = e.target;
|
|
2079
|
+
y.value?.contains(t) || B();
|
|
2080
|
+
}
|
|
2081
|
+
function G(e) {
|
|
2082
|
+
e.key === "ArrowDown" ? (e.preventDefault(), m.value ? K() : F()) : e.key === "ArrowUp" ? (e.preventDefault(), m.value && q()) : e.key === "Enter" || e.key === " " ? (e.preventDefault(), m.value ? J() : F()) : e.key === "Escape" && B();
|
|
2083
|
+
}
|
|
2084
|
+
function ee(e) {
|
|
2085
|
+
e.key === "ArrowDown" ? (e.preventDefault(), K()) : e.key === "ArrowUp" ? (e.preventDefault(), q()) : e.key === "Enter" ? (e.preventDefault(), J()) : e.key === "Escape" && (B(), S.value?.focus());
|
|
2086
|
+
}
|
|
2087
|
+
function K() {
|
|
2088
|
+
v.value = Math.min(v.value + 1, A.value.length - 1), Y();
|
|
2089
|
+
}
|
|
2090
|
+
function q() {
|
|
2091
|
+
v.value = Math.max(v.value - 1, 0), Y();
|
|
2092
|
+
}
|
|
2093
|
+
function J() {
|
|
2094
|
+
let e = A.value[v.value];
|
|
2095
|
+
e && H(e);
|
|
2096
|
+
}
|
|
2097
|
+
function Y() {
|
|
2098
|
+
g(() => {
|
|
2099
|
+
(C.value?.querySelector("[data-active=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
return b(() => document.removeEventListener("pointerdown", W)), (i, a) => (x(), c("div", {
|
|
2103
|
+
ref_key: "containerRef",
|
|
2104
|
+
ref: y,
|
|
2105
|
+
class: _(["uid-select", [`uid-select--${n.size}`, {
|
|
2106
|
+
"uid-select--open": m.value,
|
|
2107
|
+
"uid-select--disabled": n.disabled
|
|
2108
|
+
}]])
|
|
2109
|
+
}, [l("div", {
|
|
2110
|
+
ref_key: "triggerRef",
|
|
2111
|
+
ref: S,
|
|
2112
|
+
class: "uid-select__trigger",
|
|
2113
|
+
role: "combobox",
|
|
2114
|
+
tabindex: "0",
|
|
2115
|
+
"aria-expanded": m.value,
|
|
2116
|
+
"aria-haspopup": "listbox",
|
|
2117
|
+
"aria-controls": j(D),
|
|
2118
|
+
"aria-disabled": n.disabled,
|
|
2119
|
+
onClick: V,
|
|
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", Vr, [n.clearable && p.value !== null ? (x(), c("button", {
|
|
2122
|
+
key: 0,
|
|
2123
|
+
type: "button",
|
|
2124
|
+
class: "uid-select__clear",
|
|
2125
|
+
"aria-label": "Очистить",
|
|
2126
|
+
onClick: U
|
|
2127
|
+
}, [d(e, {
|
|
2128
|
+
icon: j(X),
|
|
2129
|
+
size: 12
|
|
2130
|
+
}, null, 8, ["icon"])])) : s("", !0), d(e, {
|
|
2131
|
+
icon: j(ne),
|
|
2132
|
+
size: 16,
|
|
2133
|
+
class: _(["uid-select__chevron", { "uid-select__chevron--open": m.value }]),
|
|
2134
|
+
"aria-hidden": "true"
|
|
2135
|
+
}, null, 8, ["icon", "class"])])], 40, Br), d(r, { name: "uid-select-dropdown" }, {
|
|
2136
|
+
default: R(() => [m.value ? (x(), c("div", Hr, [n.searchable ? (x(), c("div", Ur, [z(l("input", {
|
|
2137
|
+
ref_key: "searchRef",
|
|
2138
|
+
ref: E,
|
|
2139
|
+
"onUpdate:modelValue": a[0] ||= (e) => h.value = e,
|
|
2140
|
+
class: "uid-select__search-input",
|
|
2141
|
+
type: "text",
|
|
2142
|
+
placeholder: "Поиск...",
|
|
2143
|
+
autocomplete: "off",
|
|
2144
|
+
onKeydown: ee
|
|
2145
|
+
}, null, 544), [[I, h.value]])])) : s("", !0), l("div", {
|
|
2146
|
+
id: j(D),
|
|
2147
|
+
ref_key: "listRef",
|
|
2148
|
+
ref: C,
|
|
2149
|
+
class: "uid-select__list",
|
|
2150
|
+
role: "listbox",
|
|
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", Gr, k(n), 1)) : s("", !0), (x(!0), c(t, null, T(r, (t) => (x(), c("button", {
|
|
2153
|
+
key: t.value,
|
|
2154
|
+
type: "button",
|
|
2155
|
+
class: _(["uid-select__option", {
|
|
2156
|
+
"uid-select__option--selected": t.value === p.value,
|
|
2157
|
+
"uid-select__option--active": A.value.indexOf(t) === v.value,
|
|
2158
|
+
"uid-select__option--disabled": t.disabled
|
|
2159
|
+
}]),
|
|
2160
|
+
"data-active": A.value.indexOf(t) === v.value ? "true" : void 0,
|
|
2161
|
+
role: "option",
|
|
2162
|
+
"aria-selected": t.value === p.value,
|
|
2163
|
+
"aria-disabled": t.disabled,
|
|
2164
|
+
onClick: (e) => H(t),
|
|
2165
|
+
onMouseenter: (e) => !t.disabled && (v.value = A.value.indexOf(t))
|
|
2166
|
+
}, [l("span", null, k(t.label), 1), t.value === p.value ? (x(), o(e, {
|
|
2167
|
+
key: 0,
|
|
2168
|
+
icon: j(te),
|
|
2169
|
+
size: 14,
|
|
2170
|
+
"aria-hidden": "true",
|
|
2171
|
+
class: "uid-select__check"
|
|
2172
|
+
}, null, 8, ["icon"])) : s("", !0)], 42, Kr))), 128))], 64))), 128)) : (x(), c("div", qr, " Ничего не найдено "))], 40, Wr)])) : s("", !0)]),
|
|
2173
|
+
_: 1
|
|
2174
|
+
})], 2));
|
|
2175
|
+
}
|
|
2176
|
+
}), Yr = ["aria-expanded", "aria-disabled"], Xr = { class: "uid-datepicker__suffix" }, Zr = {
|
|
2177
|
+
key: 0,
|
|
2178
|
+
class: "uid-datepicker__panel",
|
|
2179
|
+
role: "dialog",
|
|
2180
|
+
"aria-label": "Выбор даты"
|
|
2181
|
+
}, Qr = { class: "uid-datepicker__nav" }, $r = { class: "uid-datepicker__month-label" }, ei = { class: "uid-datepicker__grid" }, ti = [
|
|
2182
|
+
"disabled",
|
|
2183
|
+
"aria-current",
|
|
2184
|
+
"aria-selected",
|
|
2185
|
+
"onClick"
|
|
2186
|
+
], ni = /* @__PURE__ */ f({
|
|
2187
|
+
__name: "UidDatePicker",
|
|
2188
|
+
props: /* @__PURE__ */ m({
|
|
2189
|
+
min: { default: void 0 },
|
|
2190
|
+
max: { default: void 0 },
|
|
2191
|
+
disabled: {
|
|
2192
|
+
type: Boolean,
|
|
2193
|
+
default: !1
|
|
2194
|
+
},
|
|
2195
|
+
placeholder: { default: "Выберите дату" },
|
|
2196
|
+
format: {
|
|
2197
|
+
type: Function,
|
|
2198
|
+
default: void 0
|
|
2199
|
+
}
|
|
2200
|
+
}, {
|
|
2201
|
+
modelValue: { default: null },
|
|
2202
|
+
modelModifiers: {}
|
|
2203
|
+
}),
|
|
2204
|
+
emits: ["update:modelValue"],
|
|
2205
|
+
setup(n) {
|
|
2206
|
+
let i = n, o = N(n, "modelValue"), u = w(!1), f = w(null), p = w(null), m = /* @__PURE__ */ new Date(), h = w(m.getFullYear()), g = w(m.getMonth()), v = [
|
|
2207
|
+
"Январь",
|
|
2208
|
+
"Февраль",
|
|
2209
|
+
"Март",
|
|
2210
|
+
"Апрель",
|
|
2211
|
+
"Май",
|
|
2212
|
+
"Июнь",
|
|
2213
|
+
"Июль",
|
|
2214
|
+
"Август",
|
|
2215
|
+
"Сентябрь",
|
|
2216
|
+
"Октябрь",
|
|
2217
|
+
"Ноябрь",
|
|
2218
|
+
"Декабрь"
|
|
2219
|
+
], y = [
|
|
2220
|
+
"Пн",
|
|
2221
|
+
"Вт",
|
|
2222
|
+
"Ср",
|
|
2223
|
+
"Чт",
|
|
2224
|
+
"Пт",
|
|
2225
|
+
"Сб",
|
|
2226
|
+
"Вс"
|
|
2227
|
+
];
|
|
2228
|
+
function S(e) {
|
|
2229
|
+
return /* @__PURE__ */ new Date(e + "T00:00:00");
|
|
2230
|
+
}
|
|
2231
|
+
function C(e) {
|
|
2232
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
2233
|
+
}
|
|
2234
|
+
function E(e) {
|
|
2235
|
+
if (i.format) return i.format(S(e));
|
|
2236
|
+
let t = S(e);
|
|
2237
|
+
return `${String(t.getDate()).padStart(2, "0")}.${String(t.getMonth() + 1).padStart(2, "0")}.${t.getFullYear()}`;
|
|
2238
|
+
}
|
|
2239
|
+
let D = a(() => o.value ? E(o.value) : ""), O = a(() => {
|
|
2240
|
+
let e = new Date(h.value, g.value, 1), t = new Date(h.value, g.value + 1, 0), n = (e.getDay() + 6) % 7, r = [];
|
|
2241
|
+
for (let e = n; e > 0; e--) {
|
|
2242
|
+
let t = new Date(h.value, g.value, 1 - e);
|
|
2243
|
+
r.push({
|
|
2244
|
+
date: t,
|
|
2245
|
+
iso: C(t),
|
|
2246
|
+
current: !1
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
for (let e = 1; e <= t.getDate(); e++) {
|
|
2250
|
+
let t = new Date(h.value, g.value, e);
|
|
2251
|
+
r.push({
|
|
2252
|
+
date: t,
|
|
2253
|
+
iso: C(t),
|
|
2254
|
+
current: !0
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
let i = 1;
|
|
2258
|
+
for (; r.length < 42;) {
|
|
2259
|
+
let e = new Date(h.value, g.value + 1, i++);
|
|
2260
|
+
r.push({
|
|
2261
|
+
date: e,
|
|
2262
|
+
iso: C(e),
|
|
2263
|
+
current: !1
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
return r;
|
|
2267
|
+
}), A = a(() => C(m));
|
|
2268
|
+
function M(e) {
|
|
2269
|
+
return !!(i.min && e < i.min || i.max && e > i.max);
|
|
2270
|
+
}
|
|
2271
|
+
function P() {
|
|
2272
|
+
if (!i.disabled) {
|
|
2273
|
+
if (o.value) {
|
|
2274
|
+
let e = S(o.value);
|
|
2275
|
+
h.value = e.getFullYear(), g.value = e.getMonth();
|
|
2276
|
+
} else h.value = m.getFullYear(), g.value = m.getMonth();
|
|
2277
|
+
u.value = !0;
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
function F() {
|
|
2281
|
+
u.value = !1;
|
|
2282
|
+
}
|
|
2283
|
+
function I() {
|
|
2284
|
+
u.value ? F() : P();
|
|
2285
|
+
}
|
|
2286
|
+
function z(e) {
|
|
2287
|
+
M(e.iso) || (o.value = e.iso, F(), p.value?.focus());
|
|
2288
|
+
}
|
|
2289
|
+
function B() {
|
|
2290
|
+
g.value === 0 ? (g.value = 11, h.value--) : g.value--;
|
|
2291
|
+
}
|
|
2292
|
+
function V() {
|
|
2293
|
+
g.value === 11 ? (g.value = 0, h.value++) : g.value++;
|
|
2294
|
+
}
|
|
2295
|
+
function H(e) {
|
|
2296
|
+
e.stopPropagation(), o.value = null;
|
|
2297
|
+
}
|
|
2298
|
+
function U(e) {
|
|
2299
|
+
let t = e.target;
|
|
2300
|
+
f.value?.contains(t) || F();
|
|
2301
|
+
}
|
|
2302
|
+
L(u, (e) => {
|
|
2303
|
+
e ? document.addEventListener("pointerdown", U) : document.removeEventListener("pointerdown", U);
|
|
2304
|
+
});
|
|
2305
|
+
function W(e) {
|
|
2306
|
+
e.key === "Enter" || e.key === " " ? (e.preventDefault(), I()) : e.key === "Escape" && F();
|
|
2307
|
+
}
|
|
2308
|
+
return b(() => document.removeEventListener("pointerdown", U)), (i, a) => (x(), c("div", {
|
|
2309
|
+
ref_key: "containerRef",
|
|
2310
|
+
ref: f,
|
|
2311
|
+
class: _(["uid-datepicker", {
|
|
2312
|
+
"uid-datepicker--open": u.value,
|
|
2313
|
+
"uid-datepicker--disabled": n.disabled
|
|
2314
|
+
}])
|
|
2315
|
+
}, [l("div", {
|
|
2316
|
+
ref_key: "triggerRef",
|
|
2317
|
+
ref: p,
|
|
2318
|
+
class: "uid-datepicker__trigger",
|
|
2319
|
+
tabindex: "0",
|
|
2320
|
+
"aria-expanded": u.value,
|
|
2321
|
+
"aria-disabled": n.disabled,
|
|
2322
|
+
onClick: I,
|
|
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", Xr, [o.value ? (x(), c("button", {
|
|
2325
|
+
key: 0,
|
|
2326
|
+
type: "button",
|
|
2327
|
+
class: "uid-datepicker__clear",
|
|
2328
|
+
"aria-label": "Очистить",
|
|
2329
|
+
onClick: H
|
|
2330
|
+
}, " × ")) : s("", !0), d(e, {
|
|
2331
|
+
icon: j(ne),
|
|
2332
|
+
size: 16,
|
|
2333
|
+
class: _(["uid-datepicker__chevron", { "uid-datepicker__chevron--open": u.value }]),
|
|
2334
|
+
"aria-hidden": "true"
|
|
2335
|
+
}, null, 8, ["icon", "class"])])], 40, Yr), d(r, { name: "uid-datepicker-panel" }, {
|
|
2336
|
+
default: R(() => [u.value ? (x(), c("div", Zr, [l("div", Qr, [
|
|
2337
|
+
l("button", {
|
|
2338
|
+
type: "button",
|
|
2339
|
+
class: "uid-datepicker__nav-btn",
|
|
2340
|
+
"aria-label": "Предыдущий месяц",
|
|
2341
|
+
onClick: B
|
|
2342
|
+
}, [d(e, {
|
|
2343
|
+
icon: j(q),
|
|
2344
|
+
size: 16
|
|
2345
|
+
}, null, 8, ["icon"])]),
|
|
2346
|
+
l("span", $r, k(v[g.value]) + " " + k(h.value), 1),
|
|
2347
|
+
l("button", {
|
|
2348
|
+
type: "button",
|
|
2349
|
+
class: "uid-datepicker__nav-btn",
|
|
2350
|
+
"aria-label": "Следующий месяц",
|
|
2351
|
+
onClick: V
|
|
2352
|
+
}, [d(e, {
|
|
2353
|
+
icon: j(J),
|
|
2354
|
+
size: 16
|
|
2355
|
+
}, null, 8, ["icon"])])
|
|
2356
|
+
]), l("div", ei, [(x(), c(t, null, T(y, (e) => l("span", {
|
|
2357
|
+
key: e,
|
|
2358
|
+
class: "uid-datepicker__weekday"
|
|
2359
|
+
}, k(e), 1)), 64)), (x(!0), c(t, null, T(O.value, (e) => (x(), c("button", {
|
|
2360
|
+
key: e.iso,
|
|
2361
|
+
type: "button",
|
|
2362
|
+
class: _(["uid-datepicker__day", {
|
|
2363
|
+
"uid-datepicker__day--other": !e.current,
|
|
2364
|
+
"uid-datepicker__day--today": e.iso === A.value,
|
|
2365
|
+
"uid-datepicker__day--selected": e.iso === o.value,
|
|
2366
|
+
"uid-datepicker__day--disabled": M(e.iso)
|
|
2367
|
+
}]),
|
|
2368
|
+
disabled: M(e.iso),
|
|
2369
|
+
"aria-current": e.iso === A.value ? "date" : void 0,
|
|
2370
|
+
"aria-selected": e.iso === o.value,
|
|
2371
|
+
onClick: (t) => z(e)
|
|
2372
|
+
}, k(e.date.getDate()), 11, ti))), 128))])])) : s("", !0)]),
|
|
2373
|
+
_: 1
|
|
2374
|
+
})], 2));
|
|
2375
|
+
}
|
|
2376
|
+
}), ri = /* @__PURE__ */ f({
|
|
2377
|
+
__name: "UidVirtualList",
|
|
2378
|
+
props: {
|
|
2379
|
+
items: {},
|
|
2380
|
+
itemHeight: {},
|
|
2381
|
+
height: {},
|
|
2382
|
+
overscan: { default: 5 }
|
|
2383
|
+
},
|
|
2384
|
+
setup(e) {
|
|
2385
|
+
let n = e, r = w(null), i = w(0), o = w(0), s = a(() => n.items.length * n.itemHeight), u = a(() => Math.max(0, Math.floor(i.value / n.itemHeight) - n.overscan)), d = a(() => Math.min(n.items.length - 1, Math.ceil((i.value + o.value) / n.itemHeight) + n.overscan)), f = a(() => n.items.slice(u.value, d.value + 1).map((e, t) => ({
|
|
2386
|
+
item: e,
|
|
2387
|
+
index: u.value + t
|
|
2388
|
+
}))), p = a(() => u.value * n.itemHeight), m = a(() => ({ height: typeof n.height == "number" ? `${n.height}px` : n.height }));
|
|
2389
|
+
function h() {
|
|
2390
|
+
i.value = r.value?.scrollTop ?? 0;
|
|
2391
|
+
}
|
|
2392
|
+
let g = new ResizeObserver((e) => {
|
|
2393
|
+
o.value = e[0].contentRect.height;
|
|
2394
|
+
});
|
|
2395
|
+
return y(() => {
|
|
2396
|
+
r.value && (o.value = r.value.clientHeight, g.observe(r.value));
|
|
2397
|
+
}), b(() => g.disconnect()), (n, i) => (x(), c("div", {
|
|
2398
|
+
ref_key: "containerRef",
|
|
2399
|
+
ref: r,
|
|
2400
|
+
class: "uid-virtual-list",
|
|
2401
|
+
style: v(m.value),
|
|
2402
|
+
onScrollPassive: h
|
|
2403
|
+
}, [l("div", {
|
|
2404
|
+
class: "uid-virtual-list__spacer",
|
|
2405
|
+
style: v({ height: `${s.value}px` })
|
|
2406
|
+
}, [l("div", {
|
|
2407
|
+
class: "uid-virtual-list__content",
|
|
2408
|
+
style: v({ transform: `translateY(${p.value}px)` })
|
|
2409
|
+
}, [(x(!0), c(t, null, T(f.value, ({ item: t, index: r }) => (x(), c("div", {
|
|
2410
|
+
key: r,
|
|
2411
|
+
class: "uid-virtual-list__item",
|
|
2412
|
+
style: v({ height: `${e.itemHeight}px` })
|
|
2413
|
+
}, [E(n.$slots, "item", {
|
|
2414
|
+
item: t,
|
|
2415
|
+
index: r
|
|
2416
|
+
})], 4))), 128))], 4)], 4)], 36));
|
|
2417
|
+
}
|
|
2418
|
+
}), ii = {
|
|
2419
|
+
key: 0,
|
|
2420
|
+
class: "uid-slider__header"
|
|
2421
|
+
}, ai = {
|
|
2422
|
+
key: 0,
|
|
2423
|
+
class: "uid-slider__label"
|
|
2424
|
+
}, oi = {
|
|
2425
|
+
key: 1,
|
|
2426
|
+
class: "uid-slider__value",
|
|
2427
|
+
"aria-live": "polite"
|
|
2428
|
+
}, si = [
|
|
2429
|
+
"min",
|
|
2430
|
+
"max",
|
|
2431
|
+
"step",
|
|
2432
|
+
"disabled",
|
|
2433
|
+
"aria-label",
|
|
2434
|
+
"aria-valuemin",
|
|
2435
|
+
"aria-valuemax",
|
|
2436
|
+
"aria-valuenow"
|
|
2437
|
+
], ci = /* @__PURE__ */ f({
|
|
2438
|
+
__name: "UidSlider",
|
|
2439
|
+
props: /* @__PURE__ */ m({
|
|
2440
|
+
min: { default: 0 },
|
|
2441
|
+
max: { default: 100 },
|
|
2442
|
+
step: { default: 1 },
|
|
2443
|
+
disabled: {
|
|
2444
|
+
type: Boolean,
|
|
2445
|
+
default: !1
|
|
2446
|
+
},
|
|
2447
|
+
label: { default: void 0 },
|
|
2448
|
+
showValue: {
|
|
2449
|
+
type: Boolean,
|
|
2450
|
+
default: !1
|
|
2451
|
+
},
|
|
2452
|
+
formatValue: {
|
|
2453
|
+
type: Function,
|
|
2454
|
+
default: void 0
|
|
2455
|
+
}
|
|
2456
|
+
}, {
|
|
2457
|
+
modelValue: { default: 0 },
|
|
2458
|
+
modelModifiers: {}
|
|
2459
|
+
}),
|
|
2460
|
+
emits: ["update:modelValue"],
|
|
2461
|
+
setup(e) {
|
|
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", ii, [e.label ? (x(), c("label", ai, k(e.label), 1)) : s("", !0), e.showValue ? (x(), c("span", oi, k(i.value), 1)) : s("", !0)])) : s("", !0), z(l("input", {
|
|
2464
|
+
"onUpdate:modelValue": a[0] ||= (e) => n.value = e,
|
|
2465
|
+
class: "uid-slider__input",
|
|
2466
|
+
type: "range",
|
|
2467
|
+
min: e.min,
|
|
2468
|
+
max: e.max,
|
|
2469
|
+
step: e.step,
|
|
2470
|
+
disabled: e.disabled,
|
|
2471
|
+
"aria-label": e.label,
|
|
2472
|
+
"aria-valuemin": e.min,
|
|
2473
|
+
"aria-valuemax": e.max,
|
|
2474
|
+
"aria-valuenow": n.value,
|
|
2475
|
+
style: v({ "--_fill": `${r.value}%` })
|
|
2476
|
+
}, null, 12, si), [[
|
|
2477
|
+
I,
|
|
2478
|
+
n.value,
|
|
2479
|
+
void 0,
|
|
2480
|
+
{ number: !0 }
|
|
2481
|
+
]])], 2));
|
|
2482
|
+
}
|
|
2483
|
+
}), li = ["aria-expanded", "aria-disabled"], ui = {
|
|
2484
|
+
key: 0,
|
|
2485
|
+
class: "uid-colorpicker__panel",
|
|
2486
|
+
role: "dialog",
|
|
2487
|
+
"aria-label": "Выбор цвета"
|
|
2488
|
+
}, di = { class: "uid-colorpicker__controls" }, fi = { class: "uid-colorpicker__sliders" }, pi = { class: "uid-colorpicker__inputs" }, mi = ["value"], hi = {
|
|
2489
|
+
key: 0,
|
|
2490
|
+
class: "uid-colorpicker__presets"
|
|
2491
|
+
}, gi = ["aria-label", "onClick"], _i = /* @__PURE__ */ f({
|
|
2492
|
+
__name: "UidColorPicker",
|
|
2493
|
+
props: /* @__PURE__ */ m({
|
|
2494
|
+
disabled: {
|
|
2495
|
+
type: Boolean,
|
|
2496
|
+
default: !1
|
|
2497
|
+
},
|
|
2498
|
+
presets: { default: void 0 },
|
|
2499
|
+
alpha: {
|
|
2500
|
+
type: Boolean,
|
|
2501
|
+
default: !1
|
|
2502
|
+
}
|
|
2503
|
+
}, {
|
|
2504
|
+
modelValue: { default: null },
|
|
2505
|
+
modelModifiers: {}
|
|
2506
|
+
}),
|
|
2507
|
+
emits: /* @__PURE__ */ m(["change"], ["update:modelValue"]),
|
|
2508
|
+
setup(e, { emit: n }) {
|
|
2509
|
+
let i = e, o = n, u = N(e, "modelValue"), f = w(0), p = w(100), m = w(100), h = w(100), g = w(!1), y = w(null), S = w(null), C = w(null), E = w(null), D = w(""), O = w(!1), A = w(!1), j = w(!1);
|
|
2510
|
+
function M(e, t, n) {
|
|
2511
|
+
let r = t / 100, i = n / 100, a = i * r, o = a * (1 - Math.abs(e / 60 % 2 - 1)), s = i - a, c = 0, l = 0, u = 0;
|
|
2512
|
+
return e < 60 ? (c = a, l = o) : e < 120 ? (c = o, l = a) : e < 180 ? (l = a, u = o) : e < 240 ? (l = o, u = a) : e < 300 ? (c = o, u = a) : (c = a, u = o), [
|
|
2513
|
+
Math.round((c + s) * 255),
|
|
2514
|
+
Math.round((l + s) * 255),
|
|
2515
|
+
Math.round((u + s) * 255)
|
|
2516
|
+
];
|
|
2517
|
+
}
|
|
2518
|
+
function P(e, t, n) {
|
|
2519
|
+
let r = e / 255, i = t / 255, a = n / 255, o = Math.max(r, i, a), s = o - Math.min(r, i, a), c = 0, l = o === 0 ? 0 : s / o, u = o;
|
|
2520
|
+
return s !== 0 && (c = o === r ? (i - a) / s % 6 : o === i ? (a - r) / s + 2 : (r - i) / s + 4, c = Math.round(c * 60), c < 0 && (c += 360)), [
|
|
2521
|
+
c,
|
|
2522
|
+
Math.round(l * 100),
|
|
2523
|
+
Math.round(u * 100)
|
|
2524
|
+
];
|
|
2525
|
+
}
|
|
2526
|
+
function F(e) {
|
|
2527
|
+
return Math.max(0, Math.min(255, Math.round(e))).toString(16).padStart(2, "0");
|
|
2528
|
+
}
|
|
2529
|
+
function I() {
|
|
2530
|
+
let [e, t, n] = M(f.value, p.value, m.value);
|
|
2531
|
+
return i.alpha && h.value < 100 ? `#${F(e)}${F(t)}${F(n)}${F(h.value / 100 * 255)}` : `#${F(e)}${F(t)}${F(n)}`;
|
|
2532
|
+
}
|
|
2533
|
+
function z(e) {
|
|
2534
|
+
let t = e.replace("#", "").toLowerCase();
|
|
2535
|
+
if (t.length === 6) {
|
|
2536
|
+
let e = parseInt(t.slice(0, 2), 16), n = parseInt(t.slice(2, 4), 16), r = parseInt(t.slice(4, 6), 16);
|
|
2537
|
+
return Number.isNaN(e) || Number.isNaN(n) || Number.isNaN(r) ? null : [
|
|
2538
|
+
e,
|
|
2539
|
+
n,
|
|
2540
|
+
r,
|
|
2541
|
+
100
|
|
2542
|
+
];
|
|
2543
|
+
}
|
|
2544
|
+
if (t.length === 8) {
|
|
2545
|
+
let e = parseInt(t.slice(0, 2), 16), n = parseInt(t.slice(2, 4), 16), r = parseInt(t.slice(4, 6), 16), i = parseInt(t.slice(6, 8), 16);
|
|
2546
|
+
return Number.isNaN(e) || Number.isNaN(n) || Number.isNaN(r) || Number.isNaN(i) ? null : [
|
|
2547
|
+
e,
|
|
2548
|
+
n,
|
|
2549
|
+
r,
|
|
2550
|
+
Math.round(i / 255 * 100)
|
|
2551
|
+
];
|
|
2552
|
+
}
|
|
2553
|
+
return null;
|
|
2554
|
+
}
|
|
2555
|
+
function B() {
|
|
2556
|
+
if (!u.value) return;
|
|
2557
|
+
let e = z(u.value);
|
|
2558
|
+
if (!e) return;
|
|
2559
|
+
let [t, n, r, i] = e, [a, o, s] = P(t, n, r);
|
|
2560
|
+
f.value = a, p.value = o, m.value = s, h.value = i, D.value = I().toUpperCase();
|
|
2561
|
+
}
|
|
2562
|
+
function V() {
|
|
2563
|
+
let e = I();
|
|
2564
|
+
u.value = e, o("change", e), D.value = e.toUpperCase();
|
|
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}%`), [te, K, ne] = [
|
|
2567
|
+
a(() => M(f.value, p.value, m.value)[0]),
|
|
2568
|
+
a(() => M(f.value, p.value, m.value)[1]),
|
|
2569
|
+
a(() => M(f.value, p.value, m.value)[2])
|
|
2570
|
+
], q = a(() => `rgb(${te.value}, ${K.value}, ${ne.value})`);
|
|
2571
|
+
function J(e, t) {
|
|
2572
|
+
if (!e) return null;
|
|
2573
|
+
let n = e.getBoundingClientRect();
|
|
2574
|
+
return {
|
|
2575
|
+
x: Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)),
|
|
2576
|
+
y: Math.max(0, Math.min(1, (t.clientY - n.top) / n.height))
|
|
2577
|
+
};
|
|
2578
|
+
}
|
|
2579
|
+
function Y(e) {
|
|
2580
|
+
O.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2581
|
+
let t = J(S.value, e);
|
|
2582
|
+
t && (p.value = Math.round(t.x * 100), m.value = Math.round((1 - t.y) * 100), V());
|
|
2583
|
+
}
|
|
2584
|
+
function re(e) {
|
|
2585
|
+
if (!O.value) return;
|
|
2586
|
+
let t = J(S.value, e);
|
|
2587
|
+
t && (p.value = Math.round(t.x * 100), m.value = Math.round((1 - t.y) * 100), V());
|
|
2588
|
+
}
|
|
2589
|
+
function ie() {
|
|
2590
|
+
O.value = !1;
|
|
2591
|
+
}
|
|
2592
|
+
function ae(e) {
|
|
2593
|
+
A.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2594
|
+
let t = J(C.value, e);
|
|
2595
|
+
t && (f.value = Math.round(t.x * 360), V());
|
|
2596
|
+
}
|
|
2597
|
+
function oe(e) {
|
|
2598
|
+
if (!A.value) return;
|
|
2599
|
+
let t = J(C.value, e);
|
|
2600
|
+
t && (f.value = Math.round(t.x * 360), V());
|
|
2601
|
+
}
|
|
2602
|
+
function X() {
|
|
2603
|
+
A.value = !1;
|
|
2604
|
+
}
|
|
2605
|
+
function se(e) {
|
|
2606
|
+
j.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
|
|
2607
|
+
let t = J(E.value, e);
|
|
2608
|
+
t && (h.value = Math.round(t.x * 100), V());
|
|
2609
|
+
}
|
|
2610
|
+
function ce(e) {
|
|
2611
|
+
if (!j.value) return;
|
|
2612
|
+
let t = J(E.value, e);
|
|
2613
|
+
t && (h.value = Math.round(t.x * 100), V());
|
|
2614
|
+
}
|
|
2615
|
+
function le() {
|
|
2616
|
+
j.value = !1;
|
|
2617
|
+
}
|
|
2618
|
+
function ue(e) {
|
|
2619
|
+
D.value = e.target.value;
|
|
2620
|
+
}
|
|
2621
|
+
function de() {
|
|
2622
|
+
let e = z(D.value);
|
|
2623
|
+
if (e) {
|
|
2624
|
+
let [t, n, r, a] = e, [o, s, c] = P(t, n, r);
|
|
2625
|
+
f.value = o, p.value = s, m.value = c, i.alpha && (h.value = a), V();
|
|
2626
|
+
} else D.value = I().toUpperCase();
|
|
2627
|
+
}
|
|
2628
|
+
function fe(e) {
|
|
2629
|
+
e.key === "Enter" && de();
|
|
2630
|
+
}
|
|
2631
|
+
function pe(e) {
|
|
2632
|
+
let t = z(e);
|
|
2633
|
+
if (!t) return;
|
|
2634
|
+
let [n, r, a, o] = t, [s, c, l] = P(n, r, a);
|
|
2635
|
+
f.value = s, p.value = c, m.value = l, i.alpha && (h.value = o), V();
|
|
2636
|
+
}
|
|
2637
|
+
function Z() {
|
|
2638
|
+
i.disabled || (B(), u.value || (D.value = ""), g.value = !0);
|
|
2639
|
+
}
|
|
2640
|
+
function me() {
|
|
2641
|
+
g.value = !1;
|
|
2642
|
+
}
|
|
2643
|
+
function Q() {
|
|
2644
|
+
g.value ? me() : Z();
|
|
2645
|
+
}
|
|
2646
|
+
function $(e) {
|
|
2647
|
+
y.value?.contains(e.target) || me();
|
|
2648
|
+
}
|
|
2649
|
+
return L(g, (e) => {
|
|
2650
|
+
e ? document.addEventListener("pointerdown", $) : document.removeEventListener("pointerdown", $);
|
|
2651
|
+
}), b(() => document.removeEventListener("pointerdown", $)), (n, i) => (x(), c("div", {
|
|
2652
|
+
ref_key: "containerRef",
|
|
2653
|
+
ref: y,
|
|
2654
|
+
class: _(["uid-colorpicker", {
|
|
2655
|
+
"uid-colorpicker--open": g.value,
|
|
2656
|
+
"uid-colorpicker--disabled": e.disabled
|
|
2657
|
+
}])
|
|
2658
|
+
}, [l("button", {
|
|
2659
|
+
type: "button",
|
|
2660
|
+
class: "uid-colorpicker__trigger",
|
|
2661
|
+
"aria-expanded": g.value,
|
|
2662
|
+
"aria-disabled": e.disabled,
|
|
2663
|
+
onClick: Q
|
|
2664
|
+
}, [l("span", {
|
|
2665
|
+
class: "uid-colorpicker__swatch",
|
|
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, li), d(r, { name: "uid-colorpicker-panel" }, {
|
|
2668
|
+
default: R(() => [g.value ? (x(), c("div", ui, [
|
|
2669
|
+
l("div", {
|
|
2670
|
+
ref_key: "gradientRef",
|
|
2671
|
+
ref: S,
|
|
2672
|
+
class: "uid-colorpicker__gradient",
|
|
2673
|
+
style: v({ "--_hue": H.value }),
|
|
2674
|
+
onPointerdown: Y,
|
|
2675
|
+
onPointermove: re,
|
|
2676
|
+
onPointerup: ie
|
|
2677
|
+
}, [l("div", {
|
|
2678
|
+
class: "uid-colorpicker__gradient-thumb",
|
|
2679
|
+
style: v({
|
|
2680
|
+
left: U.value,
|
|
2681
|
+
top: W.value
|
|
2682
|
+
})
|
|
2683
|
+
}, null, 4)], 36),
|
|
2684
|
+
l("div", di, [l("div", fi, [l("div", {
|
|
2685
|
+
ref_key: "hueSliderRef",
|
|
2686
|
+
ref: C,
|
|
2687
|
+
class: "uid-colorpicker__hue-track",
|
|
2688
|
+
onPointerdown: ae,
|
|
2689
|
+
onPointermove: oe,
|
|
2690
|
+
onPointerup: X
|
|
2691
|
+
}, [l("div", {
|
|
2692
|
+
class: "uid-colorpicker__track-thumb",
|
|
2693
|
+
style: v({ left: G.value })
|
|
2694
|
+
}, null, 4)], 544), e.alpha ? (x(), c("div", {
|
|
2695
|
+
key: 0,
|
|
2696
|
+
ref_key: "alphaSliderRef",
|
|
2697
|
+
ref: E,
|
|
2698
|
+
class: "uid-colorpicker__alpha-track",
|
|
2699
|
+
style: v({ "--_color": q.value }),
|
|
2700
|
+
onPointerdown: se,
|
|
2701
|
+
onPointermove: ce,
|
|
2702
|
+
onPointerup: le
|
|
2703
|
+
}, [l("div", {
|
|
2704
|
+
class: "uid-colorpicker__track-thumb",
|
|
2705
|
+
style: v({ left: ee.value })
|
|
2706
|
+
}, null, 4)], 36)) : s("", !0)]), l("span", {
|
|
2707
|
+
class: "uid-colorpicker__preview",
|
|
2708
|
+
style: v({ background: q.value })
|
|
2709
|
+
}, null, 4)]),
|
|
2710
|
+
l("div", pi, [i[0] ||= l("label", { class: "uid-colorpicker__input-label" }, "HEX", -1), l("input", {
|
|
2711
|
+
class: "uid-colorpicker__hex-input",
|
|
2712
|
+
type: "text",
|
|
2713
|
+
value: D.value,
|
|
2714
|
+
maxlength: "9",
|
|
2715
|
+
spellcheck: "false",
|
|
2716
|
+
onInput: ue,
|
|
2717
|
+
onBlur: de,
|
|
2718
|
+
onKeydown: fe
|
|
2719
|
+
}, null, 40, mi)]),
|
|
2720
|
+
e.presets && e.presets.length ? (x(), c("div", hi, [(x(!0), c(t, null, T(e.presets, (e) => (x(), c("button", {
|
|
2721
|
+
key: e,
|
|
2722
|
+
type: "button",
|
|
2723
|
+
class: _(["uid-colorpicker__preset", { "uid-colorpicker__preset--active": u.value === e || u.value === e.toLowerCase() || u.value?.toUpperCase() === e.toUpperCase() }]),
|
|
2724
|
+
style: v({ background: e }),
|
|
2725
|
+
"aria-label": e,
|
|
2726
|
+
onClick: (t) => pe(e)
|
|
2727
|
+
}, null, 14, gi))), 128))])) : s("", !0)
|
|
2728
|
+
])) : s("", !0)]),
|
|
2729
|
+
_: 1
|
|
2730
|
+
})], 2));
|
|
2731
|
+
}
|
|
2732
|
+
}), vi = { class: "uid-command__search" }, yi = ["placeholder"], bi = {
|
|
2733
|
+
key: 0,
|
|
2734
|
+
class: "uid-command__group-label"
|
|
2735
|
+
}, xi = [
|
|
2736
|
+
"data-active",
|
|
2737
|
+
"aria-selected",
|
|
2738
|
+
"onClick",
|
|
2739
|
+
"onMouseenter"
|
|
2740
|
+
], Si = { class: "uid-command__item-text" }, Ci = { class: "uid-command__item-label" }, wi = {
|
|
2741
|
+
key: 0,
|
|
2742
|
+
class: "uid-command__item-desc"
|
|
2743
|
+
}, Ti = {
|
|
2744
|
+
key: 0,
|
|
2745
|
+
class: "uid-command__item-shortcut"
|
|
2746
|
+
}, Ei = {
|
|
2747
|
+
key: 1,
|
|
2748
|
+
class: "uid-command__empty"
|
|
2749
|
+
}, Di = /* @__PURE__ */ f({
|
|
2750
|
+
__name: "UidCommand",
|
|
2751
|
+
props: /* @__PURE__ */ m({
|
|
2752
|
+
commands: {},
|
|
2753
|
+
placeholder: { default: "Поиск команд..." },
|
|
2754
|
+
emptyText: { default: "Ничего не найдено" }
|
|
2755
|
+
}, {
|
|
2756
|
+
modelValue: {
|
|
2757
|
+
type: Boolean,
|
|
2758
|
+
default: !1
|
|
2759
|
+
},
|
|
2760
|
+
modelModifiers: {}
|
|
2761
|
+
}),
|
|
2762
|
+
emits: ["update:modelValue"],
|
|
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 } = qt(h), { lock: D, unlock: O } = Yt(), A = a(() => {
|
|
2765
|
+
let e = p.value.trim().toLowerCase();
|
|
2766
|
+
return e ? u.commands.filter((t) => t.label.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e)) : u.commands;
|
|
2767
|
+
}), M = a(() => {
|
|
2768
|
+
let e = /* @__PURE__ */ new Map();
|
|
2769
|
+
for (let t of A.value) {
|
|
2770
|
+
let n = t.group ?? "";
|
|
2771
|
+
e.has(n) || e.set(n, []), e.get(n).push(t);
|
|
2772
|
+
}
|
|
2773
|
+
return e;
|
|
2774
|
+
});
|
|
2775
|
+
L(f, async (e) => {
|
|
2776
|
+
e ? (p.value = "", m.value = 0, D(), await g(), C(), v.value?.focus(), document.addEventListener("keydown", U)) : (O(), E(), document.removeEventListener("keydown", U));
|
|
2777
|
+
}), L(p, () => {
|
|
2778
|
+
m.value = 0;
|
|
2779
|
+
});
|
|
2780
|
+
function P() {
|
|
2781
|
+
f.value = !1;
|
|
2782
|
+
}
|
|
2783
|
+
function F(e) {
|
|
2784
|
+
e.action(), P();
|
|
2785
|
+
}
|
|
2786
|
+
function V() {
|
|
2787
|
+
let e = A.value[m.value];
|
|
2788
|
+
e && F(e);
|
|
2789
|
+
}
|
|
2790
|
+
function H(e) {
|
|
2791
|
+
e.key === "ArrowDown" ? (e.preventDefault(), m.value = Math.min(m.value + 1, A.value.length - 1), W()) : e.key === "ArrowUp" ? (e.preventDefault(), m.value = Math.max(m.value - 1, 0), W()) : e.key === "Enter" && (e.preventDefault(), V());
|
|
2792
|
+
}
|
|
2793
|
+
function U(e) {
|
|
2794
|
+
e.key === "Escape" && P();
|
|
2795
|
+
}
|
|
2796
|
+
function W() {
|
|
2797
|
+
g(() => {
|
|
2798
|
+
(S.value?.querySelector("[data-active=\"true\"]"))?.scrollIntoView?.({ block: "nearest" });
|
|
2799
|
+
});
|
|
2800
|
+
}
|
|
2801
|
+
function G(e) {
|
|
2802
|
+
(e.ctrlKey || e.metaKey) && e.key === "k" && (e.preventDefault(), f.value = !f.value);
|
|
2803
|
+
}
|
|
2804
|
+
return y(() => document.addEventListener("keydown", G)), b(() => {
|
|
2805
|
+
document.removeEventListener("keydown", G), document.removeEventListener("keydown", U), O(), E();
|
|
2806
|
+
}), (a, u) => (x(), o(n, { to: "body" }, [d(r, { name: "uid-command" }, {
|
|
2807
|
+
default: R(() => [f.value ? (x(), c("div", {
|
|
2808
|
+
key: 0,
|
|
2809
|
+
class: "uid-command-overlay",
|
|
2810
|
+
onClick: B(P, ["self"])
|
|
2811
|
+
}, [l("div", {
|
|
2812
|
+
ref_key: "panelRef",
|
|
2813
|
+
ref: h,
|
|
2814
|
+
class: "uid-command",
|
|
2815
|
+
role: "dialog",
|
|
2816
|
+
"aria-modal": "true",
|
|
2817
|
+
"aria-label": "Палитра команд",
|
|
2818
|
+
onKeydown: H
|
|
2819
|
+
}, [l("div", vi, [d(e, {
|
|
2820
|
+
icon: j(ie),
|
|
2821
|
+
size: 16,
|
|
2822
|
+
class: "uid-command__search-icon",
|
|
2823
|
+
"aria-hidden": "true"
|
|
2824
|
+
}, null, 8, ["icon"]), z(l("input", {
|
|
2825
|
+
ref_key: "inputRef",
|
|
2826
|
+
ref: v,
|
|
2827
|
+
"onUpdate:modelValue": u[0] ||= (e) => p.value = e,
|
|
2828
|
+
class: "uid-command__input",
|
|
2829
|
+
type: "text",
|
|
2830
|
+
placeholder: i.placeholder,
|
|
2831
|
+
autocomplete: "off",
|
|
2832
|
+
spellcheck: "false",
|
|
2833
|
+
"aria-autocomplete": "list"
|
|
2834
|
+
}, null, 8, yi), [[I, p.value]])]), l("div", {
|
|
2835
|
+
ref_key: "listRef",
|
|
2836
|
+
ref: S,
|
|
2837
|
+
class: "uid-command__list",
|
|
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", bi, k(e), 1)) : s("", !0), (x(!0), c(t, null, T(n, (e) => (x(), c("button", {
|
|
2840
|
+
key: e.id,
|
|
2841
|
+
class: _(["uid-command__item", { "uid-command__item--active": A.value.indexOf(e) === m.value }]),
|
|
2842
|
+
"data-active": A.value.indexOf(e) === m.value ? "true" : void 0,
|
|
2843
|
+
role: "option",
|
|
2844
|
+
"aria-selected": A.value.indexOf(e) === m.value,
|
|
2845
|
+
type: "button",
|
|
2846
|
+
onClick: (t) => F(e),
|
|
2847
|
+
onMouseenter: (t) => m.value = A.value.indexOf(e)
|
|
2848
|
+
}, [l("div", Si, [l("span", Ci, k(e.label), 1), e.description ? (x(), c("span", wi, k(e.description), 1)) : s("", !0)]), e.shortcut ? (x(), c("div", Ti, [(x(!0), c(t, null, T(e.shortcut, (e) => (x(), c("kbd", {
|
|
2849
|
+
key: e,
|
|
2850
|
+
class: "uid-command__kbd"
|
|
2851
|
+
}, k(e), 1))), 128))])) : s("", !0)], 42, xi))), 128))], 64))), 128)) : (x(), c("div", Ei, k(i.emptyText), 1))], 512)], 544)])) : s("", !0)]),
|
|
2852
|
+
_: 1
|
|
2853
|
+
})]));
|
|
2854
|
+
}
|
|
2855
|
+
}), Oi = ["aria-label"], ki = ["aria-current"], Ai = { class: "uid-stepper__indicator" }, ji = {
|
|
2856
|
+
key: 1,
|
|
2857
|
+
"aria-hidden": "true"
|
|
2858
|
+
}, Mi = { class: "uid-stepper__content" }, Ni = { class: "uid-stepper__label" }, Pi = {
|
|
2859
|
+
key: 0,
|
|
2860
|
+
class: "uid-stepper__description"
|
|
2861
|
+
}, Fi = /* @__PURE__ */ f({
|
|
2862
|
+
__name: "UidStepper",
|
|
2863
|
+
props: {
|
|
2864
|
+
steps: {},
|
|
2865
|
+
current: { default: 0 },
|
|
2866
|
+
orientation: { default: "horizontal" }
|
|
2867
|
+
},
|
|
2868
|
+
setup(n) {
|
|
2869
|
+
function r(e, t) {
|
|
2870
|
+
return e < t ? "completed" : e === t ? "current" : "pending";
|
|
2871
|
+
}
|
|
2872
|
+
return (i, a) => (x(), c("ol", {
|
|
2873
|
+
class: _(["uid-stepper", [`uid-stepper--${n.orientation}`]]),
|
|
2874
|
+
"aria-label": `Шаги (текущий: ${n.current + 1} из ${n.steps.length})`
|
|
2875
|
+
}, [(x(!0), c(t, null, T(n.steps, (t, i) => (x(), c("li", {
|
|
2876
|
+
key: i,
|
|
2877
|
+
class: _(["uid-stepper__step", [`uid-stepper__step--${r(i, n.current)}`]]),
|
|
2878
|
+
"aria-current": i === n.current ? "step" : void 0
|
|
2879
|
+
}, [l("div", Ai, [r(i, n.current) === "completed" ? (x(), o(e, {
|
|
2880
|
+
key: 0,
|
|
2881
|
+
icon: j(te),
|
|
2882
|
+
size: 16,
|
|
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: {
|
|
2894
|
+
type: Boolean,
|
|
2895
|
+
default: !1
|
|
2896
|
+
},
|
|
2897
|
+
as: { default: "div" },
|
|
2898
|
+
inline: {
|
|
2899
|
+
type: Boolean,
|
|
2900
|
+
default: !1
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
setup(e) {
|
|
2904
|
+
let t = e, n = {
|
|
2905
|
+
start: "flex-start",
|
|
2906
|
+
center: "center",
|
|
2907
|
+
end: "flex-end",
|
|
2908
|
+
between: "space-between",
|
|
2909
|
+
around: "space-around",
|
|
2910
|
+
evenly: "space-evenly"
|
|
2911
|
+
}, r = {
|
|
2912
|
+
start: "flex-start",
|
|
2913
|
+
center: "center",
|
|
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: {
|
|
2970
|
+
type: Boolean,
|
|
2971
|
+
default: !0
|
|
2972
|
+
},
|
|
2973
|
+
as: { default: "div" }
|
|
2974
|
+
},
|
|
2975
|
+
setup(e) {
|
|
2976
|
+
return (t, n) => (x(), o(O(e.as), { class: _(["uid-container", [`uid-container--${e.size}`, { "uid-container--padded": e.padding }]]) }, {
|
|
2977
|
+
default: R(() => [E(t.$slots, "default")]),
|
|
2978
|
+
_: 3
|
|
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 },
|
|
2985
|
+
modelModifiers: {}
|
|
2986
|
+
}),
|
|
2987
|
+
emits: ["update:modelValue"],
|
|
2988
|
+
setup(e, { expose: t }) {
|
|
2989
|
+
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);
|
|
2990
|
+
async function u() {
|
|
2991
|
+
let e = i.get(r.value);
|
|
2992
|
+
e && !await e() || l.value || r.value++;
|
|
2993
|
+
}
|
|
2994
|
+
function d() {
|
|
2995
|
+
s.value || r.value--;
|
|
2996
|
+
}
|
|
2997
|
+
function f(e) {
|
|
2998
|
+
e >= 0 && e < n.steps.length && (r.value = e);
|
|
2999
|
+
}
|
|
3000
|
+
function p(e, t) {
|
|
3001
|
+
i.set(e, t);
|
|
3002
|
+
}
|
|
3003
|
+
function m(e) {
|
|
3004
|
+
i.delete(e);
|
|
3005
|
+
}
|
|
3006
|
+
return S(zi, {
|
|
3007
|
+
current: r,
|
|
3008
|
+
steps: o,
|
|
3009
|
+
isFirst: s,
|
|
3010
|
+
isLast: l,
|
|
3011
|
+
next: u,
|
|
3012
|
+
prev: d,
|
|
3013
|
+
goTo: f,
|
|
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
|
|
3032
|
+
}
|
|
3033
|
+
},
|
|
3034
|
+
setup(e) {
|
|
3035
|
+
let t = e, n = p(zi);
|
|
3036
|
+
if (!n) throw Error("UidWizardStep must be inside UidWizard");
|
|
3037
|
+
L(() => t.validate, (e, r) => {
|
|
3038
|
+
r !== void 0 && n.unregisterValidator(t.index), e !== void 0 && n.registerValidator(t.index, e);
|
|
3039
|
+
}, { immediate: !0 }), b(() => n.unregisterValidator(t.index));
|
|
3040
|
+
let r = a(() => n.current.value === t.index);
|
|
3041
|
+
return (t, n) => r.value ? (x(), c("div", {
|
|
3042
|
+
key: 0,
|
|
3043
|
+
class: "uid-wizard-step",
|
|
3044
|
+
role: "tabpanel",
|
|
3045
|
+
"aria-label": `Шаг ${e.index + 1}`
|
|
3046
|
+
}, [E(t.$slots, "default")], 8, Hi)) : s("", !0);
|
|
3047
|
+
}
|
|
3048
|
+
}), Wi = { class: "uid-pattern-header__inner" }, Gi = {
|
|
3049
|
+
key: 0,
|
|
3050
|
+
class: "uid-pattern-header__logo"
|
|
3051
|
+
}, Ki = {
|
|
3052
|
+
key: 1,
|
|
3053
|
+
class: "uid-pattern-header__nav",
|
|
3054
|
+
"aria-label": "Основная навигация"
|
|
3055
|
+
}, qi = {
|
|
3056
|
+
key: 2,
|
|
3057
|
+
class: "uid-pattern-header__actions"
|
|
3058
|
+
}, Ji = {
|
|
3059
|
+
key: 3,
|
|
3060
|
+
class: "uid-pattern-header__mobile"
|
|
3061
|
+
}, Yi = /* @__PURE__ */ f({
|
|
3062
|
+
__name: "UidHeader",
|
|
3063
|
+
props: {
|
|
3064
|
+
sticky: {
|
|
3065
|
+
type: Boolean,
|
|
3066
|
+
default: !1
|
|
3067
|
+
},
|
|
3068
|
+
bordered: {
|
|
3069
|
+
type: Boolean,
|
|
3070
|
+
default: !0
|
|
3071
|
+
},
|
|
3072
|
+
transparent: {
|
|
3073
|
+
type: Boolean,
|
|
3074
|
+
default: !1
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
setup(e) {
|
|
3078
|
+
return (t, n) => (x(), c("header", { class: _(["uid-pattern-header", {
|
|
3079
|
+
"uid-pattern-header--sticky": e.sticky,
|
|
3080
|
+
"uid-pattern-header--bordered": e.bordered,
|
|
3081
|
+
"uid-pattern-header--transparent": e.transparent
|
|
3082
|
+
}]) }, [l("div", Wi, [
|
|
3083
|
+
t.$slots.logo ? (x(), c("div", Gi, [E(t.$slots, "logo")])) : s("", !0),
|
|
3084
|
+
t.$slots.nav ? (x(), c("nav", Ki, [E(t.$slots, "nav")])) : s("", !0),
|
|
3085
|
+
t.$slots.actions ? (x(), c("div", qi, [E(t.$slots, "actions")])) : s("", !0),
|
|
3086
|
+
t.$slots.mobile ? (x(), c("div", Ji, [E(t.$slots, "mobile")])) : s("", !0)
|
|
3087
|
+
])], 2));
|
|
3088
|
+
}
|
|
3089
|
+
}), Xi = { class: "uid-pattern-footer__inner" }, Zi = {
|
|
3090
|
+
key: 0,
|
|
3091
|
+
class: "uid-pattern-footer__columns"
|
|
3092
|
+
}, Qi = {
|
|
3093
|
+
key: 1,
|
|
3094
|
+
class: "uid-pattern-footer__content"
|
|
3095
|
+
}, $i = {
|
|
3096
|
+
key: 2,
|
|
3097
|
+
class: "uid-pattern-footer__bottom"
|
|
3098
|
+
}, ea = /* @__PURE__ */ f({
|
|
3099
|
+
__name: "UidFooter",
|
|
3100
|
+
props: { variant: { default: "minimal" } },
|
|
3101
|
+
setup(e) {
|
|
3102
|
+
return (t, n) => (x(), c("footer", { class: _(["uid-pattern-footer", `uid-pattern-footer--${e.variant}`]) }, [l("div", Xi, [t.$slots.columns ? (x(), c("div", Zi, [E(t.$slots, "columns")])) : t.$slots.default ? (x(), c("div", Qi, [E(t.$slots, "default")])) : s("", !0), t.$slots.bottom ? (x(), c("div", $i, [E(t.$slots, "bottom")])) : s("", !0)])], 2));
|
|
3103
|
+
}
|
|
3104
|
+
}), ta = {
|
|
3105
|
+
key: 0,
|
|
3106
|
+
class: "uid-pattern-sidebar__header"
|
|
3107
|
+
}, na = {
|
|
3108
|
+
class: "uid-pattern-sidebar__nav",
|
|
3109
|
+
"aria-label": "Навигация"
|
|
3110
|
+
}, ra = {
|
|
3111
|
+
key: 1,
|
|
3112
|
+
class: "uid-pattern-sidebar__footer"
|
|
3113
|
+
}, ia = /* @__PURE__ */ f({
|
|
3114
|
+
__name: "UidSidebar",
|
|
3115
|
+
props: {
|
|
3116
|
+
collapsed: {
|
|
3117
|
+
type: Boolean,
|
|
3118
|
+
default: !1
|
|
3119
|
+
},
|
|
3120
|
+
width: { default: void 0 },
|
|
3121
|
+
position: { default: "left" }
|
|
3122
|
+
},
|
|
3123
|
+
setup(e) {
|
|
3124
|
+
return (t, n) => (x(), c("aside", {
|
|
3125
|
+
class: _(["uid-pattern-sidebar", [`uid-pattern-sidebar--${e.position}`, { "uid-pattern-sidebar--collapsed": e.collapsed }]]),
|
|
3126
|
+
style: v(e.width && !e.collapsed ? { "--uid-sidebar-width": e.width } : void 0),
|
|
3127
|
+
"aria-label": "Боковая навигация"
|
|
3128
|
+
}, [
|
|
3129
|
+
t.$slots.header ? (x(), c("div", ta, [E(t.$slots, "header")])) : s("", !0),
|
|
3130
|
+
l("nav", na, [E(t.$slots, "nav")]),
|
|
3131
|
+
t.$slots.footer ? (x(), c("div", ra, [E(t.$slots, "footer")])) : s("", !0)
|
|
3132
|
+
], 6));
|
|
3133
|
+
}
|
|
3134
|
+
}), aa = {
|
|
3135
|
+
key: 0,
|
|
3136
|
+
class: "uid-sidebar-item__icon",
|
|
3137
|
+
"aria-hidden": "true"
|
|
3138
|
+
}, oa = { class: "uid-sidebar-item__label" }, sa = {
|
|
3139
|
+
key: 1,
|
|
3140
|
+
class: "uid-sidebar-item__badge"
|
|
3141
|
+
}, ca = /* @__PURE__ */ f({
|
|
3142
|
+
__name: "UidSidebarItem",
|
|
3143
|
+
props: {
|
|
3144
|
+
href: { default: void 0 },
|
|
3145
|
+
to: { default: void 0 },
|
|
3146
|
+
active: {
|
|
3147
|
+
type: Boolean,
|
|
3148
|
+
default: !1
|
|
3149
|
+
},
|
|
3150
|
+
disabled: {
|
|
3151
|
+
type: Boolean,
|
|
3152
|
+
default: !1
|
|
3153
|
+
},
|
|
3154
|
+
badge: { default: void 0 },
|
|
3155
|
+
as: { default: void 0 }
|
|
3156
|
+
},
|
|
3157
|
+
setup(e) {
|
|
3158
|
+
let t = e, n = a(() => {
|
|
3159
|
+
if (t.as) return t.as;
|
|
3160
|
+
if (t.to !== void 0) try {
|
|
3161
|
+
return D("RouterLink");
|
|
3162
|
+
} catch {
|
|
3163
|
+
return "a";
|
|
3164
|
+
}
|
|
3165
|
+
return "a";
|
|
3166
|
+
}), r = a(() => t.to === void 0 ? { href: t.disabled ? void 0 : t.href } : { to: t.to });
|
|
3167
|
+
return (t, i) => (x(), o(O(n.value), h({ class: ["uid-sidebar-item", {
|
|
3168
|
+
"uid-sidebar-item--active": e.active,
|
|
3169
|
+
"uid-sidebar-item--disabled": e.disabled
|
|
3170
|
+
}] }, r.value, {
|
|
3171
|
+
"aria-current": e.active ? "page" : void 0,
|
|
3172
|
+
"aria-disabled": e.disabled || void 0,
|
|
3173
|
+
tabindex: e.disabled ? -1 : void 0
|
|
3174
|
+
}), {
|
|
3175
|
+
default: R(() => [
|
|
3176
|
+
t.$slots.icon ? (x(), c("span", aa, [E(t.$slots, "icon")])) : s("", !0),
|
|
3177
|
+
l("span", oa, [E(t.$slots, "default")]),
|
|
3178
|
+
e.badge === void 0 ? s("", !0) : (x(), c("span", sa, k(e.badge), 1))
|
|
3179
|
+
]),
|
|
3180
|
+
_: 3
|
|
3181
|
+
}, 16, [
|
|
3182
|
+
"class",
|
|
3183
|
+
"aria-current",
|
|
3184
|
+
"aria-disabled",
|
|
3185
|
+
"tabindex"
|
|
3186
|
+
]));
|
|
3187
|
+
}
|
|
3188
|
+
}), la = { class: "uid-sidebar-group" }, ua = {
|
|
3189
|
+
key: 0,
|
|
3190
|
+
class: "uid-sidebar-group__title"
|
|
3191
|
+
}, da = /* @__PURE__ */ f({
|
|
3192
|
+
__name: "UidSidebarGroup",
|
|
3193
|
+
props: {
|
|
3194
|
+
title: { default: void 0 },
|
|
3195
|
+
collapsible: {
|
|
3196
|
+
type: Boolean,
|
|
3197
|
+
default: !1
|
|
3198
|
+
}
|
|
3199
|
+
},
|
|
3200
|
+
setup(e) {
|
|
3201
|
+
return (t, n) => (x(), c("div", la, [e.title ? (x(), c("p", ua, k(e.title), 1)) : s("", !0), E(t.$slots, "default")]));
|
|
3202
|
+
}
|
|
3203
|
+
}), fa = {}, pa = {
|
|
3204
|
+
class: "uid-sidebar-divider",
|
|
3205
|
+
role: "separator",
|
|
3206
|
+
"aria-hidden": "true"
|
|
3207
|
+
};
|
|
3208
|
+
function ma(e, t) {
|
|
3209
|
+
return x(), c("div", pa);
|
|
3210
|
+
}
|
|
3211
|
+
var ha = /* @__PURE__ */ bn(fa, [["render", ma]]), ga = { class: "uid-pattern-page-header" }, _a = {
|
|
3212
|
+
key: 0,
|
|
3213
|
+
class: "uid-pattern-page-header__breadcrumb"
|
|
3214
|
+
}, va = { class: "uid-pattern-page-header__row" }, ya = { class: "uid-pattern-page-header__heading" }, ba = { class: "uid-pattern-page-header__title" }, xa = {
|
|
3215
|
+
key: 0,
|
|
3216
|
+
class: "uid-pattern-page-header__description"
|
|
3217
|
+
}, Sa = {
|
|
3218
|
+
key: 0,
|
|
3219
|
+
class: "uid-pattern-page-header__actions"
|
|
3220
|
+
}, Ca = {
|
|
3221
|
+
key: 1,
|
|
3222
|
+
class: "uid-pattern-page-header__tabs"
|
|
3223
|
+
}, wa = /* @__PURE__ */ f({
|
|
3224
|
+
__name: "UidPageHeader",
|
|
3225
|
+
props: {
|
|
3226
|
+
title: { default: void 0 },
|
|
3227
|
+
description: { default: void 0 },
|
|
3228
|
+
back: {
|
|
3229
|
+
type: Boolean,
|
|
3230
|
+
default: !1
|
|
3231
|
+
}
|
|
3232
|
+
},
|
|
3233
|
+
emits: ["back"],
|
|
3234
|
+
setup(t, { emit: n }) {
|
|
3235
|
+
let r = n;
|
|
3236
|
+
return (n, i) => (x(), c("div", ga, [
|
|
3237
|
+
n.$slots.breadcrumb ? (x(), c("div", _a, [E(n.$slots, "breadcrumb")])) : s("", !0),
|
|
3238
|
+
l("div", va, [l("div", ya, [t.back ? (x(), c("button", {
|
|
3239
|
+
key: 0,
|
|
3240
|
+
type: "button",
|
|
3241
|
+
class: "uid-pattern-page-header__back",
|
|
3242
|
+
"aria-label": "Назад",
|
|
3243
|
+
onClick: i[0] ||= (e) => r("back")
|
|
3244
|
+
}, [d(e, {
|
|
3245
|
+
icon: j(W),
|
|
3246
|
+
size: 20
|
|
3247
|
+
}, null, 8, ["icon"])])) : s("", !0), l("div", null, [l("h1", ba, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), t.description || n.$slots.description ? (x(), c("p", xa, [E(n.$slots, "description", {}, () => [u(k(t.description), 1)])])) : s("", !0)])]), n.$slots.actions ? (x(), c("div", Sa, [E(n.$slots, "actions")])) : s("", !0)]),
|
|
3248
|
+
n.$slots.tabs ? (x(), c("div", Ca, [E(n.$slots, "tabs")])) : s("", !0)
|
|
3249
|
+
]));
|
|
3250
|
+
}
|
|
3251
|
+
}), Ta = { class: "uid-pattern-empty-state" }, Ea = { class: "uid-pattern-empty-state__illustration" }, Da = { class: "uid-pattern-empty-state__content" }, Oa = { class: "uid-pattern-empty-state__title" }, ka = {
|
|
3252
|
+
key: 0,
|
|
3253
|
+
class: "uid-pattern-empty-state__description"
|
|
3254
|
+
}, Aa = {
|
|
3255
|
+
key: 0,
|
|
3256
|
+
class: "uid-pattern-empty-state__actions"
|
|
3257
|
+
}, ja = /* @__PURE__ */ f({
|
|
3258
|
+
__name: "UidEmptyState",
|
|
3259
|
+
props: {
|
|
3260
|
+
title: { default: "Ничего не найдено" },
|
|
3261
|
+
description: { default: void 0 }
|
|
3262
|
+
},
|
|
3263
|
+
setup(t) {
|
|
3264
|
+
return (n, r) => (x(), c("div", Ta, [
|
|
3265
|
+
l("div", Ea, [E(n.$slots, "illustration", {}, () => [d(e, {
|
|
3266
|
+
icon: j(Y),
|
|
3267
|
+
size: 48
|
|
3268
|
+
}, null, 8, ["icon"])])]),
|
|
3269
|
+
l("div", Da, [l("h2", Oa, [E(n.$slots, "title", {}, () => [u(k(t.title), 1)])]), t.description || n.$slots.description ? (x(), c("p", ka, [E(n.$slots, "description", {}, () => [u(k(t.description), 1)])])) : s("", !0)]),
|
|
3270
|
+
n.$slots.actions ? (x(), c("div", Aa, [E(n.$slots, "actions")])) : s("", !0)
|
|
3271
|
+
]));
|
|
3272
|
+
}
|
|
3273
|
+
}), Ma = { class: "uid-pattern-error-state" }, Na = { class: "uid-pattern-error-state__illustration" }, Pa = {
|
|
3274
|
+
key: 0,
|
|
3275
|
+
class: "uid-pattern-error-state__code"
|
|
3276
|
+
}, Fa = { class: "uid-pattern-error-state__content" }, Ia = { class: "uid-pattern-error-state__title" }, La = {
|
|
3277
|
+
key: 0,
|
|
3278
|
+
class: "uid-pattern-error-state__description"
|
|
3279
|
+
}, Ra = {
|
|
3280
|
+
key: 1,
|
|
3281
|
+
class: "uid-pattern-error-state__actions"
|
|
3282
|
+
}, za = /* @__PURE__ */ f({
|
|
3283
|
+
__name: "UidErrorState",
|
|
3284
|
+
props: {
|
|
3285
|
+
code: { default: void 0 },
|
|
3286
|
+
title: { default: void 0 },
|
|
3287
|
+
description: { default: void 0 }
|
|
3288
|
+
},
|
|
3289
|
+
setup(t) {
|
|
3290
|
+
let n = t, r = {
|
|
3291
|
+
404: {
|
|
3292
|
+
icon: V,
|
|
3293
|
+
title: "Страница не найдена",
|
|
3294
|
+
description: "Запрашиваемая страница не существует или была перемещена."
|
|
3295
|
+
},
|
|
3296
|
+
500: {
|
|
3297
|
+
icon: ae,
|
|
3298
|
+
title: "Ошибка сервера",
|
|
3299
|
+
description: "На сервере произошла ошибка. Мы уже работаем над исправлением."
|
|
3300
|
+
},
|
|
3301
|
+
network: {
|
|
3302
|
+
icon: oe,
|
|
3303
|
+
title: "Нет соединения",
|
|
3304
|
+
description: "Проверьте подключение к интернету и попробуйте снова."
|
|
3305
|
+
}
|
|
3306
|
+
}, 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", Ma, [
|
|
3308
|
+
l("div", Na, [E(n.$slots, "illustration", {}, () => [d(e, {
|
|
3309
|
+
icon: o.value,
|
|
3310
|
+
size: 48
|
|
3311
|
+
}, null, 8, ["icon"])])]),
|
|
3312
|
+
t.code ? (x(), c("div", Pa, k(t.code), 1)) : s("", !0),
|
|
3313
|
+
l("div", Fa, [l("h2", Ia, [E(n.$slots, "title", {}, () => [u(k(f.value), 1)])]), p.value || n.$slots.description ? (x(), c("p", La, [E(n.$slots, "description", {}, () => [u(k(p.value), 1)])])) : s("", !0)]),
|
|
3314
|
+
n.$slots.actions ? (x(), c("div", Ra, [E(n.$slots, "actions")])) : s("", !0)
|
|
3315
|
+
]));
|
|
3316
|
+
}
|
|
3317
|
+
}), Ba = {
|
|
3318
|
+
key: 0,
|
|
3319
|
+
class: "uid-layout-simple__header"
|
|
3320
|
+
}, Va = { class: "uid-layout-simple__content" }, Ha = {
|
|
3321
|
+
key: 1,
|
|
3322
|
+
class: "uid-layout-simple__footer"
|
|
3323
|
+
}, Ua = /* @__PURE__ */ f({
|
|
3324
|
+
__name: "UidSimpleLayout",
|
|
3325
|
+
props: { full: {
|
|
3326
|
+
type: Boolean,
|
|
3327
|
+
default: !1
|
|
3328
|
+
} },
|
|
3329
|
+
setup(e) {
|
|
3330
|
+
return (t, n) => (x(), c("div", { class: _(["uid-layout-simple", { "uid-layout-simple--full": e.full }]) }, [
|
|
3331
|
+
t.$slots.header ? (x(), c("div", Ba, [E(t.$slots, "header")])) : s("", !0),
|
|
3332
|
+
l("main", Va, [E(t.$slots, "default")]),
|
|
3333
|
+
t.$slots.footer ? (x(), c("div", Ha, [E(t.$slots, "footer")])) : s("", !0)
|
|
3334
|
+
], 2));
|
|
3335
|
+
}
|
|
3336
|
+
}), Wa = Symbol("uid-sidebar-layout");
|
|
3337
|
+
function Ga() {
|
|
3338
|
+
let e = p(Wa);
|
|
3339
|
+
if (!e) throw Error("useSidebar() must be used inside UidSidebarLayout");
|
|
3340
|
+
return e;
|
|
3341
|
+
}
|
|
3342
|
+
//#endregion
|
|
3343
|
+
//#region src/layouts/Sidebar/UidSidebarLayout.vue?vue&type=script&setup=true&lang.ts
|
|
3344
|
+
var Ka = { class: "uid-layout-sidebar__sidebar" }, qa = { class: "uid-layout-sidebar__main" }, Ja = {
|
|
3345
|
+
key: 0,
|
|
3346
|
+
class: "uid-layout-sidebar__main-header"
|
|
3347
|
+
}, Ya = { class: "uid-layout-sidebar__main-content" }, Xa = {
|
|
3348
|
+
key: 1,
|
|
3349
|
+
class: "uid-layout-sidebar__main-footer"
|
|
3350
|
+
}, Za = /* @__PURE__ */ f({
|
|
3351
|
+
__name: "UidSidebarLayout",
|
|
3352
|
+
props: /* @__PURE__ */ m({ sidebarWidth: { default: void 0 } }, {
|
|
3353
|
+
modelValue: {
|
|
3354
|
+
type: Boolean,
|
|
3355
|
+
default: !1
|
|
3356
|
+
},
|
|
3357
|
+
modelModifiers: {}
|
|
3358
|
+
}),
|
|
3359
|
+
emits: ["update:modelValue"],
|
|
3360
|
+
setup(e) {
|
|
3361
|
+
let t = e, n = N(e, "modelValue"), r = () => {
|
|
3362
|
+
n.value = !n.value;
|
|
3363
|
+
}, i = () => {
|
|
3364
|
+
n.value = !1;
|
|
3365
|
+
}, o = () => {
|
|
3366
|
+
n.value = !0;
|
|
3367
|
+
};
|
|
3368
|
+
S(Wa, {
|
|
3369
|
+
collapsed: n,
|
|
3370
|
+
toggle: r,
|
|
3371
|
+
open: i,
|
|
3372
|
+
close: o
|
|
3373
|
+
});
|
|
3374
|
+
let u = a(() => t.sidebarWidth ? { "--uid-layout-sidebar-width": t.sidebarWidth } : void 0);
|
|
3375
|
+
return (e, t) => (x(), c("div", {
|
|
3376
|
+
class: _(["uid-layout-sidebar", { "uid-layout-sidebar--collapsed": n.value }]),
|
|
3377
|
+
style: v(u.value)
|
|
3378
|
+
}, [
|
|
3379
|
+
l("aside", Ka, [E(e.$slots, "sidebar")]),
|
|
3380
|
+
l("div", {
|
|
3381
|
+
class: "uid-layout-sidebar__backdrop",
|
|
3382
|
+
"aria-hidden": "true",
|
|
3383
|
+
onClick: o
|
|
3384
|
+
}),
|
|
3385
|
+
l("div", qa, [
|
|
3386
|
+
e.$slots.header ? (x(), c("div", Ja, [E(e.$slots, "header")])) : s("", !0),
|
|
3387
|
+
l("main", Ya, [E(e.$slots, "default")]),
|
|
3388
|
+
e.$slots.footer ? (x(), c("div", Xa, [E(e.$slots, "footer")])) : s("", !0)
|
|
3389
|
+
])
|
|
3390
|
+
], 6));
|
|
3391
|
+
}
|
|
3392
|
+
}), Qa = {
|
|
3393
|
+
key: 0,
|
|
3394
|
+
class: "uid-layout-auth__brand"
|
|
3395
|
+
}, $a = { class: "uid-layout-auth__main" }, eo = { class: "uid-layout-auth__card" }, to = {
|
|
3396
|
+
key: 0,
|
|
3397
|
+
class: "uid-layout-auth__footer"
|
|
3398
|
+
}, no = /* @__PURE__ */ f({
|
|
3399
|
+
__name: "UidAuthLayout",
|
|
3400
|
+
props: { variant: { default: "centered" } },
|
|
3401
|
+
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", Qa, [E(t.$slots, "brand")])) : s("", !0), l("div", $a, [l("div", eo, [E(t.$slots, "default")]), t.$slots.footer ? (x(), c("div", to, [E(t.$slots, "footer")])) : s("", !0)])], 2));
|
|
3403
|
+
}
|
|
3404
|
+
}), ro = { class: "uid-layout-wizard" }, io = {
|
|
3405
|
+
key: 0,
|
|
3406
|
+
class: "uid-layout-wizard__header"
|
|
3407
|
+
}, ao = {
|
|
3408
|
+
key: 1,
|
|
3409
|
+
class: "uid-layout-wizard__stepper"
|
|
3410
|
+
}, oo = { class: "uid-layout-wizard__content" }, so = {
|
|
3411
|
+
key: 2,
|
|
3412
|
+
class: "uid-layout-wizard__nav"
|
|
3413
|
+
}, co = /* @__PURE__ */ f({
|
|
3414
|
+
__name: "UidWizardLayout",
|
|
3415
|
+
setup(e) {
|
|
3416
|
+
return (e, t) => (x(), c("div", ro, [
|
|
3417
|
+
e.$slots.header ? (x(), c("div", io, [E(e.$slots, "header")])) : s("", !0),
|
|
3418
|
+
e.$slots.stepper ? (x(), c("div", ao, [E(e.$slots, "stepper")])) : s("", !0),
|
|
3419
|
+
l("main", oo, [E(e.$slots, "default")]),
|
|
3420
|
+
e.$slots.nav ? (x(), c("div", so, [E(e.$slots, "nav")])) : s("", !0)
|
|
3421
|
+
]));
|
|
3422
|
+
}
|
|
3423
|
+
}), lo = w("light");
|
|
3424
|
+
function uo() {
|
|
3425
|
+
let e = null;
|
|
3426
|
+
function t(e) {
|
|
3427
|
+
lo.value = e, document.documentElement.dataset.theme = e;
|
|
3428
|
+
}
|
|
3429
|
+
function n() {
|
|
3430
|
+
t(lo.value === "light" ? "dark" : "light");
|
|
3431
|
+
}
|
|
3432
|
+
function r() {
|
|
3433
|
+
let e = document.documentElement.dataset.theme;
|
|
3434
|
+
if (e === "light" || e === "dark") {
|
|
3435
|
+
lo.value = e;
|
|
3436
|
+
return;
|
|
3437
|
+
}
|
|
3438
|
+
let n = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3439
|
+
t(n ? "dark" : "light");
|
|
3440
|
+
}
|
|
3441
|
+
function i() {
|
|
3442
|
+
e = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3443
|
+
let n = (e) => t(e.matches ? "dark" : "light");
|
|
3444
|
+
e.addEventListener("change", n), b(() => e?.removeEventListener("change", n));
|
|
3445
|
+
}
|
|
3446
|
+
return {
|
|
3447
|
+
theme: lo,
|
|
3448
|
+
setTheme: t,
|
|
3449
|
+
toggle: n,
|
|
3450
|
+
initFromSystem: r,
|
|
3451
|
+
watchSystem: i
|
|
3452
|
+
};
|
|
3453
|
+
}
|
|
3454
|
+
//#endregion
|
|
3455
|
+
//#region src/composables/useWizard.ts
|
|
3456
|
+
function fo() {
|
|
3457
|
+
let e = p(zi);
|
|
3458
|
+
if (!e) throw Error("useWizard() must be used inside UidWizard");
|
|
3459
|
+
return e;
|
|
3460
|
+
}
|
|
3461
|
+
//#endregion
|
|
3462
|
+
//#region src/composables/useCommandPalette.ts
|
|
3463
|
+
var po = w(!1);
|
|
3464
|
+
function mo() {
|
|
3465
|
+
return {
|
|
3466
|
+
open: po,
|
|
3467
|
+
show: () => {
|
|
3468
|
+
po.value = !0;
|
|
3469
|
+
},
|
|
3470
|
+
hide: () => {
|
|
3471
|
+
po.value = !1;
|
|
3472
|
+
},
|
|
3473
|
+
toggle: () => {
|
|
3474
|
+
po.value = !po.value;
|
|
3475
|
+
}
|
|
3476
|
+
};
|
|
3477
|
+
}
|
|
3478
|
+
//#endregion
|
|
3479
|
+
export { Cr as UidAccordion, kr as UidAccordionItem, At as UidAlert, no as UidAuthLayout, mr as UidAvatar, _r as UidAvatarGroup, Tt as UidBadge, Pn as UidBreadcrumb, Rn as UidBreadcrumbItem, ue as UidButton, dr as UidCard, Ze as UidCheckbox, _i as UidColorPicker, Di as UidCommand, Ri as UidContainer, ni as UidDatePicker, br as UidDivider, cn as UidDrawer, ja as UidEmptyState, za as UidErrorState, ea as UidFooter, bt as UidFormField, Li as UidGrid, Yi as UidHeader, e as UidIcon, tr as UidInfiniteScroll, Ve as UidInput, ht as UidLabel, zn as UidLink, Qn as UidLoadMore, _n as UidMenu, yn as UidMenuItem, wn as UidMenuSeparator, tn as UidModal, wa as UidPageHeader, or as UidPageSize, Gn as UidPagination, Yn as UidPaginationCursor, hn as UidPopover, Gt as UidProgress, tt as UidRadio, st as UidRadioGroup, Jr as UidSelect, ia as UidSidebar, ha as UidSidebarDivider, da as UidSidebarGroup, ca as UidSidebarItem, Za as UidSidebarLayout, Ua as UidSimpleLayout, wt as UidSkeleton, ci as UidSlider, St as UidSpinner, Ii as UidStack, Fi as UidStepper, ft as UidSwitch, An as UidTab, Mn as UidTabPanel, zr as UidTable, On as UidTabs, vr as UidTag, Ke as UidTextarea, Ft as UidToast, zt as UidToastProvider, mn as UidTooltip, ri as UidVirtualList, Vi as UidWizard, co as UidWizardLayout, Ui as UidWizardStep, _e as email, Z as getMessage, Ee as inList, be as integer, Se as max, we as maxValue, xe as min, Ce as minValue, ge as nullable, ye as numeric, je as parseRules, Te as regex, he as required, Oe as requiredIf, ke as requiredUnless, Me as runRules, De as sameAs, pe as setMessages, ve as url, mo as useCommandPalette, Ne as useField, qt as useFocusTrap, dn as usePopover, Yt as useScrollLock, Ga as useSidebar, uo as useTheme, Rt as useToast, fo as useWizard };
|