@topvisor/ui 0.0.15 → 0.0.16

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.
Files changed (67) hide show
  1. package/.chunks/core-97b070be.amd.js +2 -0
  2. package/.chunks/core-97b070be.amd.js.map +1 -0
  3. package/.chunks/core-c3afa109.es.js +121 -0
  4. package/.chunks/core-c3afa109.es.js.map +1 -0
  5. package/.chunks/forms-6a6b0b80.es.js +436 -0
  6. package/.chunks/forms-6a6b0b80.es.js.map +1 -0
  7. package/.chunks/forms-7119886a.amd.js +3 -0
  8. package/.chunks/forms-7119886a.amd.js.map +1 -0
  9. package/.chunks/popup-6d1d8097.amd.js +342 -0
  10. package/.chunks/popup-6d1d8097.amd.js.map +1 -0
  11. package/.chunks/popup-95d27020.es.js +720 -0
  12. package/.chunks/popup-95d27020.es.js.map +1 -0
  13. package/README.md +62 -62
  14. package/common/common.amd.js +1 -21
  15. package/common/common.amd.js.map +1 -1
  16. package/common/common.js +8 -11
  17. package/common/common.js.map +1 -1
  18. package/core/core.amd.js +2 -0
  19. package/core/core.amd.js.map +1 -0
  20. package/core/core.js +7 -0
  21. package/core/core.js.map +1 -0
  22. package/core.css +1 -659
  23. package/dark.css +1 -136
  24. package/editArea/editArea.amd.js +3 -0
  25. package/editArea/editArea.amd.js.map +1 -0
  26. package/editArea/editArea.js +111 -0
  27. package/editArea/editArea.js.map +1 -0
  28. package/editArea.css +1 -0
  29. package/forms/forms.amd.js +1 -10
  30. package/forms/forms.amd.js.map +1 -1
  31. package/forms/forms.js +9 -7
  32. package/forms/helpers.amd.js +2 -0
  33. package/{helpers → forms}/helpers.amd.js.map +1 -1
  34. package/forms/helpers.js +6 -0
  35. package/forms.css +1 -415
  36. package/icomoon/demo-files/Read Me.txt +7 -7
  37. package/icomoon/demo-files/demo.css +161 -161
  38. package/icomoon/demo-files/demo.js +30 -30
  39. package/icomoon/demo.html +2931 -2931
  40. package/icomoon/fonts/Topvisor-2.svg +231 -231
  41. package/icomoon/style.css +644 -644
  42. package/light.css +1 -136
  43. package/package.json +19 -19
  44. package/popup/popup.amd.js +3 -0
  45. package/popup/popup.amd.js.map +1 -0
  46. package/popup/popup.js +146 -0
  47. package/popup/popup.js.map +1 -0
  48. package/popup/worker.amd.js +2 -0
  49. package/popup/worker.amd.js.map +1 -0
  50. package/popup/worker.js +158 -0
  51. package/popup/worker.js.map +1 -0
  52. package/popup.css +1 -0
  53. package/utils/device.amd.js +2 -0
  54. package/utils/device.amd.js.map +1 -0
  55. package/utils/device.js +34 -0
  56. package/utils/device.js.map +1 -0
  57. package/utils/dom.amd.js +2 -0
  58. package/utils/dom.amd.js.map +1 -0
  59. package/utils/dom.js +64 -0
  60. package/utils/dom.js.map +1 -0
  61. package/.chunks/forms-2abb7eaa.amd.js +0 -425
  62. package/.chunks/forms-2abb7eaa.amd.js.map +0 -1
  63. package/.chunks/forms-5e17154c.es.js +0 -422
  64. package/.chunks/forms-5e17154c.es.js.map +0 -1
  65. package/helpers/helpers.amd.js +0 -6
  66. package/helpers/helpers.js +0 -6
  67. /package/{helpers → forms}/helpers.js.map +0 -0
@@ -1,422 +0,0 @@
1
- import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, createElementVNode, createCommentVNode, unref, withDirectives, withKeys, vModelText } from "vue";
2
- var SIZE = /* @__PURE__ */ ((SIZE2) => {
3
- SIZE2["S"] = "s";
4
- SIZE2["L"] = "l";
5
- SIZE2["XL"] = "xl";
6
- return SIZE2;
7
- })(SIZE || {});
8
- var COLOR = /* @__PURE__ */ ((COLOR2) => {
9
- COLOR2["Theme"] = "theme";
10
- COLOR2["Blue"] = "blue";
11
- COLOR2["Green"] = "green";
12
- COLOR2["Orange"] = "orange";
13
- COLOR2["Red"] = "red";
14
- COLOR2["Pink"] = "pink";
15
- return COLOR2;
16
- })(COLOR || {});
17
- var STYLING = /* @__PURE__ */ ((STYLING2) => {
18
- STYLING2["Regular"] = "";
19
- STYLING2["Outline"] = "outline";
20
- STYLING2["Soft"] = "soft";
21
- STYLING2["Transparent"] = "transparent";
22
- return STYLING2;
23
- })(STYLING || {});
24
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
25
- __name: "button",
26
- props: {
27
- color: { default: COLOR.Blue },
28
- styling: { default: STYLING.Regular },
29
- size: { default: SIZE.S },
30
- name: {},
31
- title: {},
32
- icon: {},
33
- icon2: {},
34
- href: {},
35
- disabled: { type: Boolean },
36
- isSubmit: { type: Boolean },
37
- isActive: { type: Boolean },
38
- isProgress: { type: Boolean }
39
- },
40
- setup(__props) {
41
- const props = __props;
42
- const tagName = computed(() => props.href ? "a" : "button");
43
- const type = computed(() => props.isSubmit ? "submit" : void 0);
44
- return (_ctx, _cache) => {
45
- return openBlock(), createBlock(resolveDynamicComponent(tagName.value), {
46
- class: normalizeClass({
47
- ["top-active"]: _ctx.isActive,
48
- ["top-disabled"]: _ctx.disabled,
49
- ["top-forms-focusable"]: !_ctx.disabled,
50
- ["top-button"]: true,
51
- ["top-button-progress"]: _ctx.isProgress,
52
- [`top-size_${_ctx.size}`]: !!_ctx.size,
53
- [`top-color_${_ctx.color}`]: true,
54
- [`top-style_${_ctx.styling}`]: !!_ctx.styling
55
- }),
56
- name: _ctx.name,
57
- title: _ctx.title,
58
- href: _ctx.href,
59
- type: type.value,
60
- "data-top-icon": _ctx.icon || void 0,
61
- "data-top-icon2": _ctx.icon2 || void 0,
62
- disabled: _ctx.disabled || void 0,
63
- inProgress: _ctx.isProgress
64
- }, {
65
- default: withCtx(() => [
66
- renderSlot(_ctx.$slots, "default", {}, () => [
67
- createTextVNode(toDisplayString(!_ctx.icon ? "Button" : ""), 1)
68
- ])
69
- ]),
70
- _: 3
71
- }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]);
72
- };
73
- }
74
- });
75
- const progress = "_progress_1f1nw_1";
76
- const style0$5 = {
77
- "top-button": "top-button",
78
- "top-active": "top-active",
79
- "top-button-progress": "top-button-progress",
80
- progress,
81
- "top-color_blue": "top-color_blue",
82
- "top-color_green": "top-color_green",
83
- "top-color_orange": "top-color_orange",
84
- "top-color_red": "top-color_red",
85
- "top-color_pink": "top-color_pink",
86
- "top-color_theme": "top-color_theme",
87
- "top-style_outline": "top-style_outline",
88
- "top-style_soft": "top-style_soft",
89
- "top-style_transparent": "top-style_transparent",
90
- "top-size_l": "top-size_l",
91
- "top-size_xl": "top-size_xl"
92
- };
93
- const _export_sfc = (sfc, props) => {
94
- const target = sfc.__vccOpts || sfc;
95
- for (const [key, val] of props) {
96
- target[key] = val;
97
- }
98
- return target;
99
- };
100
- const cssModules$5 = {
101
- "$style": style0$5
102
- };
103
- const button = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
104
- const _hoisted_1$4 = { class: "top-forms-optionLabel" };
105
- const _hoisted_2$1 = {
106
- key: 0,
107
- class: "top-forms-optionLabel_description"
108
- };
109
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
110
- __name: "controlLabel",
111
- props: {
112
- title: {},
113
- description: {},
114
- disabled: { type: Boolean }
115
- },
116
- setup(__props) {
117
- return (_ctx, _cache) => {
118
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
119
- createElementVNode("div", {
120
- class: normalizeClass({
121
- "top-forms-optionLabel_title": true,
122
- "top-forms-optionLabel_title-disabled": _ctx.disabled
123
- })
124
- }, toDisplayString(_ctx.title), 3),
125
- _ctx.description ? (openBlock(), createElementBlock("div", _hoisted_2$1, toDisplayString(_ctx.description), 1)) : createCommentVNode("", true)
126
- ]);
127
- };
128
- }
129
- });
130
- const style0$4 = {
131
- "top-forms-optionLabel": "top-forms-optionLabel",
132
- "top-forms-optionLabel_title": "top-forms-optionLabel_title",
133
- "top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
134
- "top-forms-optionLabel_description": "top-forms-optionLabel_description"
135
- };
136
- const cssModules$4 = {
137
- "$style": style0$4
138
- };
139
- const ControlLabel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
140
- const _hoisted_1$3 = ["name", "value", "checked", "indeterminate", "disabled"];
141
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
142
- __name: "checkbox",
143
- props: {
144
- name: {},
145
- value: {},
146
- title: {},
147
- description: {},
148
- checked: { type: Boolean },
149
- disabled: { type: Boolean },
150
- indeterminate: { type: Boolean },
151
- isError: { type: Boolean }
152
- },
153
- setup(__props) {
154
- return (_ctx, _cache) => {
155
- return openBlock(), createElementBlock("label", {
156
- class: normalizeClass({
157
- ["top-forms-optionWrapper"]: true,
158
- ["top-checkbox"]: true,
159
- ["top-checkbox_" + _ctx.name]: _ctx.name !== "",
160
- ["top-active"]: _ctx.checked,
161
- ["top-disabled"]: _ctx.disabled,
162
- ["top-error"]: _ctx.isError && !_ctx.disabled
163
- })
164
- }, [
165
- createElementVNode("input", {
166
- type: "checkbox",
167
- class: normalizeClass({
168
- ["top-forms-focusable"]: !_ctx.disabled,
169
- ["top-forms-option"]: true,
170
- ["top-checkbox_input"]: true,
171
- ["top-error"]: _ctx.isError && !_ctx.disabled
172
- }),
173
- name: _ctx.name,
174
- value: _ctx.value,
175
- checked: _ctx.checked,
176
- indeterminate: _ctx.indeterminate,
177
- disabled: _ctx.disabled
178
- }, null, 10, _hoisted_1$3),
179
- _ctx.title ? (openBlock(), createBlock(ControlLabel, {
180
- key: 0,
181
- title: _ctx.title,
182
- description: _ctx.description,
183
- disabled: _ctx.disabled
184
- }, null, 8, ["title", "description", "disabled"])) : createCommentVNode("", true)
185
- ], 2);
186
- };
187
- }
188
- });
189
- const style0$3 = {
190
- "top-checkbox": "top-checkbox",
191
- "top-checkbox_input": "top-checkbox_input",
192
- "top-error": "top-error"
193
- };
194
- const cssModules$3 = {
195
- "$style": style0$3
196
- };
197
- const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
198
- var CAPTION_TYPE = /* @__PURE__ */ ((CAPTION_TYPE2) => {
199
- CAPTION_TYPE2["NONE"] = "";
200
- CAPTION_TYPE2["SLIDE"] = "slide";
201
- CAPTION_TYPE2["TOP"] = "top";
202
- return CAPTION_TYPE2;
203
- })(CAPTION_TYPE || {});
204
- const _hoisted_1$2 = ["data-top-icon"];
205
- const _hoisted_2 = ["name", "title", "placeholder", "disabled", "readonly"];
206
- const _hoisted_3 = {
207
- key: 2,
208
- class: "top-formsCaption"
209
- };
210
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
211
- __name: "input",
212
- props: {
213
- modelValue: {},
214
- name: {},
215
- disabled: { type: Boolean },
216
- readonly: { type: Boolean },
217
- title: {},
218
- captionType: { default: CAPTION_TYPE.NONE },
219
- size: { default: SIZE.S },
220
- icon: {},
221
- addCleaner: { type: Boolean },
222
- isError: { type: Boolean }
223
- },
224
- emits: ["update:modelValue"],
225
- setup(__props, { emit }) {
226
- const props = __props;
227
- const value = computed({
228
- get() {
229
- return props.modelValue;
230
- },
231
- set(value2) {
232
- emit("update:modelValue", value2);
233
- }
234
- });
235
- const placeholder = computed(() => {
236
- if (props.addCleaner && !props.title) {
237
- return "";
238
- }
239
- if (props.captionType !== CAPTION_TYPE.NONE) {
240
- return "";
241
- }
242
- return props.title;
243
- });
244
- const clean = () => {
245
- emit("update:modelValue", "");
246
- };
247
- return (_ctx, _cache) => {
248
- return openBlock(), createElementBlock("label", {
249
- class: normalizeClass({
250
- ["top-input"]: true,
251
- ["top-input-" + _ctx.name]: _ctx.name,
252
- ["top-size_" + _ctx.size]: true,
253
- ["top-disabled"]: _ctx.disabled,
254
- ["top-input-withCleaner"]: _ctx.addCleaner,
255
- ["top-formsCaptionWrapper"]: _ctx.captionType !== unref(CAPTION_TYPE).NONE,
256
- ["top-formsCaptionWrapper-always"]: _ctx.captionType === unref(CAPTION_TYPE).TOP,
257
- ["top-input-withButton"]: !!_ctx.$slots.btn
258
- }),
259
- "data-top-icon": _ctx.icon
260
- }, [
261
- withDirectives(createElementVNode("input", {
262
- type: "text",
263
- class: normalizeClass({
264
- ["top-forms-focusable"]: !_ctx.disabled,
265
- ["top-input_input"]: true,
266
- ["top-error"]: _ctx.isError
267
- }),
268
- autocomplete: "off_always",
269
- name: _ctx.name,
270
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
271
- title: _ctx.title,
272
- placeholder: placeholder.value,
273
- disabled: _ctx.disabled,
274
- readonly: _ctx.readonly,
275
- onKeydown: _cache[1] || (_cache[1] = withKeys(() => (_ctx.addCleaner || !!_ctx.$slots.btn) && clean(), ["esc"]))
276
- }, null, 42, _hoisted_2), [
277
- [vModelText, value.value]
278
- ]),
279
- _ctx.addCleaner && value.value ? (openBlock(), createElementBlock("span", {
280
- key: 0,
281
- class: "top-input_cleaner top-cleaner",
282
- "data-top-icon": "",
283
- onClick: clean
284
- })) : createCommentVNode("", true),
285
- value.value ? renderSlot(_ctx.$slots, "btn", { key: 1 }) : createCommentVNode("", true),
286
- renderSlot(_ctx.$slots, "default"),
287
- _ctx.captionType !== unref(CAPTION_TYPE).NONE ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
288
- ], 10, _hoisted_1$2);
289
- };
290
- }
291
- });
292
- const style0$2 = {
293
- "top-input": "top-input",
294
- "top-input_input": "top-input_input",
295
- "top-input-withCleaner": "top-input-withCleaner"
296
- };
297
- const cssModules$2 = {
298
- "$style": style0$2
299
- };
300
- const input = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
301
- const _hoisted_1$1 = ["name", "value", "checked", "disabled"];
302
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
303
- __name: "radio",
304
- props: {
305
- name: {},
306
- value: {},
307
- title: {},
308
- description: {},
309
- checked: { type: Boolean },
310
- disabled: { type: Boolean },
311
- isError: { type: Boolean }
312
- },
313
- setup(__props) {
314
- return (_ctx, _cache) => {
315
- return openBlock(), createElementBlock("label", {
316
- class: normalizeClass({
317
- ["top-forms-optionWrapper"]: true,
318
- ["top-radio"]: true,
319
- ["top-radio_" + _ctx.name]: _ctx.name !== "",
320
- ["top-active"]: _ctx.checked,
321
- ["top-disabled"]: _ctx.disabled,
322
- ["top-error"]: _ctx.isError && !_ctx.disabled
323
- })
324
- }, [
325
- createElementVNode("input", {
326
- type: "radio",
327
- class: normalizeClass({
328
- ["top-forms-focusable"]: !_ctx.disabled,
329
- ["top-forms-option"]: true,
330
- ["top-radio_input"]: true,
331
- ["top-error"]: _ctx.isError && !_ctx.disabled
332
- }),
333
- name: _ctx.name,
334
- value: _ctx.value,
335
- checked: _ctx.checked,
336
- disabled: _ctx.disabled
337
- }, null, 10, _hoisted_1$1),
338
- _ctx.title ? (openBlock(), createBlock(ControlLabel, {
339
- key: 0,
340
- title: _ctx.title,
341
- description: _ctx.description,
342
- disabled: _ctx.disabled
343
- }, null, 8, ["title", "description", "disabled"])) : createCommentVNode("", true)
344
- ], 2);
345
- };
346
- }
347
- });
348
- const style0$1 = {
349
- "top-radio": "top-radio",
350
- "top-radio_input": "top-radio_input",
351
- "top-error": "top-error"
352
- };
353
- const cssModules$1 = {
354
- "$style": style0$1
355
- };
356
- const radio = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
357
- const _hoisted_1 = ["name", "value", "checked", "disabled"];
358
- const _sfc_main = /* @__PURE__ */ defineComponent({
359
- __name: "switcher",
360
- props: {
361
- name: {},
362
- value: {},
363
- title: {},
364
- description: {},
365
- checked: { type: Boolean },
366
- disabled: { type: Boolean },
367
- isError: { type: Boolean },
368
- isSwitcher: { type: Boolean }
369
- },
370
- setup(__props) {
371
- return (_ctx, _cache) => {
372
- return openBlock(), createElementBlock("label", {
373
- class: normalizeClass({
374
- ["top-forms-optionWrapper"]: true,
375
- ["top-checkboxSwitcher"]: true,
376
- ["top-active"]: _ctx.checked,
377
- ["top-disabled"]: _ctx.disabled,
378
- ["top-error"]: _ctx.isError && !_ctx.disabled
379
- })
380
- }, [
381
- createElementVNode("input", {
382
- type: "checkbox",
383
- class: normalizeClass({
384
- ["top-forms-focusable"]: !_ctx.disabled,
385
- ["top-forms-option"]: true,
386
- ["top-checkboxSwitcher_input"]: true,
387
- ["top-error"]: _ctx.isError && !_ctx.disabled
388
- }),
389
- name: _ctx.name,
390
- value: _ctx.value,
391
- checked: _ctx.checked,
392
- disabled: _ctx.disabled
393
- }, null, 10, _hoisted_1),
394
- _ctx.title ? (openBlock(), createBlock(ControlLabel, {
395
- key: 0,
396
- title: _ctx.title,
397
- description: _ctx.description,
398
- disabled: _ctx.disabled
399
- }, null, 8, ["title", "description", "disabled"])) : createCommentVNode("", true)
400
- ], 2);
401
- };
402
- }
403
- });
404
- const style0 = {
405
- "top-checkboxSwitcher": "top-checkboxSwitcher",
406
- "top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
407
- "top-error": "top-error"
408
- };
409
- const cssModules = {
410
- "$style": style0
411
- };
412
- const switcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
413
- export {
414
- ControlLabel as C,
415
- SIZE as S,
416
- button as b,
417
- checkbox as c,
418
- input as i,
419
- radio as r,
420
- switcher as s
421
- };
422
- //# sourceMappingURL=forms-5e17154c.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forms-5e17154c.es.js","sources":["../../src/components/forms/helpers.ts","../../src/components/forms/button/button.ts","../../src/components/forms/button/button.vue","../../src/components/forms/input/input.ts","../../src/components/forms/input/input.vue"],"sourcesContent":["/**\r\n * Размеры\r\n */\r\nexport enum SIZE {\r\n\tS = 's',\r\n\tL = 'l',\r\n\tXL = 'xl',\r\n}","import type { VNode } from 'vue';\r\nimport { SIZE } from '@/components/forms/helpers';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tcolor?: COLOR\r\n\tstyling?: STYLING // bug: name = style init with object type\r\n\tsize?: SIZE\r\n\r\n\tname?: string\r\n\ttitle?: string\r\n\ticon?: string\r\n\ticon2?: string\r\n\r\n\thref?: string // если установлена ссылка, isSubmit не может быть true\r\n\t// value?: string\r\n\r\n\tdisabled?: boolean\r\n\tisSubmit?: boolean\r\n\tisActive?: boolean\r\n\tisProgress?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits { }\r\n\r\n/**\r\n * Цвета\r\n */\r\nexport enum COLOR {\r\n\tTheme = 'theme',\r\n\tBlue = 'blue',\r\n\tGreen = 'green',\r\n\tOrange = 'orange',\r\n\tRed = 'red',\r\n\tPink = 'pink',\r\n}\r\n\r\n/**\r\n * Стили\r\n */\r\nexport enum STYLING {\r\n\tRegular = '',\r\n\tOutline = 'outline',\r\n\tSoft = 'soft',\r\n\tTransparent = 'transparent',\r\n}\r\n\r\nexport { SIZE };","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props } from './button';\r\nimport { COLOR, STYLING, SIZE } from './button';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tcolor: COLOR.Blue,\r\n\tstyling: STYLING.Regular,\r\n\tsize: SIZE.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>{{ !icon ? 'Button' : '' }}</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>","import type { VNode } from 'vue';\r\nimport { SIZE } from '@/components/forms/helpers';\r\n\r\n/**\r\n * Определение параметров\r\n */\r\nexport interface Props {\r\n\tmodelValue?: string\r\n\r\n\tname?: string\r\n\tdisabled?: boolean\r\n\treadonly?: boolean\r\n\r\n\ttitle?: string\r\n\tcaptionType?: CAPTION_TYPE\r\n\r\n\tsize?: SIZE\r\n\ticon?: string\r\n\taddCleaner?: boolean\r\n\tisError?: boolean\r\n}\r\n\r\n/**\r\n * Определение слотов\r\n */\r\nexport interface Slots {\r\n\t/**\r\n\t * Cлот с проивзольным содержимым\r\n\t */\r\n\tdefault(): VNode[];\r\n\tbtn(): VNode[];\r\n}\r\n\r\n/**\r\n * Определение событий\r\n */\r\nexport interface Emits {\r\n\t(e: 'update:modelValue', value?: string): void\r\n}\r\n\r\n/**\r\n * Типы заголовка\r\n */\r\nexport enum CAPTION_TYPE {\r\n\tNONE = '',\r\n\tSLIDE = 'slide',\r\n\tTOP = 'top',\r\n}\r\n\r\nexport { SIZE };","<script setup lang=\"ts\">\r\nimport { computed } from 'vue';\r\nimport type { Props, Emits } from './input';\r\nimport { SIZE, CAPTION_TYPE } from './input';\r\n\r\nconst props = withDefaults(defineProps<Props>(), {\r\n\tsize: SIZE.S,\r\n\tcaptionType: CAPTION_TYPE.NONE,\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\r\nconst placeholder = computed(() => {\r\n\tif (props.addCleaner && !props.title) {\r\n\t\treturn '';\r\n\t}\r\n\tif (props.captionType !== CAPTION_TYPE.NONE) {\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 !== CAPTION_TYPE.NONE,\r\n\t\t\t['top-formsCaptionWrapper-always']: captionType === CAPTION_TYPE.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=\"value\"\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 && value\"\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=\"value\"\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 !== CAPTION_TYPE.NONE\"\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>"],"names":["SIZE","COLOR","STYLING","CAPTION_TYPE","value"],"mappings":";AAGY,IAAA,yBAAAA,UAAL;AACNA,QAAA,GAAI,IAAA;AACJA,QAAA,GAAI,IAAA;AACJA,QAAA,IAAK,IAAA;AAHMA,SAAAA;AAAA,GAAA,QAAA,CAAA,CAAA;ACwCA,IAAA,0BAAAC,WAAL;AACNA,SAAA,OAAQ,IAAA;AACRA,SAAA,MAAO,IAAA;AACPA,SAAA,OAAQ,IAAA;AACRA,SAAA,QAAS,IAAA;AACTA,SAAA,KAAM,IAAA;AACNA,SAAA,MAAO,IAAA;AANIA,SAAAA;AAAA,GAAA,SAAA,CAAA,CAAA;AAYA,IAAA,4BAAAC,aAAL;AACNA,WAAA,SAAU,IAAA;AACVA,WAAA,SAAU,IAAA;AACVA,WAAA,MAAO,IAAA;AACPA,WAAA,aAAc,IAAA;AAJHA,SAAAA;AAAA,GAAA,WAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;AC5CZ,UAAM,UAAU,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,UAAM,OAAO,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC8BrD,IAAA,iCAAAC,kBAAL;AACNA,gBAAA,MAAO,IAAA;AACPA,gBAAA,OAAQ,IAAA;AACRA,gBAAA,KAAM,IAAA;AAHKA,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AC/BZ,UAAM,QAAQ,SAAS;AAAA,MACtB,MAAO;AACN,eAAO,MAAM;AAAA,MACd;AAAA,MACA,IAAKC,QAAO;AACX,aAAK,qBAAqBA,MAAK;AAAA,MAChC;AAAA,IAAA,CACA;AAEK,UAAA,cAAc,SAAS,MAAM;AAClC,UAAI,MAAM,cAAc,CAAC,MAAM,OAAO;AAC9B,eAAA;AAAA,MACR;AACI,UAAA,MAAM,gBAAgB,aAAa,MAAM;AACrC,eAAA;AAAA,MACR;AAEA,aAAO,MAAM;AAAA,IAAA,CACb;AAED,UAAM,QAAQ,MAAM;AACnB,WAAK,qBAAqB,EAAE;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +0,0 @@
1
- define(["exports", "../.chunks/forms-2abb7eaa.amd", "vue"], function(exports, forms, vue) {
2
- "use strict"; vue = vue ?? Vue;
3
- exports.SIZE = forms.SIZE;
4
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
5
- });
6
- //# sourceMappingURL=helpers.amd.js.map
@@ -1,6 +0,0 @@
1
- import { S } from "../.chunks/forms-5e17154c.es.js";
2
- import "vue";
3
- export {
4
- S as SIZE
5
- };
6
- //# sourceMappingURL=helpers.js.map
File without changes