@topvisor/ui 0.9.2 → 0.9.3
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/.chunks/datepicker-78c2af5a.es.js +275 -0
- package/.chunks/datepicker-78c2af5a.es.js.map +1 -0
- package/.chunks/datepicker-d67bd339.amd.js +234 -0
- package/.chunks/datepicker-d67bd339.amd.js.map +1 -0
- package/.chunks/forms-9284b6d9.amd.js +3 -0
- package/.chunks/forms-9284b6d9.amd.js.map +1 -0
- package/.chunks/forms-9516aa6c.es.js +1000 -0
- package/.chunks/forms-9516aa6c.es.js.map +1 -0
- package/.chunks/{popup-b2fe3094.es.js → popup-3054fcc1.es.js} +423 -422
- package/.chunks/popup-3054fcc1.es.js.map +1 -0
- package/.chunks/popup-c85f28bf.amd.js +378 -0
- package/.chunks/popup-c85f28bf.amd.js.map +1 -0
- package/README.md +80 -80
- package/assets/forms.css +1 -1
- package/assets/tabsView.css +1 -1
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js.map +1 -1
- package/formsExt/formsExt.amd.js +1 -1
- package/formsExt/formsExt.amd.js.map +1 -1
- package/formsExt/formsExt.js +83 -84
- package/formsExt/formsExt.js.map +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2945
- package/icomoon/fonts/Topvisor-2.svg +232 -232
- package/icomoon/style.css +647 -647
- package/package.json +22 -19
- package/popup/popup.amd.js +1 -1
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +52 -52
- package/popup/popup.js.map +1 -1
- package/popup/worker.amd.js +1 -1
- package/popup/worker.amd.js.map +1 -1
- package/popup/worker.js +3 -2
- package/popup/worker.js.map +1 -1
- package/src/components/forms/button/button.stories.d.ts +97 -140
- package/src/components/forms/checkbox/checkbox.stories.d.ts +61 -100
- package/src/components/forms/controlLabel/controlLabel.stories.d.ts +20 -53
- package/src/components/forms/input/input.stories.d.ts +101 -145
- package/src/components/forms/inputRange/inputRange.stories.d.ts +117 -221
- package/src/components/forms/radio/radio.stories.d.ts +57 -95
- package/src/components/forms/switcher/switcher.stories.d.ts +55 -93
- package/src/components/formsExt/editInput/editInput.stories.d.ts +34 -69
- package/src/components/popup/popup/popup.stories.d.ts +242 -363
- package/src/components/tabs/tabs/tabs.stories.d.ts +195 -370
- package/src/components/tabsView/tabsView/_MenuItem.stories.d.ts +110 -216
- package/src/components/tabsView/tabsView/_MenuTitle.stories.d.ts +76 -176
- package/src/components/tabsView/tabsView/tabsView.stories.d.ts +156 -327
- package/src/core/core/page.d.ts +0 -7
- package/src/core/utils/css.d.ts +5 -0
- package/tabs/tabs.amd.js +1 -1
- package/tabs/tabs.js +37 -38
- package/tabs/tabs.js.map +1 -1
- package/tabsView/tabsView.amd.js +1 -1
- package/tabsView/tabsView.amd.js.map +1 -1
- package/tabsView/tabsView.js +94 -90
- package/tabsView/tabsView.js.map +1 -1
- package/utils/css.amd.js +2 -0
- package/utils/css.amd.js.map +1 -0
- package/utils/css.d.ts +1 -0
- package/utils/css.js +35 -0
- package/utils/css.js.map +1 -0
- package/utils/date.amd.js +1 -1
- package/utils/date.js +1 -1
- package/utils/device.amd.js +1 -1
- package/utils/device.js +1 -1
- package/utils/dom.amd.js +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js +61 -3
- package/utils/dom.js.map +1 -1
- package/.chunks/datepicker-32bc8bd9.es.js +0 -275
- package/.chunks/datepicker-32bc8bd9.es.js.map +0 -1
- package/.chunks/datepicker-8a42d8a6.amd.js +0 -234
- package/.chunks/datepicker-8a42d8a6.amd.js.map +0 -1
- package/.chunks/forms-30d68077.amd.js +0 -3
- package/.chunks/forms-30d68077.amd.js.map +0 -1
- package/.chunks/forms-64632f73.es.js +0 -1091
- package/.chunks/forms-64632f73.es.js.map +0 -1
- package/.chunks/popup-14ca85cf.amd.js +0 -378
- package/.chunks/popup-14ca85cf.amd.js.map +0 -1
- package/.chunks/popup-b2fe3094.es.js.map +0 -1
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
import { insertToPage as J } from "../utils/css.js";
|
|
2
|
+
import { reactive as W, defineComponent as g, useCssVars as Q, computed as f, openBlock as p, createElementBlock as c, createElementVNode as w, createCommentVNode as v, createBlock as M, resolveDynamicComponent as x, normalizeClass as h, withCtx as B, renderSlot as _, createTextVNode as ee, toDisplayString as k, withDirectives as S, vModelCheckbox as X, mergeProps as T, withKeys as te, withModifiers as N, vModelText as q, onUnmounted as oe, ref as ae, unref as V, vModelRadio as se, resolveDirective as ne, watch as ie, toRef as le, Fragment as F, renderList as O, vModelSelect as re } from "vue";
|
|
3
|
+
const Z = ["../assets/forms.css"].map((a) => import.meta.resolve(a));
|
|
4
|
+
await J(Z);
|
|
5
|
+
function de() {
|
|
6
|
+
return "devicePixelRatio" in window && window.devicePixelRatio > 1;
|
|
7
|
+
}
|
|
8
|
+
function pe() {
|
|
9
|
+
return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
|
|
10
|
+
}
|
|
11
|
+
function ue() {
|
|
12
|
+
return navigator.userAgent.indexOf("Topvisor_App") != -1;
|
|
13
|
+
}
|
|
14
|
+
function ce() {
|
|
15
|
+
return navigator.userAgent.indexOf("Mac OS X") !== -1;
|
|
16
|
+
}
|
|
17
|
+
function Ft() {
|
|
18
|
+
const a = /Chrome|Android/.test(navigator.userAgent);
|
|
19
|
+
let t = /Safari/.test(navigator.userAgent);
|
|
20
|
+
return a && t && (t = !1), t;
|
|
21
|
+
}
|
|
22
|
+
function Dt() {
|
|
23
|
+
return ce() ? "⌘" : "Ctrl";
|
|
24
|
+
}
|
|
25
|
+
class me {
|
|
26
|
+
}
|
|
27
|
+
const be = 100;
|
|
28
|
+
let H;
|
|
29
|
+
const A = /* @__PURE__ */ new Map(), L = {
|
|
30
|
+
width: window.innerWidth,
|
|
31
|
+
height: window.innerHeight
|
|
32
|
+
};
|
|
33
|
+
function fe(a) {
|
|
34
|
+
A.set(a, a);
|
|
35
|
+
}
|
|
36
|
+
function he(a) {
|
|
37
|
+
A.delete(a);
|
|
38
|
+
}
|
|
39
|
+
function ve(a) {
|
|
40
|
+
clearTimeout(H), H = setTimeout(function() {
|
|
41
|
+
a.topEvent = {
|
|
42
|
+
widthDiff: L.width - window.innerWidth,
|
|
43
|
+
hightDiff: L.height - window.innerHeight
|
|
44
|
+
}, L.width = window.innerWidth, L.height = window.innerHeight, A.forEach((t) => t(a));
|
|
45
|
+
}, be);
|
|
46
|
+
}
|
|
47
|
+
window.addEventListener("resize", ve);
|
|
48
|
+
const ge = {
|
|
49
|
+
addOnReize: fe,
|
|
50
|
+
removeOnResize: he
|
|
51
|
+
};
|
|
52
|
+
var G;
|
|
53
|
+
const ye = {
|
|
54
|
+
widthForMobile: 900,
|
|
55
|
+
dateFormat: "Y-m-d",
|
|
56
|
+
/**
|
|
57
|
+
* Для Москвы: +0300
|
|
58
|
+
*/
|
|
59
|
+
gmt: (G = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : G[1]
|
|
60
|
+
};
|
|
61
|
+
var K;
|
|
62
|
+
const we = {
|
|
63
|
+
/**
|
|
64
|
+
* Device by size
|
|
65
|
+
* @see widthForMobile
|
|
66
|
+
*/
|
|
67
|
+
isMobile: !1,
|
|
68
|
+
/**
|
|
69
|
+
* Device by user agent
|
|
70
|
+
*/
|
|
71
|
+
isMobileUA: !1,
|
|
72
|
+
/**
|
|
73
|
+
* true, если плотность пикселей экрана больше 1
|
|
74
|
+
*/
|
|
75
|
+
isRetina: !1,
|
|
76
|
+
/**
|
|
77
|
+
* true, елси это приложение
|
|
78
|
+
*/
|
|
79
|
+
isApp: !1,
|
|
80
|
+
/**
|
|
81
|
+
* true при горизонтальном расположении устройства
|
|
82
|
+
*/
|
|
83
|
+
isLandscape: !0,
|
|
84
|
+
/**
|
|
85
|
+
* true при вертикальном расположении устройства
|
|
86
|
+
*/
|
|
87
|
+
isPortrait: !1,
|
|
88
|
+
size: 0,
|
|
89
|
+
// См. core.options
|
|
90
|
+
dateFormat: "Y-m-d",
|
|
91
|
+
// См. core.options
|
|
92
|
+
gmt: (K = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : K[1]
|
|
93
|
+
}, E = window, D = (a) => {
|
|
94
|
+
var t, s;
|
|
95
|
+
if (!((s = (t = E == null ? void 0 : E.jQuery) == null ? void 0 : t.ui) != null && s.tooltip)) {
|
|
96
|
+
console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
return E.jQuery(a);
|
|
100
|
+
}, I = (a, t) => {
|
|
101
|
+
var n;
|
|
102
|
+
const s = a.value ?? {};
|
|
103
|
+
return s.content ??= (n = t.props) == null ? void 0 : n.title, s.content = String(s.content).replace(/\r\n|\r|\n/g, "<br>"), s.position ??= {
|
|
104
|
+
my: "bottom-18px",
|
|
105
|
+
at: "top center"
|
|
106
|
+
}, s;
|
|
107
|
+
}, $e = {
|
|
108
|
+
mounted(a, t, s) {
|
|
109
|
+
var n;
|
|
110
|
+
(n = D(a)) == null || n.tooltip(I(t, s));
|
|
111
|
+
},
|
|
112
|
+
updated(a, t, s, n) {
|
|
113
|
+
var r;
|
|
114
|
+
const o = I(t, s), e = (r = D(a)) == null ? void 0 : r.tooltip("instance");
|
|
115
|
+
e && (e.options = {
|
|
116
|
+
...e.options,
|
|
117
|
+
...o
|
|
118
|
+
});
|
|
119
|
+
},
|
|
120
|
+
unmounted(a, t, s) {
|
|
121
|
+
var n;
|
|
122
|
+
(n = D(a)) == null || n.tooltip("destroy");
|
|
123
|
+
}
|
|
124
|
+
}, C = window;
|
|
125
|
+
class d {
|
|
126
|
+
/**
|
|
127
|
+
* Настройки словаря
|
|
128
|
+
*/
|
|
129
|
+
static L = W({
|
|
130
|
+
Not_date: "Not date"
|
|
131
|
+
});
|
|
132
|
+
static page = (C == null ? void 0 : C.page) || {};
|
|
133
|
+
static Page = me;
|
|
134
|
+
static options = ye;
|
|
135
|
+
static state = W({ ...we });
|
|
136
|
+
static matchMediaIsMobile;
|
|
137
|
+
/**
|
|
138
|
+
* Добавить на страницу стили, используется для загрузки стилей из js
|
|
139
|
+
*
|
|
140
|
+
* Условная загрузка стилей m и pc отключена в пользу производительсности, стили грузятся всегда, но применяются по условию
|
|
141
|
+
* @param style - css стили в строке
|
|
142
|
+
* @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.options.widthForMobile
|
|
143
|
+
*/
|
|
144
|
+
static appendStyle(t, s = "") {
|
|
145
|
+
let n = "all";
|
|
146
|
+
s === "m" && (n = "(max-width: " + this.options.widthForMobile + "px)"), s === "pc" && (n = "(min-width: " + this.options.widthForMobile + "px)");
|
|
147
|
+
const o = document.createElement("style");
|
|
148
|
+
o.innerHTML = t, o.media = n, document.head.append(o);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Установить как плагин в прилоежнии Vue
|
|
152
|
+
* Core.state является общим для всех приложений Vue на странице
|
|
153
|
+
* Core.options является общим для всех приложений Vue на странице
|
|
154
|
+
* @param app - Vue App
|
|
155
|
+
* @param {typeof options} options - параметры UI
|
|
156
|
+
*/
|
|
157
|
+
static install(t, s) {
|
|
158
|
+
d.defineOptions(s), t.provide("top-core", d), this.installDirectives(t);
|
|
159
|
+
}
|
|
160
|
+
static installDirectives(t) {
|
|
161
|
+
t.directive("top-tooltip", $e);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Установить конфигурацию UI
|
|
165
|
+
* @param {typeof options} options
|
|
166
|
+
*/
|
|
167
|
+
static defineOptions(t) {
|
|
168
|
+
t != null && t.widthForMobile && (this.options.widthForMobile = t.widthForMobile), t != null && t.dateFormat && (this.options.dateFormat = t.dateFormat), t != null && t.gmt && (this.options.gmt = t.gmt), d.setState();
|
|
169
|
+
}
|
|
170
|
+
static setState() {
|
|
171
|
+
d.matchMediaIsMobile = window.matchMedia(`(max-width: ${d.options.widthForMobile}px)`), d.state.isMobileUA = pe(), d.state.isRetina = de(), d.state.isApp = ue(), d.state.dateFormat = this.options.dateFormat, d.state.gmt = this.options.gmt, d.setStateByWindowSize(), ge.addOnReize(d.onResize), d.onResize(), d.saveToCookie();
|
|
172
|
+
}
|
|
173
|
+
static onResize() {
|
|
174
|
+
d.setStateByWindowSize(), document.documentElement.style.setProperty("--100vh", window.innerHeight + "px");
|
|
175
|
+
}
|
|
176
|
+
static setStateByWindowSize() {
|
|
177
|
+
var t;
|
|
178
|
+
d.state.isMobile = !!((t = d.matchMediaIsMobile) != null && t.matches), d.state.isLandscape = window.innerWidth > window.innerHeight, d.state.isPortrait = !d.state.isLandscape, d.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, d.saveToCookie();
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Сохранить информацию об устройстве в cookie
|
|
182
|
+
*/
|
|
183
|
+
static saveToCookie() {
|
|
184
|
+
const t = [
|
|
185
|
+
1,
|
|
186
|
+
window.innerWidth,
|
|
187
|
+
window.innerHeight,
|
|
188
|
+
window.devicePixelRatio,
|
|
189
|
+
Number(d.state.isMobile),
|
|
190
|
+
Number(d.state.isRetina)
|
|
191
|
+
];
|
|
192
|
+
document.cookie = "device=" + t.join(",") + "; path=/;";
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function Ct(a) {
|
|
196
|
+
return a.indexOf("T") === -1 && (a.length == 10 && (a += " 00:00:00"), a = a.replace(" ", "T") + d.state.gmt), new Date(a);
|
|
197
|
+
}
|
|
198
|
+
function _e(a, t = !0, s = 0) {
|
|
199
|
+
let n;
|
|
200
|
+
a != null ? n = new Date(a) : n = /* @__PURE__ */ new Date();
|
|
201
|
+
const o = n.getFullYear(), e = String(n.getMonth() + 1).padStart(2, "0"), r = n.getDate().toString().padStart(2, "0"), l = n.getHours().toString().padStart(2, "0"), i = n.getMinutes().toString().padStart(2, "0"), b = n.getSeconds().toString().padStart(2, "0");
|
|
202
|
+
return n = o + "-" + e + "-" + r, s && (n += " "), s >= 1 && (n += l), s >= 2 && (n += ":" + i), s >= 3 && (n += ":" + b), t && (n = R(n, s)), n;
|
|
203
|
+
}
|
|
204
|
+
function R(a, t = 2, s = d.L.Not_date) {
|
|
205
|
+
if ((!a || a.substring(0, 10) === "0000-00-00") && s && s !== "0000-00-00")
|
|
206
|
+
return s;
|
|
207
|
+
const n = d.state.dateFormat.toLowerCase();
|
|
208
|
+
let o = a.substring(0, 10);
|
|
209
|
+
o.length === 7 && (o += "-01"), o += " 00:00", o = o.replace(/-/g, "/");
|
|
210
|
+
const e = new Date(o);
|
|
211
|
+
if (isNaN(Number(e)))
|
|
212
|
+
return s;
|
|
213
|
+
let r = n.replace("y", String(e.getFullYear()).padStart(2, "0")).replace("m", String(e.getMonth() + 1).padStart(2, "0")).replace("d", String(e.getDate()).padStart(2, "0"));
|
|
214
|
+
if (a.length > 10)
|
|
215
|
+
switch (t) {
|
|
216
|
+
case 1:
|
|
217
|
+
r += " " + a.substring(11, 13);
|
|
218
|
+
break;
|
|
219
|
+
case 2:
|
|
220
|
+
r += " " + a.substring(11, 16);
|
|
221
|
+
break;
|
|
222
|
+
case 3:
|
|
223
|
+
r += " " + a.substring(11, 19);
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
return r;
|
|
227
|
+
}
|
|
228
|
+
function U(a, t = d.L.Not_date) {
|
|
229
|
+
if (!a)
|
|
230
|
+
return t;
|
|
231
|
+
if (a.match(/\d\d\d\d-\d\d-\d\d/))
|
|
232
|
+
return a;
|
|
233
|
+
const s = d.state.dateFormat.toLowerCase(), n = a.split(/\W/), o = s.split(/\W/);
|
|
234
|
+
let e = "", r = "", l = "";
|
|
235
|
+
o.forEach((b, u) => {
|
|
236
|
+
switch (b) {
|
|
237
|
+
case "d":
|
|
238
|
+
e = n[u];
|
|
239
|
+
break;
|
|
240
|
+
case "m":
|
|
241
|
+
r = n[u];
|
|
242
|
+
break;
|
|
243
|
+
case "y":
|
|
244
|
+
l = n[u];
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
let i = l + "-" + r + "-" + e;
|
|
249
|
+
return i.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + i), i = _e((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), i;
|
|
250
|
+
}
|
|
251
|
+
const ke = { class: "top-avatar" }, Me = ["src", "title"], Se = ["title"], Ve = /* @__PURE__ */ g({
|
|
252
|
+
__name: "avatar",
|
|
253
|
+
props: {
|
|
254
|
+
size: { default: 64 },
|
|
255
|
+
image: {},
|
|
256
|
+
nickname: {},
|
|
257
|
+
isOnline: { type: Boolean },
|
|
258
|
+
lastActiveTime: {}
|
|
259
|
+
},
|
|
260
|
+
setup(a) {
|
|
261
|
+
Q((o) => ({
|
|
262
|
+
c65930ac: o.size + "px"
|
|
263
|
+
}));
|
|
264
|
+
const t = a, s = {
|
|
265
|
+
user: {
|
|
266
|
+
Online: "Онлайн",
|
|
267
|
+
LastSeen: "Заходил(а)"
|
|
268
|
+
}
|
|
269
|
+
}, n = f(() => {
|
|
270
|
+
if (t.isOnline)
|
|
271
|
+
return s.user.Online;
|
|
272
|
+
if (t.lastActiveTime)
|
|
273
|
+
return s.user.LastSeen + ": " + R(t.lastActiveTime, 2);
|
|
274
|
+
});
|
|
275
|
+
return (o, e) => (p(), c("div", ke, [
|
|
276
|
+
w("img", {
|
|
277
|
+
class: "top-avatar_image",
|
|
278
|
+
src: o.image,
|
|
279
|
+
title: t.nickname + (n.value ? `
|
|
280
|
+
${n.value}` : ""),
|
|
281
|
+
alt: ""
|
|
282
|
+
}, null, 8, Me),
|
|
283
|
+
o.isOnline ? (p(), c("div", {
|
|
284
|
+
key: 0,
|
|
285
|
+
class: "top-avatar_status",
|
|
286
|
+
title: n.value
|
|
287
|
+
}, null, 8, Se)) : v("", !0)
|
|
288
|
+
]));
|
|
289
|
+
}
|
|
290
|
+
}), Be = {
|
|
291
|
+
"top-avatar": "top-avatar",
|
|
292
|
+
"top-avatar_image": "top-avatar_image",
|
|
293
|
+
"top-avatar_status": "top-avatar_status"
|
|
294
|
+
}, y = (a, t) => {
|
|
295
|
+
const s = a.__vccOpts || a;
|
|
296
|
+
for (const [n, o] of t)
|
|
297
|
+
s[n] = o;
|
|
298
|
+
return s;
|
|
299
|
+
}, ze = {
|
|
300
|
+
$style: Be
|
|
301
|
+
}, At = /* @__PURE__ */ y(Ve, [["__cssModules", ze]]), Le = {
|
|
302
|
+
key: 0,
|
|
303
|
+
class: "top-ellipsis"
|
|
304
|
+
}, Ee = /* @__PURE__ */ g({
|
|
305
|
+
__name: "button",
|
|
306
|
+
props: {
|
|
307
|
+
color: { default: "blue" },
|
|
308
|
+
styling: { default: "" },
|
|
309
|
+
size: { default: "s" },
|
|
310
|
+
name: {},
|
|
311
|
+
title: {},
|
|
312
|
+
icon: {},
|
|
313
|
+
icon2: {},
|
|
314
|
+
href: {},
|
|
315
|
+
disabled: { type: Boolean },
|
|
316
|
+
isSubmit: { type: Boolean },
|
|
317
|
+
isActive: { type: Boolean },
|
|
318
|
+
isProgress: { type: Boolean }
|
|
319
|
+
},
|
|
320
|
+
setup(a) {
|
|
321
|
+
const t = a, s = f(() => t.href ? "a" : "button"), n = f(() => t.isSubmit ? "submit" : void 0);
|
|
322
|
+
return (o, e) => (p(), M(x(s.value), {
|
|
323
|
+
class: h({
|
|
324
|
+
"top-active": o.isActive,
|
|
325
|
+
"top-disabled": o.disabled,
|
|
326
|
+
"top-forms-focusable": !o.disabled,
|
|
327
|
+
"top-button": !0,
|
|
328
|
+
"top-button-progress": o.isProgress,
|
|
329
|
+
[`top-size_${o.size}`]: !!o.size,
|
|
330
|
+
[`top-color_${o.color}`]: !0,
|
|
331
|
+
[`top-style_${o.styling}`]: !!o.styling
|
|
332
|
+
}),
|
|
333
|
+
name: o.name,
|
|
334
|
+
title: o.title,
|
|
335
|
+
href: o.href,
|
|
336
|
+
type: n.value,
|
|
337
|
+
"data-top-icon": o.icon || void 0,
|
|
338
|
+
"data-top-icon2": o.icon2 || void 0,
|
|
339
|
+
disabled: o.disabled || void 0,
|
|
340
|
+
inProgress: o.isProgress
|
|
341
|
+
}, {
|
|
342
|
+
default: B(() => [
|
|
343
|
+
o.$slots.default ? (p(), c("span", Le, [
|
|
344
|
+
_(o.$slots, "default", {}, () => [
|
|
345
|
+
ee(k(o.icon ? "" : "Button"), 1)
|
|
346
|
+
])
|
|
347
|
+
])) : v("", !0)
|
|
348
|
+
]),
|
|
349
|
+
_: 3
|
|
350
|
+
}, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
|
|
351
|
+
}
|
|
352
|
+
}), Te = "_progress_1f1nw_1", Re = {
|
|
353
|
+
"top-button": "top-button",
|
|
354
|
+
"top-active": "top-active",
|
|
355
|
+
"top-button-progress": "top-button-progress",
|
|
356
|
+
progress: Te,
|
|
357
|
+
"top-color_blue": "top-color_blue",
|
|
358
|
+
"top-color_green": "top-color_green",
|
|
359
|
+
"top-color_orange": "top-color_orange",
|
|
360
|
+
"top-color_red": "top-color_red",
|
|
361
|
+
"top-color_pink": "top-color_pink",
|
|
362
|
+
"top-color_theme": "top-color_theme",
|
|
363
|
+
"top-style_outline": "top-style_outline",
|
|
364
|
+
"top-style_soft": "top-style_soft",
|
|
365
|
+
"top-style_transparent": "top-style_transparent",
|
|
366
|
+
"top-size_l": "top-size_l",
|
|
367
|
+
"top-size_xl": "top-size_xl"
|
|
368
|
+
}, Fe = {
|
|
369
|
+
$style: Re
|
|
370
|
+
}, Pt = /* @__PURE__ */ y(Ee, [["__cssModules", Fe]]), De = { class: "top-forms-optionLabel" }, Ce = /* @__PURE__ */ g({
|
|
371
|
+
__name: "controlLabel",
|
|
372
|
+
props: {
|
|
373
|
+
description: {},
|
|
374
|
+
disabled: { type: Boolean }
|
|
375
|
+
},
|
|
376
|
+
setup(a) {
|
|
377
|
+
return (t, s) => (p(), c("div", De, [
|
|
378
|
+
w("div", {
|
|
379
|
+
class: h({
|
|
380
|
+
"top-forms-optionLabel_title": !0,
|
|
381
|
+
"top-forms-optionLabel_title-disabled": t.disabled
|
|
382
|
+
})
|
|
383
|
+
}, [
|
|
384
|
+
_(t.$slots, "default")
|
|
385
|
+
], 2),
|
|
386
|
+
t.description ? (p(), c("div", {
|
|
387
|
+
key: 0,
|
|
388
|
+
class: h(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": t.disabled }])
|
|
389
|
+
}, k(t.description), 3)) : v("", !0)
|
|
390
|
+
]));
|
|
391
|
+
}
|
|
392
|
+
}), Ae = {
|
|
393
|
+
"top-forms-optionLabel": "top-forms-optionLabel",
|
|
394
|
+
"top-forms-optionLabel_title": "top-forms-optionLabel_title",
|
|
395
|
+
"top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
|
|
396
|
+
"top-forms-optionLabel_description": "top-forms-optionLabel_description",
|
|
397
|
+
"top-forms-optionLabel_description-disabled": "top-forms-optionLabel_description-disabled"
|
|
398
|
+
}, Pe = {
|
|
399
|
+
$style: Ae
|
|
400
|
+
}, P = /* @__PURE__ */ y(Ce, [["__cssModules", Pe]]), We = ["name", "value", "indeterminate", "disabled"], Ne = /* @__PURE__ */ g({
|
|
401
|
+
__name: "checkbox",
|
|
402
|
+
props: {
|
|
403
|
+
modelValue: { type: [Boolean, Array, Set] },
|
|
404
|
+
name: {},
|
|
405
|
+
value: {},
|
|
406
|
+
description: {},
|
|
407
|
+
disabled: { type: Boolean },
|
|
408
|
+
indeterminate: { type: Boolean },
|
|
409
|
+
isError: { type: Boolean }
|
|
410
|
+
},
|
|
411
|
+
emits: ["update:modelValue"],
|
|
412
|
+
setup(a, { emit: t }) {
|
|
413
|
+
const s = a, n = t, o = f({
|
|
414
|
+
get() {
|
|
415
|
+
return s.modelValue;
|
|
416
|
+
},
|
|
417
|
+
set(e) {
|
|
418
|
+
n("update:modelValue", e);
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
return (e, r) => (p(), c("label", {
|
|
422
|
+
class: h({
|
|
423
|
+
"top-forms-optionWrapper": !0,
|
|
424
|
+
"top-checkbox": !0,
|
|
425
|
+
["top-checkbox_" + e.name]: e.name !== "",
|
|
426
|
+
"top-disabled": e.disabled,
|
|
427
|
+
"top-error": e.isError && !e.disabled
|
|
428
|
+
})
|
|
429
|
+
}, [
|
|
430
|
+
S(w("input", {
|
|
431
|
+
type: "checkbox",
|
|
432
|
+
class: h({
|
|
433
|
+
"top-forms-focusable": !e.disabled,
|
|
434
|
+
"top-forms-option": !0,
|
|
435
|
+
"top-checkbox_input": !0,
|
|
436
|
+
"top-error": e.isError && !e.disabled
|
|
437
|
+
}),
|
|
438
|
+
name: e.name,
|
|
439
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
440
|
+
value: e.value,
|
|
441
|
+
indeterminate: e.indeterminate,
|
|
442
|
+
disabled: e.disabled
|
|
443
|
+
}, null, 10, We), [
|
|
444
|
+
[X, o.value]
|
|
445
|
+
]),
|
|
446
|
+
e.$slots.default ? (p(), M(P, {
|
|
447
|
+
key: 0,
|
|
448
|
+
description: e.description,
|
|
449
|
+
disabled: e.disabled
|
|
450
|
+
}, {
|
|
451
|
+
default: B(() => [
|
|
452
|
+
_(e.$slots, "default")
|
|
453
|
+
]),
|
|
454
|
+
_: 3
|
|
455
|
+
}, 8, ["description", "disabled"])) : v("", !0)
|
|
456
|
+
], 2));
|
|
457
|
+
}
|
|
458
|
+
}), Oe = {
|
|
459
|
+
"top-checkbox": "top-checkbox",
|
|
460
|
+
"top-checkbox_input": "top-checkbox_input",
|
|
461
|
+
"top-error": "top-error"
|
|
462
|
+
}, He = {
|
|
463
|
+
$style: Oe
|
|
464
|
+
}, Wt = /* @__PURE__ */ y(Ne, [["__cssModules", He]]), Ie = ["title"], Ue = /* @__PURE__ */ g({
|
|
465
|
+
__name: "hint",
|
|
466
|
+
props: {
|
|
467
|
+
hint: {}
|
|
468
|
+
},
|
|
469
|
+
setup(a) {
|
|
470
|
+
return (t, s) => (p(), c("span", {
|
|
471
|
+
class: "top-hint",
|
|
472
|
+
"data-top-icon": "",
|
|
473
|
+
title: t.hint
|
|
474
|
+
}, null, 8, Ie));
|
|
475
|
+
}
|
|
476
|
+
}), je = {
|
|
477
|
+
"top-hint": "top-hint"
|
|
478
|
+
}, Ye = {
|
|
479
|
+
$style: je
|
|
480
|
+
}, Ge = /* @__PURE__ */ y(Ue, [["__cssModules", Ye]]), Ke = ["data-top-icon", "data-top-icon2"], Qe = ["name", "title", "placeholder", "disabled", "readonly"], Xe = {
|
|
481
|
+
key: 1,
|
|
482
|
+
class: "top-formsCaption"
|
|
483
|
+
}, qe = /* @__PURE__ */ g({
|
|
484
|
+
inheritAttrs: !1,
|
|
485
|
+
__name: "input",
|
|
486
|
+
props: {
|
|
487
|
+
modelValue: {},
|
|
488
|
+
name: {},
|
|
489
|
+
disabled: { type: Boolean },
|
|
490
|
+
readonly: { type: Boolean },
|
|
491
|
+
title: {},
|
|
492
|
+
captionType: { default: "" },
|
|
493
|
+
size: { default: "s" },
|
|
494
|
+
icon: {},
|
|
495
|
+
icon2: {},
|
|
496
|
+
addCleaner: { type: Boolean },
|
|
497
|
+
isError: { type: Boolean },
|
|
498
|
+
modificator: {}
|
|
499
|
+
},
|
|
500
|
+
emits: ["update:modelValue"],
|
|
501
|
+
setup(a, { emit: t }) {
|
|
502
|
+
const s = a, n = t, o = f({
|
|
503
|
+
get() {
|
|
504
|
+
return s.modelValue;
|
|
505
|
+
},
|
|
506
|
+
set(l) {
|
|
507
|
+
n("update:modelValue", l);
|
|
508
|
+
}
|
|
509
|
+
}), e = f(() => s.addCleaner && !s.title || s.captionType !== "" ? "" : s.title), r = () => {
|
|
510
|
+
n("update:modelValue", "");
|
|
511
|
+
};
|
|
512
|
+
return (l, i) => (p(), c("label", {
|
|
513
|
+
class: h({
|
|
514
|
+
"top-input": !0,
|
|
515
|
+
["top-size_" + l.size]: !0,
|
|
516
|
+
"top-disabled": l.disabled,
|
|
517
|
+
["top-input-" + l.modificator]: !!l.modificator,
|
|
518
|
+
"top-input-withCleaner": l.addCleaner && o.value && o.value !== "0000-00-00",
|
|
519
|
+
"top-formsCaptionWrapper": l.captionType !== "",
|
|
520
|
+
"top-formsCaptionWrapper-always": l.captionType === "top"
|
|
521
|
+
}),
|
|
522
|
+
"data-top-icon": l.icon,
|
|
523
|
+
"data-top-icon2": l.icon2
|
|
524
|
+
}, [
|
|
525
|
+
S(w("input", T({
|
|
526
|
+
type: "text",
|
|
527
|
+
class: {
|
|
528
|
+
"top-input_input": !0,
|
|
529
|
+
["top-input_input-" + l.modificator]: !!l.modificator,
|
|
530
|
+
"top-forms-focusable": !l.disabled,
|
|
531
|
+
"top-error": l.isError
|
|
532
|
+
},
|
|
533
|
+
autocomplete: "off_always",
|
|
534
|
+
name: l.name,
|
|
535
|
+
"onUpdate:modelValue": i[0] || (i[0] = (b) => o.value = b),
|
|
536
|
+
title: l.title,
|
|
537
|
+
placeholder: e.value,
|
|
538
|
+
disabled: l.disabled,
|
|
539
|
+
readonly: l.readonly,
|
|
540
|
+
onKeydown: i[1] || (i[1] = te(N(() => (l.addCleaner || !!l.$slots.btn) && r(), ["stop"]), ["esc"]))
|
|
541
|
+
}, l.$attrs), null, 16, Qe), [
|
|
542
|
+
[q, o.value]
|
|
543
|
+
]),
|
|
544
|
+
l.addCleaner && o.value && o.value !== "0000-00-00" ? (p(), c("span", {
|
|
545
|
+
key: 0,
|
|
546
|
+
class: "top-input_cleaner",
|
|
547
|
+
"data-top-icon": "",
|
|
548
|
+
onClick: N(r, ["prevent"])
|
|
549
|
+
})) : v("", !0),
|
|
550
|
+
l.captionType !== "" ? (p(), c("span", Xe, k(l.title), 1)) : v("", !0),
|
|
551
|
+
_(l.$slots, "default")
|
|
552
|
+
], 10, Ke));
|
|
553
|
+
}
|
|
554
|
+
}), Je = {
|
|
555
|
+
"top-input": "top-input",
|
|
556
|
+
"top-input_input": "top-input_input",
|
|
557
|
+
"top-input-withCleaner": "top-input-withCleaner",
|
|
558
|
+
"top-input_cleaner": "top-input_cleaner"
|
|
559
|
+
}, Ze = {
|
|
560
|
+
$style: Je
|
|
561
|
+
}, j = /* @__PURE__ */ y(qe, [["__cssModules", Ze]]), xe = ["modelValue"], et = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
|
|
562
|
+
let Y = (a) => {
|
|
563
|
+
};
|
|
564
|
+
const tt = /* @__PURE__ */ g({
|
|
565
|
+
__name: "inputDate",
|
|
566
|
+
props: {
|
|
567
|
+
modelValue: {},
|
|
568
|
+
name: {},
|
|
569
|
+
disabled: { type: Boolean },
|
|
570
|
+
readonly: { type: Boolean },
|
|
571
|
+
title: {},
|
|
572
|
+
captionType: {},
|
|
573
|
+
size: {},
|
|
574
|
+
icon: {},
|
|
575
|
+
icon2: { default: "" },
|
|
576
|
+
addCleaner: { type: Boolean },
|
|
577
|
+
isError: { type: Boolean },
|
|
578
|
+
modificator: {}
|
|
579
|
+
},
|
|
580
|
+
emits: ["update:modelValue"],
|
|
581
|
+
setup(a, { emit: t }) {
|
|
582
|
+
const s = a, n = t;
|
|
583
|
+
oe(() => {
|
|
584
|
+
e && e.datepicker("destroy");
|
|
585
|
+
});
|
|
586
|
+
const o = ae();
|
|
587
|
+
let e;
|
|
588
|
+
const r = f({
|
|
589
|
+
get() {
|
|
590
|
+
return R(s.modelValue, 2, "0000-00-00");
|
|
591
|
+
},
|
|
592
|
+
set(u) {
|
|
593
|
+
u = U(u, "0000-00-00"), n("update:modelValue", u);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
596
|
+
let l = (u) => {
|
|
597
|
+
Y(u);
|
|
598
|
+
}, i = (u) => {
|
|
599
|
+
const m = U(u.target.value), $ = R(m);
|
|
600
|
+
if (!$ || $ === d.L.Not_date || u.target.value !== $) {
|
|
601
|
+
u.target.value = r.value;
|
|
602
|
+
return;
|
|
603
|
+
}
|
|
604
|
+
r.value = u.target.value;
|
|
605
|
+
};
|
|
606
|
+
async function b(u) {
|
|
607
|
+
const m = await import("./datepicker-78c2af5a.es.js");
|
|
608
|
+
Y = m.oninput, e = m.connectDatepicker(u.target, {
|
|
609
|
+
onSelect: () => i(u)
|
|
610
|
+
}), e && e.datepicker("show");
|
|
611
|
+
}
|
|
612
|
+
return (u, m) => V(et) ? (p(), M(V(j), T({ key: 0 }, u.$props, {
|
|
613
|
+
modelValue: r.value,
|
|
614
|
+
readonly: "",
|
|
615
|
+
onClick: m[1] || (m[1] = ($) => o.value.showPicker())
|
|
616
|
+
}), {
|
|
617
|
+
default: B(() => [
|
|
618
|
+
w("input", {
|
|
619
|
+
ref_key: "el",
|
|
620
|
+
ref: o,
|
|
621
|
+
type: "date",
|
|
622
|
+
class: "top-input_input-date",
|
|
623
|
+
modelValue: u.modelValue,
|
|
624
|
+
onChange: m[0] || (m[0] = ($) => r.value = $.target.value),
|
|
625
|
+
tabindex: "-1"
|
|
626
|
+
}, null, 40, xe)
|
|
627
|
+
]),
|
|
628
|
+
_: 1
|
|
629
|
+
}, 16, ["modelValue"])) : (p(), M(V(j), T({ key: 1 }, u.$props, {
|
|
630
|
+
modelValue: r.value,
|
|
631
|
+
"onUpdate:modelValue": m[2] || (m[2] = ($) => $ === "" ? r.value = "" : ""),
|
|
632
|
+
onInput: V(l),
|
|
633
|
+
onFocusOnce: b,
|
|
634
|
+
onChange: V(i),
|
|
635
|
+
modificator: "datepicker"
|
|
636
|
+
}), null, 16, ["modelValue", "onInput", "onChange"]));
|
|
637
|
+
}
|
|
638
|
+
}), ot = {
|
|
639
|
+
"top-input-datepicker": "top-input-datepicker",
|
|
640
|
+
"top-input_input-date": "top-input_input-date"
|
|
641
|
+
}, at = {
|
|
642
|
+
$style: ot
|
|
643
|
+
}, Nt = /* @__PURE__ */ y(tt, [["__cssModules", at]]), st = { class: "top-inputRange" }, nt = /* @__PURE__ */ w("span", { class: "top-inputRange_dash" }, " — ", -1), it = /* @__PURE__ */ g({
|
|
644
|
+
__name: "inputRange",
|
|
645
|
+
setup(a) {
|
|
646
|
+
return (t, s) => (p(), c("div", st, [
|
|
647
|
+
_(t.$slots, "from"),
|
|
648
|
+
nt,
|
|
649
|
+
_(t.$slots, "to")
|
|
650
|
+
]));
|
|
651
|
+
}
|
|
652
|
+
}), lt = {
|
|
653
|
+
"top-inputRange": "top-inputRange",
|
|
654
|
+
"top-inputRange_dash": "top-inputRange_dash",
|
|
655
|
+
"top-input": "top-input"
|
|
656
|
+
}, rt = {
|
|
657
|
+
$style: lt
|
|
658
|
+
}, Ot = /* @__PURE__ */ y(it, [["__cssModules", rt]]), dt = ["name", "value", "disabled"], pt = /* @__PURE__ */ g({
|
|
659
|
+
__name: "radio",
|
|
660
|
+
props: {
|
|
661
|
+
modelValue: {},
|
|
662
|
+
value: {},
|
|
663
|
+
name: {},
|
|
664
|
+
description: {},
|
|
665
|
+
disabled: { type: Boolean },
|
|
666
|
+
isError: { type: Boolean }
|
|
667
|
+
},
|
|
668
|
+
emits: ["update:modelValue"],
|
|
669
|
+
setup(a, { emit: t }) {
|
|
670
|
+
const s = a, n = t, o = f({
|
|
671
|
+
get() {
|
|
672
|
+
return s.modelValue;
|
|
673
|
+
},
|
|
674
|
+
set(e) {
|
|
675
|
+
n("update:modelValue", e);
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
return (e, r) => (p(), c("label", {
|
|
679
|
+
class: h({
|
|
680
|
+
"top-forms-optionWrapper": !0,
|
|
681
|
+
"top-radio": !0,
|
|
682
|
+
["top-radio_" + e.name]: e.name !== "",
|
|
683
|
+
"top-disabled": e.disabled,
|
|
684
|
+
"top-error": e.isError && !e.disabled
|
|
685
|
+
})
|
|
686
|
+
}, [
|
|
687
|
+
S(w("input", {
|
|
688
|
+
type: "radio",
|
|
689
|
+
class: h({
|
|
690
|
+
"top-forms-focusable": !e.disabled,
|
|
691
|
+
"top-forms-option": !0,
|
|
692
|
+
"top-radio_input": !0,
|
|
693
|
+
"top-error": e.isError && !e.disabled
|
|
694
|
+
}),
|
|
695
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
696
|
+
name: e.name,
|
|
697
|
+
value: e.value,
|
|
698
|
+
disabled: e.disabled
|
|
699
|
+
}, null, 10, dt), [
|
|
700
|
+
[se, o.value]
|
|
701
|
+
]),
|
|
702
|
+
e.$slots.default ? (p(), M(P, {
|
|
703
|
+
key: 0,
|
|
704
|
+
description: e.description,
|
|
705
|
+
disabled: e.disabled
|
|
706
|
+
}, {
|
|
707
|
+
default: B(() => [
|
|
708
|
+
_(e.$slots, "default")
|
|
709
|
+
]),
|
|
710
|
+
_: 3
|
|
711
|
+
}, 8, ["description", "disabled"])) : v("", !0)
|
|
712
|
+
], 2));
|
|
713
|
+
}
|
|
714
|
+
}), ut = {
|
|
715
|
+
"top-radio": "top-radio",
|
|
716
|
+
"top-radio_input": "top-radio_input",
|
|
717
|
+
"top-error": "top-error"
|
|
718
|
+
}, ct = {
|
|
719
|
+
$style: ut
|
|
720
|
+
}, Ht = /* @__PURE__ */ y(pt, [["__cssModules", ct]]), mt = ["name", "value", "disabled"], bt = /* @__PURE__ */ g({
|
|
721
|
+
__name: "switcher",
|
|
722
|
+
props: {
|
|
723
|
+
modelValue: { type: [Boolean, Array, Set] },
|
|
724
|
+
name: {},
|
|
725
|
+
value: {},
|
|
726
|
+
description: {},
|
|
727
|
+
disabled: { type: Boolean },
|
|
728
|
+
isError: { type: Boolean }
|
|
729
|
+
},
|
|
730
|
+
emits: ["update:modelValue"],
|
|
731
|
+
setup(a, { emit: t }) {
|
|
732
|
+
const s = a, n = t, o = f({
|
|
733
|
+
get() {
|
|
734
|
+
return s.modelValue;
|
|
735
|
+
},
|
|
736
|
+
set(e) {
|
|
737
|
+
n("update:modelValue", e);
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
return (e, r) => (p(), c("label", {
|
|
741
|
+
class: h({
|
|
742
|
+
"top-forms-optionWrapper": !0,
|
|
743
|
+
"top-checkboxSwitcher": !0,
|
|
744
|
+
"top-disabled": e.disabled,
|
|
745
|
+
"top-error": e.isError && !e.disabled
|
|
746
|
+
})
|
|
747
|
+
}, [
|
|
748
|
+
S(w("input", {
|
|
749
|
+
type: "checkbox",
|
|
750
|
+
class: h({
|
|
751
|
+
"top-forms-focusable": !e.disabled,
|
|
752
|
+
"top-forms-option": !0,
|
|
753
|
+
"top-checkboxSwitcher_input": !0,
|
|
754
|
+
"top-error": e.isError && !e.disabled
|
|
755
|
+
}),
|
|
756
|
+
"onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
|
|
757
|
+
name: e.name,
|
|
758
|
+
value: e.value,
|
|
759
|
+
disabled: e.disabled
|
|
760
|
+
}, null, 10, mt), [
|
|
761
|
+
[X, o.value]
|
|
762
|
+
]),
|
|
763
|
+
e.$slots.default ? (p(), M(P, {
|
|
764
|
+
key: 0,
|
|
765
|
+
description: e.description,
|
|
766
|
+
disabled: e.disabled
|
|
767
|
+
}, {
|
|
768
|
+
default: B(() => [
|
|
769
|
+
_(e.$slots, "default")
|
|
770
|
+
]),
|
|
771
|
+
_: 3
|
|
772
|
+
}, 8, ["description", "disabled"])) : v("", !0)
|
|
773
|
+
], 2));
|
|
774
|
+
}
|
|
775
|
+
}), ft = {
|
|
776
|
+
"top-checkboxSwitcher": "top-checkboxSwitcher",
|
|
777
|
+
"top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
|
|
778
|
+
"top-error": "top-error"
|
|
779
|
+
}, ht = {
|
|
780
|
+
$style: ft
|
|
781
|
+
}, It = /* @__PURE__ */ y(bt, [["__cssModules", ht]]), vt = ["name", "placeholder", "disabled", "readonly", "rows"], gt = {
|
|
782
|
+
key: 0,
|
|
783
|
+
class: "top-textarea_pseudoContent"
|
|
784
|
+
}, yt = /* @__PURE__ */ g({
|
|
785
|
+
inheritAttrs: !1,
|
|
786
|
+
__name: "textarea",
|
|
787
|
+
props: {
|
|
788
|
+
modelValue: {},
|
|
789
|
+
name: {},
|
|
790
|
+
placeholder: {},
|
|
791
|
+
rows: { default: 5 },
|
|
792
|
+
minHeight: { default: 120 },
|
|
793
|
+
expandable: { type: Boolean },
|
|
794
|
+
disabled: { type: Boolean },
|
|
795
|
+
readonly: { type: Boolean },
|
|
796
|
+
isError: { type: Boolean },
|
|
797
|
+
hint: {}
|
|
798
|
+
},
|
|
799
|
+
emits: ["update:modelValue"],
|
|
800
|
+
setup(a, { emit: t }) {
|
|
801
|
+
Q((e) => ({
|
|
802
|
+
c838a038: e.minHeight + "px"
|
|
803
|
+
}));
|
|
804
|
+
const s = a, n = t, o = f({
|
|
805
|
+
get() {
|
|
806
|
+
return s.modelValue;
|
|
807
|
+
},
|
|
808
|
+
set(e) {
|
|
809
|
+
n("update:modelValue", e);
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
return (e, r) => {
|
|
813
|
+
const l = ne("top-tooltip");
|
|
814
|
+
return p(), c("label", {
|
|
815
|
+
class: h({
|
|
816
|
+
"top-textarea": !0,
|
|
817
|
+
["top-textarea-" + e.name]: e.name,
|
|
818
|
+
"top-disabled": e.disabled
|
|
819
|
+
})
|
|
820
|
+
}, [
|
|
821
|
+
S(w("textarea", T({
|
|
822
|
+
type: "text",
|
|
823
|
+
class: {
|
|
824
|
+
"top-forms-focusable": !e.disabled,
|
|
825
|
+
"top-textarea_textarea": !0,
|
|
826
|
+
"top-textarea_textarea-expandable": e.expandable,
|
|
827
|
+
"top-error": e.isError
|
|
828
|
+
},
|
|
829
|
+
autocomplete: "off_always",
|
|
830
|
+
name: e.name,
|
|
831
|
+
placeholder: e.placeholder,
|
|
832
|
+
disabled: e.disabled,
|
|
833
|
+
readonly: e.readonly,
|
|
834
|
+
rows: e.expandable ? void 0 : e.rows
|
|
835
|
+
}, e.$attrs, {
|
|
836
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => o.value = i)
|
|
837
|
+
}), null, 16, vt), [
|
|
838
|
+
[q, o.value]
|
|
839
|
+
]),
|
|
840
|
+
e.expandable ? (p(), c("div", gt, k(o.value + " "), 1)) : v("", !0),
|
|
841
|
+
e.hint ? S((p(), M(Ge, {
|
|
842
|
+
key: 1,
|
|
843
|
+
class: "top-textarea_hint",
|
|
844
|
+
hint: e.hint
|
|
845
|
+
}, null, 8, ["hint"])), [
|
|
846
|
+
[l]
|
|
847
|
+
]) : v("", !0)
|
|
848
|
+
], 2);
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
}), wt = {
|
|
852
|
+
"top-textarea": "top-textarea",
|
|
853
|
+
"top-textarea_textarea": "top-textarea_textarea",
|
|
854
|
+
"top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
|
|
855
|
+
"top-textarea_pseudoContent": "top-textarea_pseudoContent",
|
|
856
|
+
"top-textarea_hint": "top-textarea_hint"
|
|
857
|
+
}, $t = {
|
|
858
|
+
$style: wt
|
|
859
|
+
}, Ut = /* @__PURE__ */ y(yt, [["__cssModules", $t]]), _t = ["data-value", "data-top-icon", "data-top-icon2"], kt = ["name", "disabled"], Mt = ["label", "disabled"], St = ["value", "selected", "disabled"], Vt = ["value", "selected", "disabled"], Bt = {
|
|
860
|
+
key: 1,
|
|
861
|
+
class: "top-formsCaption"
|
|
862
|
+
}, zt = /* @__PURE__ */ g({
|
|
863
|
+
__name: "select",
|
|
864
|
+
props: {
|
|
865
|
+
modelValue: {},
|
|
866
|
+
options: {},
|
|
867
|
+
name: {},
|
|
868
|
+
disabled: { type: Boolean },
|
|
869
|
+
icon: {},
|
|
870
|
+
size: { default: "s" },
|
|
871
|
+
addChanger: { type: Boolean },
|
|
872
|
+
title: {},
|
|
873
|
+
isError: { type: Boolean }
|
|
874
|
+
},
|
|
875
|
+
emits: ["update:modelValue"],
|
|
876
|
+
setup(a, { emit: t }) {
|
|
877
|
+
const s = a, n = t, o = f({
|
|
878
|
+
get() {
|
|
879
|
+
return s.modelValue;
|
|
880
|
+
},
|
|
881
|
+
set(i) {
|
|
882
|
+
n("update:modelValue", i);
|
|
883
|
+
}
|
|
884
|
+
}), e = f(() => {
|
|
885
|
+
var i;
|
|
886
|
+
return (i = r.value.get(o.value)) == null ? void 0 : i.icon;
|
|
887
|
+
}), r = f(() => {
|
|
888
|
+
const i = /* @__PURE__ */ new Map();
|
|
889
|
+
return s.options.forEach((b) => {
|
|
890
|
+
if (!b.disabled) {
|
|
891
|
+
if (b.children) {
|
|
892
|
+
b.children.forEach((u) => {
|
|
893
|
+
u.disabled || i.set(u.value, u);
|
|
894
|
+
});
|
|
895
|
+
return;
|
|
896
|
+
}
|
|
897
|
+
i.set(b.value, b);
|
|
898
|
+
}
|
|
899
|
+
}), i;
|
|
900
|
+
});
|
|
901
|
+
ie([
|
|
902
|
+
le(s.modelValue),
|
|
903
|
+
r
|
|
904
|
+
], () => {
|
|
905
|
+
(o.value === null || o.value === void 0) && r.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), o.value = r.value.keys().next().value);
|
|
906
|
+
}, { immediate: !0 });
|
|
907
|
+
const l = () => {
|
|
908
|
+
const i = [...r.value.keys()], u = (i.indexOf(o.value) + 1) % i.length;
|
|
909
|
+
o.value = i[u];
|
|
910
|
+
};
|
|
911
|
+
return (i, b) => (p(), c("label", {
|
|
912
|
+
class: h({
|
|
913
|
+
"top-select": !0,
|
|
914
|
+
["top-select-" + i.name]: i.name,
|
|
915
|
+
["top-size_" + i.size]: !0,
|
|
916
|
+
"top-formsCaptionWrapper": !!i.title,
|
|
917
|
+
"top-select-error": i.isError,
|
|
918
|
+
"top-disabled": i.disabled
|
|
919
|
+
}),
|
|
920
|
+
"data-value": o.value,
|
|
921
|
+
"data-top-icon": i.icon,
|
|
922
|
+
"data-top-icon2": e.value
|
|
923
|
+
}, [
|
|
924
|
+
S(w("select", {
|
|
925
|
+
class: h({
|
|
926
|
+
"top-forms-focusable": !i.disabled,
|
|
927
|
+
"top-select_select": !0,
|
|
928
|
+
"top-select_arrow": !0,
|
|
929
|
+
"top-error": i.isError
|
|
930
|
+
}),
|
|
931
|
+
name: i.name,
|
|
932
|
+
disabled: i.disabled,
|
|
933
|
+
"onUpdate:modelValue": b[0] || (b[0] = (u) => o.value = u)
|
|
934
|
+
}, [
|
|
935
|
+
(p(!0), c(F, null, O(i.options.entries(), ([u, m]) => (p(), c(F, null, [
|
|
936
|
+
m.children ? (p(), c("optgroup", {
|
|
937
|
+
key: "group_" + m.value,
|
|
938
|
+
label: m.title,
|
|
939
|
+
disabled: m.disabled
|
|
940
|
+
}, [
|
|
941
|
+
(p(!0), c(F, null, O(m.children.entries(), ([$, z]) => (p(), c("option", {
|
|
942
|
+
key: m.value,
|
|
943
|
+
value: z.value,
|
|
944
|
+
selected: z.value === o.value,
|
|
945
|
+
disabled: z.disabled
|
|
946
|
+
}, k(z.title), 9, St))), 128))
|
|
947
|
+
], 8, Mt)) : (p(), c("option", {
|
|
948
|
+
key: m.value,
|
|
949
|
+
value: m.value,
|
|
950
|
+
selected: m.value === o.value,
|
|
951
|
+
disabled: m.disabled
|
|
952
|
+
}, k(m.title), 9, Vt))
|
|
953
|
+
], 64))), 256))
|
|
954
|
+
], 10, kt), [
|
|
955
|
+
[re, o.value]
|
|
956
|
+
]),
|
|
957
|
+
i.addChanger && r.value.size && !i.disabled ? (p(), c("span", {
|
|
958
|
+
key: 0,
|
|
959
|
+
class: "top-changer",
|
|
960
|
+
onClick: l
|
|
961
|
+
})) : v("", !0),
|
|
962
|
+
i.title ? (p(), c("span", Bt, k(i.title), 1)) : v("", !0)
|
|
963
|
+
], 10, _t));
|
|
964
|
+
}
|
|
965
|
+
}), Lt = {
|
|
966
|
+
"top-select": "top-select",
|
|
967
|
+
"top-select-error": "top-select-error",
|
|
968
|
+
"top-select_select": "top-select_select",
|
|
969
|
+
"top-changer": "top-changer"
|
|
970
|
+
}, Et = {
|
|
971
|
+
$style: Lt
|
|
972
|
+
}, jt = /* @__PURE__ */ y(zt, [["__cssModules", Et]]);
|
|
973
|
+
export {
|
|
974
|
+
Pt as B,
|
|
975
|
+
d as C,
|
|
976
|
+
ge as E,
|
|
977
|
+
Ge as H,
|
|
978
|
+
j as I,
|
|
979
|
+
Ut as T,
|
|
980
|
+
y as _,
|
|
981
|
+
pe as a,
|
|
982
|
+
ue as b,
|
|
983
|
+
ce as c,
|
|
984
|
+
R as d,
|
|
985
|
+
Ft as e,
|
|
986
|
+
_e as f,
|
|
987
|
+
Dt as g,
|
|
988
|
+
U as h,
|
|
989
|
+
de as i,
|
|
990
|
+
At as j,
|
|
991
|
+
Wt as k,
|
|
992
|
+
P as l,
|
|
993
|
+
Nt as m,
|
|
994
|
+
Ot as n,
|
|
995
|
+
It as o,
|
|
996
|
+
jt as p,
|
|
997
|
+
Ht as r,
|
|
998
|
+
Ct as s
|
|
999
|
+
};
|
|
1000
|
+
//# sourceMappingURL=forms-9516aa6c.es.js.map
|