@topvisor/ui 0.0.16 → 0.0.18
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/core-96a4bfb4.amd.js +2 -0
- package/.chunks/core-96a4bfb4.amd.js.map +1 -0
- package/.chunks/{core-c3afa109.es.js → core-fd9de702.es.js} +44 -44
- package/.chunks/core-fd9de702.es.js.map +1 -0
- package/.chunks/forms-1dc7c6f3.amd.js +3 -0
- package/.chunks/forms-1dc7c6f3.amd.js.map +1 -0
- package/.chunks/forms-3575c189.es.js +461 -0
- package/.chunks/forms-3575c189.es.js.map +1 -0
- package/.chunks/popup-b891abb1.amd.js +342 -0
- package/.chunks/popup-b891abb1.amd.js.map +1 -0
- package/.chunks/popup-dd9546aa.es.js +702 -0
- package/.chunks/popup-dd9546aa.es.js.map +1 -0
- package/README.md +62 -62
- package/common/common.amd.js +1 -1
- package/common/common.js +1 -17
- package/common/common.js.map +1 -1
- package/core/core.amd.js +1 -1
- package/core/core.js +1 -1
- package/core.css +1 -1
- package/editArea/editArea.amd.js +2 -2
- package/editArea/editArea.amd.js.map +1 -1
- package/editArea/editArea.js +16 -16
- package/editArea/editArea.js.map +1 -1
- package/editArea.css +1 -1
- package/forms/forms.amd.js +1 -1
- package/forms/forms.js +1 -1
- package/forms/helpers.amd.js +1 -1
- package/forms/helpers.amd.js.map +1 -1
- package/forms/helpers.js +6 -3
- package/forms/helpers.js.map +1 -1
- package/forms.css +1 -1
- package/icomoon/demo-files/demo.css +161 -161
- package/icomoon/demo-files/demo.js +30 -30
- package/icomoon/demo.html +2945 -2931
- package/icomoon/fonts/Topvisor-2.svg +232 -231
- package/icomoon/fonts/Topvisor-2.ttf +0 -0
- package/icomoon/fonts/Topvisor-2.woff +0 -0
- package/icomoon/selection.json +1 -1
- package/icomoon/style.css +647 -644
- package/package.json +19 -19
- package/popup/popup.amd.js +2 -2
- package/popup/popup.amd.js.map +1 -1
- package/popup/popup.js +67 -68
- 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 +18 -21
- package/popup/worker.js.map +1 -1
- package/tabs/tabs.amd.js +3 -0
- package/tabs/tabs.amd.js.map +1 -0
- package/tabs/tabs.js +97 -0
- package/tabs/tabs.js.map +1 -0
- package/tabs.css +1 -0
- package/utils/device.amd.js.map +1 -1
- package/utils/device.js.map +1 -1
- package/utils/dom.amd.js.map +1 -1
- package/utils/dom.js.map +1 -1
- package/.chunks/core-97b070be.amd.js +0 -2
- package/.chunks/core-97b070be.amd.js.map +0 -1
- package/.chunks/core-c3afa109.es.js.map +0 -1
- package/.chunks/forms-6a6b0b80.es.js +0 -436
- package/.chunks/forms-6a6b0b80.es.js.map +0 -1
- package/.chunks/forms-7119886a.amd.js +0 -3
- package/.chunks/forms-7119886a.amd.js.map +0 -1
- package/.chunks/popup-6d1d8097.amd.js +0 -342
- package/.chunks/popup-6d1d8097.amd.js.map +0 -1
- package/.chunks/popup-95d27020.es.js +0 -720
- package/.chunks/popup-95d27020.es.js.map +0 -1
- package/icomoon/demo-files/Read Me.txt +0 -7
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import { defineComponent as c, computed as u, openBlock as r, createBlock as v, resolveDynamicComponent as B, normalizeClass as i, withCtx as w, renderSlot as _, createTextVNode as C, toDisplayString as f, createElementBlock as p, useCssVars as M, resolveDirective as E, withDirectives as y, createElementVNode as h, mergeProps as L, vModelText as k, createCommentVNode as d, vModelCheckbox as V, withKeys as z, vModelRadio as S } from "vue";
|
|
2
|
+
const T = /* @__PURE__ */ c({
|
|
3
|
+
__name: "button",
|
|
4
|
+
props: {
|
|
5
|
+
color: { default: "blue" },
|
|
6
|
+
styling: { default: "" },
|
|
7
|
+
size: { default: "s" },
|
|
8
|
+
name: {},
|
|
9
|
+
title: {},
|
|
10
|
+
icon: {},
|
|
11
|
+
icon2: {},
|
|
12
|
+
href: {},
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
isSubmit: { type: Boolean },
|
|
15
|
+
isActive: { type: Boolean },
|
|
16
|
+
isProgress: { type: Boolean }
|
|
17
|
+
},
|
|
18
|
+
setup(l) {
|
|
19
|
+
const t = l, a = u(() => t.href ? "a" : "button"), s = u(() => t.isSubmit ? "submit" : void 0);
|
|
20
|
+
return (e, n) => (r(), v(B(a.value), {
|
|
21
|
+
class: i({
|
|
22
|
+
"top-active": e.isActive,
|
|
23
|
+
"top-disabled": e.disabled,
|
|
24
|
+
"top-forms-focusable": !e.disabled,
|
|
25
|
+
"top-button": !0,
|
|
26
|
+
"top-button-progress": e.isProgress,
|
|
27
|
+
[`top-size_${e.size}`]: !!e.size,
|
|
28
|
+
[`top-color_${e.color}`]: !0,
|
|
29
|
+
[`top-style_${e.styling}`]: !!e.styling
|
|
30
|
+
}),
|
|
31
|
+
name: e.name,
|
|
32
|
+
title: e.title,
|
|
33
|
+
href: e.href,
|
|
34
|
+
type: s.value,
|
|
35
|
+
"data-top-icon": e.icon || void 0,
|
|
36
|
+
"data-top-icon2": e.icon2 || void 0,
|
|
37
|
+
disabled: e.disabled || void 0,
|
|
38
|
+
inProgress: e.isProgress
|
|
39
|
+
}, {
|
|
40
|
+
default: w(() => [
|
|
41
|
+
_(e.$slots, "default", {}, () => [
|
|
42
|
+
C(f(e.icon ? "" : "Button"), 1)
|
|
43
|
+
])
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
|
|
47
|
+
}
|
|
48
|
+
}), P = "_progress_1f1nw_1", A = {
|
|
49
|
+
"top-button": "top-button",
|
|
50
|
+
"top-active": "top-active",
|
|
51
|
+
"top-button-progress": "top-button-progress",
|
|
52
|
+
progress: P,
|
|
53
|
+
"top-color_blue": "top-color_blue",
|
|
54
|
+
"top-color_green": "top-color_green",
|
|
55
|
+
"top-color_orange": "top-color_orange",
|
|
56
|
+
"top-color_red": "top-color_red",
|
|
57
|
+
"top-color_pink": "top-color_pink",
|
|
58
|
+
"top-color_theme": "top-color_theme",
|
|
59
|
+
"top-style_outline": "top-style_outline",
|
|
60
|
+
"top-style_soft": "top-style_soft",
|
|
61
|
+
"top-style_transparent": "top-style_transparent",
|
|
62
|
+
"top-size_l": "top-size_l",
|
|
63
|
+
"top-size_xl": "top-size_xl"
|
|
64
|
+
}, m = (l, t) => {
|
|
65
|
+
const a = l.__vccOpts || l;
|
|
66
|
+
for (const [s, e] of t)
|
|
67
|
+
a[s] = e;
|
|
68
|
+
return a;
|
|
69
|
+
}, U = {
|
|
70
|
+
$style: A
|
|
71
|
+
}, he = /* @__PURE__ */ m(T, [["__cssModules", U]]), W = ["title"], D = /* @__PURE__ */ c({
|
|
72
|
+
__name: "hint",
|
|
73
|
+
props: {
|
|
74
|
+
hint: {}
|
|
75
|
+
},
|
|
76
|
+
setup(l) {
|
|
77
|
+
return (t, a) => (r(), p("span", {
|
|
78
|
+
class: "top-hint",
|
|
79
|
+
"data-top-icon": "",
|
|
80
|
+
title: t.hint
|
|
81
|
+
}, null, 8, W));
|
|
82
|
+
}
|
|
83
|
+
}), H = {
|
|
84
|
+
"top-hint": "top-hint"
|
|
85
|
+
}, N = {
|
|
86
|
+
$style: H
|
|
87
|
+
}, K = /* @__PURE__ */ m(D, [["__cssModules", N]]), O = ["name", "placeholder", "disabled", "readonly", "rows"], R = {
|
|
88
|
+
key: 0,
|
|
89
|
+
class: "top-textarea_pseudoContent"
|
|
90
|
+
}, j = /* @__PURE__ */ c({
|
|
91
|
+
inheritAttrs: !1,
|
|
92
|
+
__name: "textarea",
|
|
93
|
+
props: {
|
|
94
|
+
modelValue: {},
|
|
95
|
+
name: {},
|
|
96
|
+
placeholder: {},
|
|
97
|
+
rows: { default: 5 },
|
|
98
|
+
minHeight: { default: 120 },
|
|
99
|
+
expandable: { type: Boolean },
|
|
100
|
+
disabled: { type: Boolean },
|
|
101
|
+
readonly: { type: Boolean },
|
|
102
|
+
isError: { type: Boolean },
|
|
103
|
+
hint: {}
|
|
104
|
+
},
|
|
105
|
+
emits: ["update:modelValue"],
|
|
106
|
+
setup(l, { emit: t }) {
|
|
107
|
+
const a = l;
|
|
108
|
+
M((e) => ({
|
|
109
|
+
"17d63e56": e.minHeight + "px"
|
|
110
|
+
}));
|
|
111
|
+
const s = u({
|
|
112
|
+
get() {
|
|
113
|
+
return a.modelValue;
|
|
114
|
+
},
|
|
115
|
+
set(e) {
|
|
116
|
+
t("update:modelValue", e);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
return (e, n) => {
|
|
120
|
+
const o = E("tv-tooltip");
|
|
121
|
+
return r(), p("label", {
|
|
122
|
+
class: i({
|
|
123
|
+
"top-textarea": !0,
|
|
124
|
+
["top-textarea-" + e.name]: e.name,
|
|
125
|
+
"top-disabled": e.disabled
|
|
126
|
+
})
|
|
127
|
+
}, [
|
|
128
|
+
y(h("textarea", L({
|
|
129
|
+
type: "text",
|
|
130
|
+
class: {
|
|
131
|
+
"top-forms-focusable": !e.disabled,
|
|
132
|
+
"top-textarea_textarea": !0,
|
|
133
|
+
"top-textarea_textarea-expandable": e.expandable,
|
|
134
|
+
"top-error": e.isError
|
|
135
|
+
},
|
|
136
|
+
autocomplete: "off_always",
|
|
137
|
+
name: e.name,
|
|
138
|
+
placeholder: e.placeholder,
|
|
139
|
+
disabled: e.disabled,
|
|
140
|
+
readonly: e.readonly,
|
|
141
|
+
rows: e.expandable ? void 0 : e.rows
|
|
142
|
+
}, e.$attrs, {
|
|
143
|
+
"onUpdate:modelValue": n[0] || (n[0] = (b) => s.value = b)
|
|
144
|
+
}), null, 16, O), [
|
|
145
|
+
[k, s.value]
|
|
146
|
+
]),
|
|
147
|
+
e.expandable ? (r(), p("div", R, f(s.value + " "), 1)) : d("", !0),
|
|
148
|
+
e.hint ? y((r(), v(K, {
|
|
149
|
+
key: 1,
|
|
150
|
+
class: "top-textarea_hint",
|
|
151
|
+
hint: e.hint
|
|
152
|
+
}, null, 8, ["hint"])), [
|
|
153
|
+
[o]
|
|
154
|
+
]) : d("", !0)
|
|
155
|
+
], 2);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}), q = {
|
|
159
|
+
"top-textarea": "top-textarea",
|
|
160
|
+
"top-textarea_textarea": "top-textarea_textarea",
|
|
161
|
+
"top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
|
|
162
|
+
"top-textarea_pseudoContent": "top-textarea_pseudoContent",
|
|
163
|
+
"top-textarea_hint": "top-textarea_hint"
|
|
164
|
+
}, F = {
|
|
165
|
+
$style: q
|
|
166
|
+
}, fe = /* @__PURE__ */ m(j, [["__cssModules", F]]), G = { class: "top-forms-optionLabel" }, I = {
|
|
167
|
+
key: 0,
|
|
168
|
+
class: "top-forms-optionLabel_description"
|
|
169
|
+
}, J = /* @__PURE__ */ c({
|
|
170
|
+
__name: "controlLabel",
|
|
171
|
+
props: {
|
|
172
|
+
title: {},
|
|
173
|
+
description: {},
|
|
174
|
+
disabled: { type: Boolean }
|
|
175
|
+
},
|
|
176
|
+
setup(l) {
|
|
177
|
+
return (t, a) => (r(), p("div", G, [
|
|
178
|
+
h("div", {
|
|
179
|
+
class: i({
|
|
180
|
+
"top-forms-optionLabel_title": !0,
|
|
181
|
+
"top-forms-optionLabel_title-disabled": t.disabled
|
|
182
|
+
})
|
|
183
|
+
}, f(t.title), 3),
|
|
184
|
+
t.description ? (r(), p("div", I, f(t.description), 1)) : d("", !0)
|
|
185
|
+
]));
|
|
186
|
+
}
|
|
187
|
+
}), Q = {
|
|
188
|
+
"top-forms-optionLabel": "top-forms-optionLabel",
|
|
189
|
+
"top-forms-optionLabel_title": "top-forms-optionLabel_title",
|
|
190
|
+
"top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
|
|
191
|
+
"top-forms-optionLabel_description": "top-forms-optionLabel_description"
|
|
192
|
+
}, X = {
|
|
193
|
+
$style: Q
|
|
194
|
+
}, $ = /* @__PURE__ */ m(J, [["__cssModules", X]]), Y = ["name", "value", "indeterminate", "disabled"], Z = /* @__PURE__ */ c({
|
|
195
|
+
__name: "checkbox",
|
|
196
|
+
props: {
|
|
197
|
+
modelValue: { type: [Boolean, Array, Set] },
|
|
198
|
+
name: {},
|
|
199
|
+
value: {},
|
|
200
|
+
title: {},
|
|
201
|
+
description: {},
|
|
202
|
+
disabled: { type: Boolean },
|
|
203
|
+
indeterminate: { type: Boolean },
|
|
204
|
+
isError: { type: Boolean }
|
|
205
|
+
},
|
|
206
|
+
emits: ["update:modelValue"],
|
|
207
|
+
setup(l, { emit: t }) {
|
|
208
|
+
const a = l, s = u({
|
|
209
|
+
get() {
|
|
210
|
+
return a.modelValue;
|
|
211
|
+
},
|
|
212
|
+
set(e) {
|
|
213
|
+
t("update:modelValue", e);
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
return (e, n) => (r(), p("label", {
|
|
217
|
+
class: i({
|
|
218
|
+
"top-forms-optionWrapper": !0,
|
|
219
|
+
"top-checkbox": !0,
|
|
220
|
+
["top-checkbox_" + e.name]: e.name !== "",
|
|
221
|
+
"top-disabled": e.disabled,
|
|
222
|
+
"top-error": e.isError && !e.disabled
|
|
223
|
+
})
|
|
224
|
+
}, [
|
|
225
|
+
y(h("input", {
|
|
226
|
+
type: "checkbox",
|
|
227
|
+
class: i({
|
|
228
|
+
"top-forms-focusable": !e.disabled,
|
|
229
|
+
"top-forms-option": !0,
|
|
230
|
+
"top-checkbox_input": !0,
|
|
231
|
+
"top-error": e.isError && !e.disabled
|
|
232
|
+
}),
|
|
233
|
+
name: e.name,
|
|
234
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => s.value = o),
|
|
235
|
+
value: e.value,
|
|
236
|
+
indeterminate: e.indeterminate,
|
|
237
|
+
disabled: e.disabled
|
|
238
|
+
}, null, 10, Y), [
|
|
239
|
+
[V, s.value]
|
|
240
|
+
]),
|
|
241
|
+
e.title ? (r(), v($, {
|
|
242
|
+
key: 0,
|
|
243
|
+
title: e.title,
|
|
244
|
+
description: e.description,
|
|
245
|
+
disabled: e.disabled
|
|
246
|
+
}, null, 8, ["title", "description", "disabled"])) : d("", !0)
|
|
247
|
+
], 2));
|
|
248
|
+
}
|
|
249
|
+
}), x = {
|
|
250
|
+
"top-checkbox": "top-checkbox",
|
|
251
|
+
"top-checkbox_input": "top-checkbox_input",
|
|
252
|
+
"top-error": "top-error"
|
|
253
|
+
}, ee = {
|
|
254
|
+
$style: x
|
|
255
|
+
}, ve = /* @__PURE__ */ m(Z, [["__cssModules", ee]]), oe = ["data-top-icon"], te = ["name", "title", "placeholder", "disabled", "readonly"], se = {
|
|
256
|
+
key: 2,
|
|
257
|
+
class: "top-formsCaption"
|
|
258
|
+
}, ae = /* @__PURE__ */ c({
|
|
259
|
+
__name: "input",
|
|
260
|
+
props: {
|
|
261
|
+
modelValue: {},
|
|
262
|
+
name: {},
|
|
263
|
+
disabled: { type: Boolean },
|
|
264
|
+
readonly: { type: Boolean },
|
|
265
|
+
title: {},
|
|
266
|
+
captionType: { default: "" },
|
|
267
|
+
size: { default: "s" },
|
|
268
|
+
icon: {},
|
|
269
|
+
addCleaner: { type: Boolean },
|
|
270
|
+
isError: { type: Boolean }
|
|
271
|
+
},
|
|
272
|
+
emits: ["update:modelValue"],
|
|
273
|
+
setup(l, { emit: t }) {
|
|
274
|
+
const a = l, s = u({
|
|
275
|
+
get() {
|
|
276
|
+
return a.modelValue;
|
|
277
|
+
},
|
|
278
|
+
set(o) {
|
|
279
|
+
t("update:modelValue", o);
|
|
280
|
+
}
|
|
281
|
+
}), e = u(() => a.addCleaner && !a.title || a.captionType !== "" ? "" : a.title), n = () => {
|
|
282
|
+
t("update:modelValue", "");
|
|
283
|
+
};
|
|
284
|
+
return (o, b) => (r(), p("label", {
|
|
285
|
+
class: i({
|
|
286
|
+
"top-input": !0,
|
|
287
|
+
["top-input-" + o.name]: o.name,
|
|
288
|
+
["top-size_" + o.size]: !0,
|
|
289
|
+
"top-disabled": o.disabled,
|
|
290
|
+
"top-input-withCleaner": o.addCleaner,
|
|
291
|
+
"top-formsCaptionWrapper": o.captionType !== "",
|
|
292
|
+
"top-formsCaptionWrapper-always": o.captionType === "top",
|
|
293
|
+
"top-input-withButton": !!o.$slots.btn
|
|
294
|
+
}),
|
|
295
|
+
"data-top-icon": o.icon
|
|
296
|
+
}, [
|
|
297
|
+
y(h("input", {
|
|
298
|
+
type: "text",
|
|
299
|
+
class: i({
|
|
300
|
+
"top-forms-focusable": !o.disabled,
|
|
301
|
+
"top-input_input": !0,
|
|
302
|
+
"top-error": o.isError
|
|
303
|
+
}),
|
|
304
|
+
autocomplete: "off_always",
|
|
305
|
+
name: o.name,
|
|
306
|
+
"onUpdate:modelValue": b[0] || (b[0] = (g) => s.value = g),
|
|
307
|
+
title: o.title,
|
|
308
|
+
placeholder: e.value,
|
|
309
|
+
disabled: o.disabled,
|
|
310
|
+
readonly: o.readonly,
|
|
311
|
+
onKeydown: b[1] || (b[1] = z(() => (o.addCleaner || !!o.$slots.btn) && n(), ["esc"]))
|
|
312
|
+
}, null, 42, te), [
|
|
313
|
+
[k, s.value]
|
|
314
|
+
]),
|
|
315
|
+
o.addCleaner && s.value ? (r(), p("span", {
|
|
316
|
+
key: 0,
|
|
317
|
+
class: "top-input_cleaner top-cleaner",
|
|
318
|
+
"data-top-icon": "",
|
|
319
|
+
onClick: n
|
|
320
|
+
})) : d("", !0),
|
|
321
|
+
s.value ? _(o.$slots, "btn", { key: 1 }) : d("", !0),
|
|
322
|
+
_(o.$slots, "default"),
|
|
323
|
+
o.captionType !== "" ? (r(), p("span", se, f(o.title), 1)) : d("", !0)
|
|
324
|
+
], 10, oe));
|
|
325
|
+
}
|
|
326
|
+
}), le = {
|
|
327
|
+
"top-input": "top-input",
|
|
328
|
+
"top-input_input": "top-input_input",
|
|
329
|
+
"top-input-withCleaner": "top-input-withCleaner"
|
|
330
|
+
}, re = {
|
|
331
|
+
$style: le
|
|
332
|
+
}, _e = /* @__PURE__ */ m(ae, [["__cssModules", re]]), ne = ["name", "value", "disabled"], pe = /* @__PURE__ */ c({
|
|
333
|
+
__name: "radio",
|
|
334
|
+
props: {
|
|
335
|
+
modelValue: {},
|
|
336
|
+
value: {},
|
|
337
|
+
name: {},
|
|
338
|
+
title: {},
|
|
339
|
+
description: {},
|
|
340
|
+
disabled: { type: Boolean },
|
|
341
|
+
isError: { type: Boolean }
|
|
342
|
+
},
|
|
343
|
+
emits: ["update:modelValue"],
|
|
344
|
+
setup(l, { emit: t }) {
|
|
345
|
+
const a = l, s = u({
|
|
346
|
+
get() {
|
|
347
|
+
return a.modelValue;
|
|
348
|
+
},
|
|
349
|
+
set(e) {
|
|
350
|
+
t("update:modelValue", e);
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
return (e, n) => (r(), p("label", {
|
|
354
|
+
class: i({
|
|
355
|
+
"top-forms-optionWrapper": !0,
|
|
356
|
+
"top-radio": !0,
|
|
357
|
+
["top-radio_" + e.name]: e.name !== "",
|
|
358
|
+
"top-disabled": e.disabled,
|
|
359
|
+
"top-error": e.isError && !e.disabled
|
|
360
|
+
})
|
|
361
|
+
}, [
|
|
362
|
+
y(h("input", {
|
|
363
|
+
type: "radio",
|
|
364
|
+
class: i({
|
|
365
|
+
"top-forms-focusable": !e.disabled,
|
|
366
|
+
"top-forms-option": !0,
|
|
367
|
+
"top-radio_input": !0,
|
|
368
|
+
"top-error": e.isError && !e.disabled
|
|
369
|
+
}),
|
|
370
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => s.value = o),
|
|
371
|
+
name: e.name,
|
|
372
|
+
value: e.value,
|
|
373
|
+
disabled: e.disabled
|
|
374
|
+
}, null, 10, ne), [
|
|
375
|
+
[S, s.value]
|
|
376
|
+
]),
|
|
377
|
+
e.title ? (r(), v($, {
|
|
378
|
+
key: 0,
|
|
379
|
+
title: e.title,
|
|
380
|
+
description: e.description,
|
|
381
|
+
disabled: e.disabled
|
|
382
|
+
}, null, 8, ["title", "description", "disabled"])) : d("", !0)
|
|
383
|
+
], 2));
|
|
384
|
+
}
|
|
385
|
+
}), ie = {
|
|
386
|
+
"top-radio": "top-radio",
|
|
387
|
+
"top-radio_input": "top-radio_input",
|
|
388
|
+
"top-error": "top-error"
|
|
389
|
+
}, de = {
|
|
390
|
+
$style: ie
|
|
391
|
+
}, $e = /* @__PURE__ */ m(pe, [["__cssModules", de]]), ue = ["name", "value", "disabled"], ce = /* @__PURE__ */ c({
|
|
392
|
+
__name: "switcher",
|
|
393
|
+
props: {
|
|
394
|
+
modelValue: { type: [Boolean, Array, Set] },
|
|
395
|
+
name: {},
|
|
396
|
+
value: {},
|
|
397
|
+
title: {},
|
|
398
|
+
description: {},
|
|
399
|
+
disabled: { type: Boolean },
|
|
400
|
+
isError: { type: Boolean }
|
|
401
|
+
},
|
|
402
|
+
emits: ["update:modelValue"],
|
|
403
|
+
setup(l, { emit: t }) {
|
|
404
|
+
const a = l, s = u({
|
|
405
|
+
get() {
|
|
406
|
+
return a.modelValue;
|
|
407
|
+
},
|
|
408
|
+
set(e) {
|
|
409
|
+
t("update:modelValue", e);
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
return (e, n) => (r(), p("label", {
|
|
413
|
+
class: i({
|
|
414
|
+
"top-forms-optionWrapper": !0,
|
|
415
|
+
"top-checkboxSwitcher": !0,
|
|
416
|
+
"top-disabled": e.disabled,
|
|
417
|
+
"top-error": e.isError && !e.disabled
|
|
418
|
+
})
|
|
419
|
+
}, [
|
|
420
|
+
y(h("input", {
|
|
421
|
+
type: "checkbox",
|
|
422
|
+
class: i({
|
|
423
|
+
"top-forms-focusable": !e.disabled,
|
|
424
|
+
"top-forms-option": !0,
|
|
425
|
+
"top-checkboxSwitcher_input": !0,
|
|
426
|
+
"top-error": e.isError && !e.disabled
|
|
427
|
+
}),
|
|
428
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => s.value = o),
|
|
429
|
+
name: e.name,
|
|
430
|
+
value: e.value,
|
|
431
|
+
disabled: e.disabled
|
|
432
|
+
}, null, 10, ue), [
|
|
433
|
+
[V, s.value]
|
|
434
|
+
]),
|
|
435
|
+
e.title ? (r(), v($, {
|
|
436
|
+
key: 0,
|
|
437
|
+
title: e.title,
|
|
438
|
+
description: e.description,
|
|
439
|
+
disabled: e.disabled
|
|
440
|
+
}, null, 8, ["title", "description", "disabled"])) : d("", !0)
|
|
441
|
+
], 2));
|
|
442
|
+
}
|
|
443
|
+
}), me = {
|
|
444
|
+
"top-checkboxSwitcher": "top-checkboxSwitcher",
|
|
445
|
+
"top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
|
|
446
|
+
"top-error": "top-error"
|
|
447
|
+
}, be = {
|
|
448
|
+
$style: me
|
|
449
|
+
}, ke = /* @__PURE__ */ m(ce, [["__cssModules", be]]);
|
|
450
|
+
export {
|
|
451
|
+
he as B,
|
|
452
|
+
$ as C,
|
|
453
|
+
K as H,
|
|
454
|
+
fe as T,
|
|
455
|
+
m as _,
|
|
456
|
+
ve as c,
|
|
457
|
+
_e as i,
|
|
458
|
+
$e as r,
|
|
459
|
+
ke as s
|
|
460
|
+
};
|
|
461
|
+
//# sourceMappingURL=forms-3575c189.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms-3575c189.es.js","sources":["../../src/components/forms/button/button.vue","../../src/components/forms/textarea/textarea.vue","../../src/components/forms/checkbox/checkbox.vue","../../src/components/forms/input/input.vue","../../src/components/forms/radio/radio.vue","../../src/components/forms/switcher/switcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: 'blue',\r\n\tstyling: '',\r\n\tsize: 's',\r\n});\r\n\r\nconst tagName = computed(() => props.href ? 'a' : 'button');\r\n\r\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\r\n</script>\r\n\r\n<template>\r\n\t<component\r\n\t\t:is=\"tagName\"\r\n\t\t:class=\"{\r\n\t\t\t['top-active']: isActive,\r\n\t\t\t['top-disabled']: disabled,\r\n\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t['top-button']: true,\r\n\t\t\t['top-button-progress']: isProgress,\r\n\t\t\t[`top-size_${size}`]: !!size,\r\n\t\t\t[`top-color_${color}`]: true,\r\n\t\t\t[`top-style_${styling}`]: !!styling,\r\n\t\t}\"\r\n\t\t:name=\"name\"\r\n\t\t:title=\"title\"\r\n\t\t:href=\"href\"\r\n\t\t:type=\"type\"\r\n\t\t:data-top-icon=\"icon || undefined\"\r\n\t\t:data-top-icon2=\"icon2 || undefined\"\r\n\t\t:disabled=\"disabled || undefined\"\r\n\t\t:inProgress=\"isProgress\"\r\n\t>\r\n\t\t<!-- @slot Текст или HTML в кнопке -->\r\n\t\t<slot>\r\n\t\t\t{{ !icon ? 'Button' : '' }}\r\n\t\t</slot>\r\n\t</component>\r\n</template>\r\n\r\n<style module>\r\n@import \"./style/button.css\";\r\n@import \"./style/style-outline.css\";\r\n@import \"./style/style-soft.css\";\r\n@import \"./style/style-transparent.css\";\r\n\r\n.top-button {\r\n\t--top-button-color: var(--color-white);\r\n\t--top-button-background-color: transparent;\r\n\t--top-button-background-color-hover: var(--top-button-background-color);\r\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\r\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\r\n\t--top-button-box-shadow: none;\r\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\r\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\r\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\r\n\t--top-forms-border-width: 0px;\r\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\r\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\r\n}\r\n\r\n.top-button.top-size_l {\r\n\t--top-forms-padding: var(--top-forms-padding_l);\r\n\t--top-forms-base-height: var(--top-forms-base-height_l);\r\n}\r\n\r\n.top-button.top-size_xl {\r\n\t--top-forms-padding: var(--top-forms-padding_xl);\r\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\r\n}\r\n</style>","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport Hint from '@/components/forms/hint/hint.vue';\r\nimport type { Props, Emits } from './textarea';\r\n\r\ndefineOptions({\r\n\tinheritAttrs: false,\r\n});\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\trows: 5,\r\n\tminHeight: 120,\r\n});\r\n\r\nconst emit = defineEmits<Emits>();\r\n\r\nconst value = computed({\r\n\tget () {\r\n\t\treturn props.modelValue;\r\n\t},\r\n\tset (value) {\r\n\t\temit('update:modelValue', value);\r\n\t},\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<label\r\n\t\t:class=\"{\r\n\t\t\t['top-textarea']: true,\r\n\t\t\t['top-textarea-' + name]: name,\r\n\t\t\t['top-disabled']: disabled,\r\n\t\t}\"\r\n\t>\r\n\t\t<textarea\r\n\t\t\ttype=\"text\"\r\n\t\t\t:class=\"{\r\n\t\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t\t['top-textarea_textarea']: true,\r\n\t\t\t\t['top-textarea_textarea-expandable']: expandable,\r\n\t\t\t\t['top-error']: isError,\r\n\t\t\t}\"\r\n\t\t\tautocomplete=\"off_always\"\r\n\t\t\t:name=\"name\"\r\n\t\t\t:placeholder=\"placeholder\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t\t:readonly=\"readonly\"\r\n\t\t\t:rows=\"!expandable ? rows : undefined\"\r\n\t\t\t:=\"$attrs\"\r\n\t\t\tv-model=\"value\"\r\n\t\t/>\r\n\r\n\t\t<div\r\n\t\t\tv-if=\"expandable\"\r\n\t\t\tclass=\"top-textarea_pseudoContent\"\r\n\t\t>\r\n\t\t\t{{ value + ' ' }}\r\n\t\t</div>\r\n\r\n\t\t<Hint\r\n\t\t\tv-if=\"hint\"\r\n\t\t\tclass=\"top-textarea_hint\"\r\n\t\t\t:hint=\"hint\"\r\n\t\t\tv-tv-tooltip\r\n\t\t/>\r\n\t</label>\r\n</template>\r\n\r\n<style module>\r\n.top-textarea {\r\n\twidth: 180px;\r\n\tdisplay: inline-flex;\r\n\talign-items: center;\r\n\tposition: relative;\r\n}\r\n\r\n.top-textarea_textarea {\r\n\tbackground: var(--top-forms-background-color);\r\n\twidth: 100%;\r\n\tpadding: var(--top-forms-padding);\r\n\tresize: none;\r\n}\r\n\r\n.top-textarea_textarea:hover {\r\n\tbackground: var(--top-forms-background-color-hover);\r\n}\r\n\r\n.top-textarea_textarea:focus {\r\n\toutline-color: var(--color-theme-75);\r\n\toutline-offset: 0px;\r\n}\r\n\r\n.top-textarea_textarea.top-textarea_textarea-expandable {\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\toverflow: hidden;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n}\r\n\r\n.top-textarea_pseudoContent {\r\n\tbox-sizing: border-box;\r\n\tmin-height: v-bind(minHeight + 'px');\r\n\tpadding: var(--top-forms-padding);\r\n\tfont-size: 14px;\r\n\twhite-space: pre-wrap;\r\n\toverflow-wrap: anywhere;\r\n\tpointer-events: none;\r\n\topacity: 0;\r\n\tz-index: -1;\r\n}\r\n\r\n.top-textarea_hint {\r\n\tposition: absolute;\r\n\ttop: 2px;\r\n\tright: 2px;\r\n}\r\n</style>","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props, Emits } from './checkbox';\r\nimport ControlLabel from '../controlLabel/controlLabel.vue';\r\n\r\nconst props = defineProps<Props>();\r\nconst emit = defineEmits<Emits>();\r\n\r\nconst localValue = computed({\r\n\tget () {\r\n\t\treturn props.modelValue;\r\n\t},\r\n\tset (value) {\r\n\t\temit('update:modelValue', value);\r\n\t},\r\n});\r\n\r\n</script>\r\n\r\n<template>\r\n\t<label :class=\"{\r\n\t\t['top-forms-optionWrapper']: true,\r\n\t\t['top-checkbox']: true,\r\n\t\t['top-checkbox_' + name]: name !== '',\r\n\t\t['top-disabled']: disabled,\r\n\t\t['top-error']: isError && !disabled,\r\n\t}\">\r\n\t\t<input\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t:class=\"{\r\n\t\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t\t['top-forms-option']: true,\r\n\t\t\t\t['top-checkbox_input']: true,\r\n\t\t\t\t['top-error']: isError && !disabled,\r\n\t\t\t}\"\r\n\t\t\t:name=\"name\"\r\n\t\t\tv-model=\"localValue\"\r\n\t\t\t:value=\"value\"\r\n\t\t\t:indeterminate=\"indeterminate\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t>\r\n\r\n\t\t<ControlLabel\r\n\t\t\tv-if=\"title\"\r\n\t\t\t:title=\"title\"\r\n\t\t\t:description=\"description\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t/>\r\n\t</label>\r\n</template>\r\n\r\n<style module>\r\n.top-checkbox {\r\n\tcursor: pointer;\r\n\tdisplay: inline-flex;\r\n}\r\n\r\n.top-checkbox_input {\r\n\tcursor: inherit;\r\n\tborder-radius: 4px;\r\n\tbackground: var(--content-background-color);\r\n\tborder: 1px solid var(--top-forms-border-color);\r\n\twidth: calc(var(--top-forms-option-height) - 3px * 2);\r\n\theight: calc(var(--top-forms-option-height) - 3px * 2);\r\n}\r\n\r\n.top-checkbox_input:before {\r\n\tcontent: ' ';\r\n\tcolor: #FFF;\r\n\tfont-family: 'Topvisor-2';\r\n\tfont-size: 16px;\r\n}\r\n\r\n.top-checkbox_input:hover {\r\n\tborder-color: var(--top-forms-option-color);\r\n\tbackground: var(--color-theme-50)\r\n}\r\n\r\n/* checked / indeterminate */\r\n.top-checkbox_input:checked,\r\n.top-checkbox_input:indeterminate {\r\n\tborder-color: var(--top-forms-option-color);\r\n\tbackground: var(--top-forms-option-color);\r\n}\r\n\r\n.top-checkbox_input:checked:before {\r\n\tcontent: '';\r\n}\r\n\r\n.top-checkbox_input:indeterminate:before {\r\n\tcontent: '';\r\n}\r\n\r\n.top-checkbox_input:checked:hover,\r\n.top-checkbox_input:indeterminate:hover {\r\n\tborder-color: var(--top-forms-option-color-hover);\r\n\tbackground: var(--top-forms-option-color-hover);\r\n}\r\n\r\n/* disabled selected */\r\n.top-checkbox_input:disabled {\r\n\tborder-color: var(--color-line-1-opacity);\r\n\tbackground: var(--color-theme-50);\r\n}\r\n\r\n.top-checkbox_input:checked:disabled,\r\n.top-checkbox_input:indeterminate:disabled {\r\n\tborder-color: transparent;\r\n\tbackground: var(--color-theme-400);\r\n}\r\n\r\n/* isError */\r\n.top-checkbox_input.top-error {\r\n\tborder-color: var(--color-negative);\r\n}\r\n\r\n.top-checkbox_input.top-error:hover {\r\n\tborder-color: var(--color-negative-2);\r\n}\r\n\r\n/* isError selected */\r\n.top-checkbox_input:checked.top-error,\r\n.top-checkbox_input:indeterminate.top-error {\r\n\tbackground: var(--color-negative);\r\n}\r\n\r\n.top-checkbox_input:checked.top-error:hover,\r\n.top-checkbox_input:indeterminate.top-error:hover {\r\n\tbackground: var(--color-negative-2);\r\n}\r\n</style>","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props, Emits } from './input';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tsize: 's',\r\n\tcaptionType: '',\r\n});\r\n\r\nconst emit = defineEmits<Emits>();\r\n\r\nconst modelValue = computed({\r\n\tget() {\r\n\t\treturn props.modelValue;\r\n\t},\r\n\tset(modelValue) {\r\n\t\temit('update:modelValue', modelValue);\r\n\t},\r\n});\r\n\r\nconst placeholder = computed(() => {\r\n\tif (props.addCleaner && !props.title) {\r\n\t\treturn '';\r\n\t}\r\n\tif (props.captionType !== '') {\r\n\t\treturn '';\r\n\t}\r\n\r\n\treturn props.title;\r\n});\r\n\r\nconst clean = () => {\r\n\temit('update:modelValue', '');\r\n};\r\n</script>\r\n\r\n<template>\r\n\t<label\r\n\t\t:class=\"{\r\n\t\t\t['top-input']: true,\r\n\t\t\t['top-input-' + name]: name,\r\n\t\t\t['top-size_' + size]: true,\r\n\t\t\t['top-disabled']: disabled,\r\n\t\t\t['top-input-withCleaner']: addCleaner,\r\n\t\t\t['top-formsCaptionWrapper']: captionType !== '',\r\n\t\t\t['top-formsCaptionWrapper-always']: captionType === 'top',\r\n\t\t\t['top-input-withButton']: !!$slots.btn,\r\n\t\t}\"\r\n\t\t:data-top-icon=\"icon\"\r\n\t>\r\n\t\t<input\r\n\t\t\ttype=\"text\"\r\n\t\t\t:class=\"{\r\n\t\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t\t['top-input_input']: true,\r\n\t\t\t\t['top-error']: isError,\r\n\t\t\t}\"\r\n\t\t\tautocomplete=\"off_always\"\r\n\t\t\t:name=\"name\"\r\n\t\t\tv-model=\"modelValue\"\r\n\t\t\t:title=\"title\"\r\n\t\t\t:placeholder=\"placeholder\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t\t:readonly=\"readonly\"\r\n\t\t\t@keydown.esc=\"() => (addCleaner || !!$slots.btn) && clean()\"\r\n\t\t>\r\n\r\n\t\t<span\r\n\t\t\tv-if=\"addCleaner && modelValue\"\r\n\t\t\tclass=\"top-input_cleaner top-cleaner\"\r\n\t\t\tdata-top-icon=\"\"\r\n\t\t\t@click=\"clean\"\r\n\t\t></span>\r\n\r\n\t\t<!-- TODO: кнопка должна отоборажаться только при изменении value -->\r\n\t\t<!-- TODO: до нажатия на кнопку, изменеине не должно применяться -->\r\n\t\t<!-- TODO: при отмене состояние должно возвращаться к первоначальному -->\r\n\t\t<slot\r\n\t\t\tv-if=\"modelValue\"\r\n\t\t\tname=\"btn\"\r\n\t\t/>\r\n\r\n\t\t<slot></slot>\r\n\r\n\t\t<span\r\n\t\t\tv-if=\"captionType !== ''\"\r\n\t\t\tclass=\"top-formsCaption\"\r\n\t\t>\r\n\t\t\t{{ title }}\r\n\t\t</span>\r\n\t</label>\r\n</template>\r\n\r\n<style module>\r\n.top-input {\r\n\twidth: 180px;\r\n\tdisplay: inline-flex;\r\n\talign-items: center;\r\n\tgap: var(--top-gap-1);\r\n}\r\n\r\n.top-input_input {\r\n\tbackground: var(--top-forms-background-color);\r\n}\r\n\r\n.top-input_input:hover {\r\n\tbackground: var(--top-forms-background-color-hover);\r\n}\r\n\r\n.top-input_input:focus {\r\n\toutline-color: var(--color-theme-75);\r\n\toutline-offset: 0px;\r\n}\r\n\r\n.top-input-withCleaner .top-input_input:not(:placeholder-shown) {\r\n\t--top-forms_clear-width: 24px;\r\n}\r\n\r\n/* TODO: перенести в inputsRange */\r\n.top-input_input {\r\n\twidth: 50%;\r\n\tflex-grow: 1;\r\n}\r\n\r\n.top-input[data-top-icon]:before {\r\n\t--top-icon-color: var(--color-text-secondary);\r\n}\r\n</style>","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props, Emits } from './radio';\r\nimport ControlLabel from '../controlLabel/controlLabel.vue';\r\n\r\nconst props = defineProps<Props>();\r\nconst emit = defineEmits<Emits>();\r\n\r\nconst localValue = computed({\r\n\tget () {\r\n\t\treturn props.modelValue;\r\n\t},\r\n\tset (value) {\r\n\t\temit('update:modelValue', value);\r\n\t},\r\n});\r\n\r\n</script>\r\n\r\n<template>\r\n\t<label\r\n\t\t:class=\"{\r\n\t\t['top-forms-optionWrapper']: true,\r\n\t\t['top-radio']: true,\r\n\t\t['top-radio_' + name]: name !== '',\r\n\t\t['top-disabled']: disabled,\r\n\t\t['top-error']: isError && !disabled,\r\n\t}\"\r\n\t>\r\n\t\t<input\r\n\t\t\ttype=\"radio\"\r\n\t\t\t:class=\"{\r\n\t\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t\t['top-forms-option']: true,\r\n\t\t\t\t['top-radio_input']: true,\r\n\t\t\t\t['top-error']: isError && !disabled,\r\n\t\t\t}\"\r\n\t\t\tv-model=\"localValue\"\r\n\t\t\t:name=\"name\"\r\n\t\t\t:value=\"value\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t>\r\n\r\n\t\t<ControlLabel\r\n\t\t\tv-if=\"title\"\r\n\t\t\t:title=\"title\"\r\n\t\t\t:description=\"description\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t/>\r\n\t</label>\r\n</template>\r\n\r\n<style module>\r\n:root {\r\n\t--top-radio-background-color: var(--content-background-color);\r\n\t--top-radio-background-color-hover: var(--top-radio-background-color);\r\n\t--top-radio-background-color-active: var(--top-radio-background-color);\r\n}\r\n\r\n.top-radio {\r\n\tcursor: pointer;\r\n}\r\n\r\n.top-radio_input {\r\n\tborder-radius: 50%;\r\n\tbackground: var(--content-background-color);\r\n\tborder: 1px solid var(--top-forms-border-color);\r\n\twidth: calc(var(--top-forms-option-height) - 3px * 2);\r\n\theight: calc(var(--top-forms-option-height) - 3px * 2);\r\n}\r\n\r\n.top-radio_input:hover {\r\n\tborder-color: var(--top-forms-option-color);\r\n\tbackground: var(--color-theme-50)\r\n}\r\n\r\n.top-radio_input:checked {\r\n\tborder-color: var(--top-forms-option-color);\r\n\tborder-width: 5px;\r\n}\r\n\r\n.top-radio_input:checked:hover {\r\n\tborder-color: var(--top-forms-option-color-hover);\r\n}\r\n\r\n/* disabled */\r\n.top-radio_input:disabled {\r\n\tborder-color: var(--color-line-1-opacity);\r\n\tbackground: var(--color-theme-50);\r\n}\r\n\r\n/* disabled selected */\r\n.top-radio_input:checked:disabled {\r\n\tborder-color: var(--color-theme-400);\r\n}\r\n\r\n/* isError */\r\n.top-radio_input.top-error {\r\n\tborder-color: var(--color-negative);\r\n}\r\n\r\n.top-radio_input.top-error:hover {\r\n\tborder-color: var(--color-negative-2);\r\n}\r\n</style>","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props, Emits } from './switcher';\r\nimport ControlLabel from '../controlLabel/controlLabel.vue';\r\n\r\nconst props = defineProps<Props>();\r\nconst emit = defineEmits<Emits>();\r\n\r\nconst localValue = computed({\r\n\tget () {\r\n\t\treturn props.modelValue;\r\n\t},\r\n\tset (value) {\r\n\t\temit('update:modelValue', value);\r\n\t},\r\n});\r\n</script>\r\n\r\n<template>\r\n\t<label\r\n\t\t:class=\"{\r\n\t\t['top-forms-optionWrapper']: true,\r\n\t\t['top-checkboxSwitcher']: true,\r\n\t\t['top-disabled']: disabled,\r\n\t\t['top-error']: isError && !disabled,\r\n\t}\"\r\n\t>\r\n\t\t<input\r\n\t\t\ttype=\"checkbox\"\r\n\t\t\t:class=\"{\r\n\t\t\t\t['top-forms-focusable']: !disabled,\r\n\t\t\t\t['top-forms-option']: true,\r\n\t\t\t\t['top-checkboxSwitcher_input']: true,\r\n\t\t\t\t['top-error']: isError && !disabled,\r\n\t\t\t}\"\r\n\t\t\tv-model=\"localValue\"\r\n\t\t\t:name=\"name\"\r\n\t\t\t:value=\"value\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t>\r\n\r\n\t\t<ControlLabel\r\n\t\t\tv-if=\"title\"\r\n\t\t\t:title=\"title\"\r\n\t\t\t:description=\"description\"\r\n\t\t\t:disabled=\"disabled\"\r\n\t\t/>\r\n\t</label>\r\n</template>\r\n\r\n<style module>\r\n.top-checkboxSwitcher {\r\n\tcursor: pointer;\r\n\tdisplay: inline-flex;\r\n\tgap: 4px;\r\n}\r\n\r\n.top-checkboxSwitcher_input {\r\n\tborder-radius: 9px;\r\n\tborder: none;\r\n\tbackground: var(--color-theme-100);\r\n\twidth: 36px;\r\n\theight: 18px;\r\n\tposition: relative;\r\n}\r\n\r\n.top-checkboxSwitcher_input:before {\r\n\tcontent: '';\r\n\tborder-radius: 50%;\r\n\tbackground: var(--color-white);\r\n\twidth: 12px;\r\n\theight: 12px;\r\n\tmargin: 3px;\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tleft: 0;\r\n\r\n\ttransition: left 0.1s;\r\n}\r\n\r\n.top-checkboxSwitcher_input:hover {\r\n\tbackground: var(--color-theme-150);\r\n}\r\n\r\n/* checked */\r\n.top-checkboxSwitcher_input:checked {\r\n\tbackground: var(--top-forms-option-color);\r\n}\r\n\r\n.top-checkboxSwitcher_input:checked:hover {\r\n\tbackground: var(--top-forms-option-color-hover);\r\n}\r\n\r\n.top-checkboxSwitcher_input:checked:before {\r\n\tleft: 50%;\r\n}\r\n\r\n/* disabled */\r\n.top-checkboxSwitcher_input:disabled {\r\n\tbackground: var(--color-theme-400);\r\n}\r\n\r\n/* isError */\r\n.top-checkboxSwitcher_input.top-error {\r\n\tbackground: var(--color-negative);\r\n}\r\n\r\n.top-checkboxSwitcher_input.top-error:hover {\r\n\tbackground: var(--color-negative-2);\r\n}\r\n</style>"],"names":["tagName","computed","props","type","value","emit","localValue","modelValue","placeholder","clean"],"mappings":";;;;;;;;;;;;;;;;;;iBAUMA,IAAUC,EAAS,MAAMC,EAAM,OAAO,MAAM,QAAQ,GAEpDC,IAAOF,EAAS,MAAMC,EAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACIjE,UAAME,IAAQH,EAAS;AAAA,MACtB,MAAO;AACN,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAKE,GAAO;AACX,QAAAC,EAAK,qBAAqBD,CAAK;AAAA,MAChC;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCfKE,IAAaL,EAAS;AAAA,MAC3B,MAAO;AACN,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAKE,GAAO;AACX,QAAAC,EAAK,qBAAqBD,CAAK;AAAA,MAChC;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCJKG,IAAaN,EAAS;AAAA,MAC3B,MAAM;AACL,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAIK,GAAY;AACf,QAAAF,EAAK,qBAAqBE,CAAU;AAAA,MACrC;AAAA,IAAA,CACA,GAEKC,IAAcP,EAAS,MACxBC,EAAM,cAAc,CAACA,EAAM,SAG3BA,EAAM,gBAAgB,KAClB,KAGDA,EAAM,KACb,GAEKO,IAAQ,MAAM;AACnB,MAAAJ,EAAK,qBAAqB,EAAE;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCxBvBC,IAAaL,EAAS;AAAA,MAC3B,MAAO;AACN,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAKE,GAAO;AACX,QAAAC,EAAK,qBAAqBD,CAAK;AAAA,MAChC;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCPKE,IAAaL,EAAS;AAAA,MAC3B,MAAO;AACN,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAKE,GAAO;AACX,QAAAC,EAAK,qBAAqBD,CAAK;AAAA,MAChC;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|