@topvisor/ui 0.0.15 → 0.0.17

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 (69) hide show
  1. package/.chunks/core-0b2c7817.es.js +152 -0
  2. package/.chunks/core-0b2c7817.es.js.map +1 -0
  3. package/.chunks/core-51f7b679.amd.js +151 -0
  4. package/.chunks/core-51f7b679.amd.js.map +1 -0
  5. package/.chunks/{forms-5e17154c.es.js → forms-245e3bc0.es.js} +175 -32
  6. package/.chunks/forms-245e3bc0.es.js.map +1 -0
  7. package/.chunks/forms-f7b7b259.amd.js +568 -0
  8. package/.chunks/forms-f7b7b259.amd.js.map +1 -0
  9. package/.chunks/popup-8f650530.amd.js +728 -0
  10. package/.chunks/popup-8f650530.amd.js.map +1 -0
  11. package/.chunks/popup-d240ed19.es.js +731 -0
  12. package/.chunks/popup-d240ed19.es.js.map +1 -0
  13. package/README.md +62 -62
  14. package/common/common.amd.js +1 -1
  15. package/core/core.amd.js +5 -0
  16. package/core/core.amd.js.map +1 -0
  17. package/core/core.js +7 -0
  18. package/core/core.js.map +1 -0
  19. package/core.css +647 -658
  20. package/dark.css +135 -135
  21. package/editArea/editArea.amd.js +126 -0
  22. package/editArea/editArea.amd.js.map +1 -0
  23. package/editArea/editArea.js +123 -0
  24. package/editArea/editArea.js.map +1 -0
  25. package/editArea.css +61 -0
  26. package/forms/forms.amd.js +5 -3
  27. package/forms/forms.amd.js.map +1 -1
  28. package/forms/forms.js +6 -4
  29. package/{helpers → forms}/helpers.amd.js +2 -2
  30. package/{helpers → forms}/helpers.js +1 -1
  31. package/forms.css +344 -254
  32. package/icomoon/demo-files/demo.css +161 -161
  33. package/icomoon/demo-files/demo.js +30 -30
  34. package/icomoon/demo.html +2945 -2931
  35. package/icomoon/fonts/Topvisor-2.svg +232 -231
  36. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  37. package/icomoon/fonts/Topvisor-2.woff +0 -0
  38. package/icomoon/selection.json +1 -1
  39. package/icomoon/style.css +647 -644
  40. package/light.css +135 -135
  41. package/package.json +19 -19
  42. package/popup/popup.amd.js +198 -0
  43. package/popup/popup.amd.js.map +1 -0
  44. package/popup/popup.js +198 -0
  45. package/popup/popup.js.map +1 -0
  46. package/popup/worker.amd.js +234 -0
  47. package/popup/worker.amd.js.map +1 -0
  48. package/popup/worker.js +237 -0
  49. package/popup/worker.js.map +1 -0
  50. package/popup.css +19 -0
  51. package/tabs/tabs.amd.js +123 -0
  52. package/tabs/tabs.amd.js.map +1 -0
  53. package/tabs/tabs.js +120 -0
  54. package/tabs/tabs.js.map +1 -0
  55. package/tabs.css +60 -0
  56. package/utils/device.amd.js +42 -0
  57. package/utils/device.amd.js.map +1 -0
  58. package/utils/device.js +41 -0
  59. package/utils/device.js.map +1 -0
  60. package/utils/dom.amd.js +95 -0
  61. package/utils/dom.amd.js.map +1 -0
  62. package/utils/dom.js +94 -0
  63. package/utils/dom.js.map +1 -0
  64. package/.chunks/forms-2abb7eaa.amd.js +0 -425
  65. package/.chunks/forms-2abb7eaa.amd.js.map +0 -1
  66. package/.chunks/forms-5e17154c.es.js.map +0 -1
  67. package/icomoon/demo-files/Read Me.txt +0 -7
  68. /package/{helpers → forms}/helpers.amd.js.map +0 -0
  69. /package/{helpers → forms}/helpers.js.map +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, createElementVNode, createCommentVNode, unref, withDirectives, withKeys, vModelText } from "vue";
1
+ import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, normalizeClass, withCtx, renderSlot, createTextVNode, toDisplayString, createElementBlock, useCssVars, resolveDirective, withDirectives, createElementVNode, mergeProps, vModelText, createCommentVNode, vModelCheckbox, unref, withKeys, vModelRadio } from "vue";
2
2
  var SIZE = /* @__PURE__ */ ((SIZE2) => {
3
3
  SIZE2["S"] = "s";
4
4
  SIZE2["L"] = "l";
@@ -21,7 +21,7 @@ var STYLING = /* @__PURE__ */ ((STYLING2) => {
21
21
  STYLING2["Transparent"] = "transparent";
22
22
  return STYLING2;
23
23
  })(STYLING || {});
24
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
24
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
25
25
  __name: "button",
26
26
  props: {
27
27
  color: { default: COLOR.Blue },
@@ -72,8 +72,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
72
72
  };
73
73
  }
74
74
  });
75
- const progress = "_progress_1f1nw_1";
76
- const style0$5 = {
75
+ const progress = "_progress_1hqxk_1";
76
+ const style0$7 = {
77
77
  "top-button": "top-button",
78
78
  "top-active": "top-active",
79
79
  "top-button-progress": "top-button-progress",
@@ -97,10 +97,117 @@ const _export_sfc = (sfc, props) => {
97
97
  }
98
98
  return target;
99
99
  };
100
+ const cssModules$7 = {
101
+ "$style": style0$7
102
+ };
103
+ const Button = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$7]]);
104
+ const _hoisted_1$6 = ["title"];
105
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
106
+ __name: "hint",
107
+ props: {
108
+ hint: {}
109
+ },
110
+ setup(__props) {
111
+ return (_ctx, _cache) => {
112
+ return openBlock(), createElementBlock("span", {
113
+ class: "top-hint",
114
+ "data-top-icon": "",
115
+ title: _ctx.hint
116
+ }, null, 8, _hoisted_1$6);
117
+ };
118
+ }
119
+ });
120
+ const style0$6 = {
121
+ "top-hint": "top-hint"
122
+ };
123
+ const cssModules$6 = {
124
+ "$style": style0$6
125
+ };
126
+ const Hint = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$6]]);
127
+ const _hoisted_1$5 = ["name", "placeholder", "disabled", "readonly", "rows"];
128
+ const _hoisted_2$2 = {
129
+ key: 0,
130
+ class: "top-textarea_pseudoContent"
131
+ };
132
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
133
+ __name: "textarea",
134
+ props: {
135
+ modelValue: {},
136
+ name: {},
137
+ placeholder: {},
138
+ rows: { default: 5 },
139
+ minHeight: { default: 120 },
140
+ expandable: { type: Boolean },
141
+ disabled: { type: Boolean },
142
+ readonly: { type: Boolean },
143
+ isError: { type: Boolean },
144
+ hint: {}
145
+ },
146
+ emits: ["update:modelValue"],
147
+ setup(__props, { emit }) {
148
+ const props = __props;
149
+ useCssVars((_ctx) => ({
150
+ "bcf6b9ae": _ctx.minHeight + "px"
151
+ }));
152
+ const value = computed({
153
+ get() {
154
+ return props.modelValue;
155
+ },
156
+ set(value2) {
157
+ emit("update:modelValue", value2);
158
+ }
159
+ });
160
+ return (_ctx, _cache) => {
161
+ const _directive_tv_tooltip = resolveDirective("tv-tooltip");
162
+ return openBlock(), createElementBlock("label", {
163
+ class: normalizeClass({
164
+ ["top-textarea"]: true,
165
+ ["top-textarea-" + _ctx.name]: _ctx.name,
166
+ ["top-disabled"]: _ctx.disabled
167
+ })
168
+ }, [
169
+ withDirectives(createElementVNode("textarea", mergeProps({
170
+ type: "text",
171
+ class: {
172
+ ["top-forms-focusable"]: !_ctx.disabled,
173
+ ["top-textarea_textarea"]: true,
174
+ ["top-textarea_textarea-expandable"]: _ctx.expandable,
175
+ ["top-error"]: _ctx.isError
176
+ },
177
+ autocomplete: "off_always",
178
+ name: _ctx.name,
179
+ placeholder: _ctx.placeholder,
180
+ disabled: _ctx.disabled,
181
+ readonly: _ctx.readonly,
182
+ rows: !_ctx.expandable ? _ctx.rows : void 0
183
+ }, _ctx.$attrs, {
184
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
185
+ }), null, 16, _hoisted_1$5), [
186
+ [vModelText, value.value]
187
+ ]),
188
+ _ctx.expandable ? (openBlock(), createElementBlock("div", _hoisted_2$2, toDisplayString(value.value + " "), 1)) : createCommentVNode("", true),
189
+ _ctx.hint ? withDirectives((openBlock(), createBlock(Hint, {
190
+ key: 1,
191
+ class: "top-textarea_hint",
192
+ hint: _ctx.hint
193
+ }, null, 8, ["hint"])), [
194
+ [_directive_tv_tooltip]
195
+ ]) : createCommentVNode("", true)
196
+ ], 2);
197
+ };
198
+ }
199
+ });
200
+ const style0$5 = {
201
+ "top-textarea": "top-textarea",
202
+ "top-textarea_textarea": "top-textarea_textarea",
203
+ "top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
204
+ "top-textarea_pseudoContent": "top-textarea_pseudoContent",
205
+ "top-textarea_hint": "top-textarea_hint"
206
+ };
100
207
  const cssModules$5 = {
101
208
  "$style": style0$5
102
209
  };
103
- const button = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
210
+ const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
104
211
  const _hoisted_1$4 = { class: "top-forms-optionLabel" };
105
212
  const _hoisted_2$1 = {
106
213
  key: 0,
@@ -137,32 +244,41 @@ const cssModules$4 = {
137
244
  "$style": style0$4
138
245
  };
139
246
  const ControlLabel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
140
- const _hoisted_1$3 = ["name", "value", "checked", "indeterminate", "disabled"];
247
+ const _hoisted_1$3 = ["name", "value", "indeterminate", "disabled"];
141
248
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
142
249
  __name: "checkbox",
143
250
  props: {
251
+ modelValue: { type: [Boolean, Array, Set] },
144
252
  name: {},
145
253
  value: {},
146
254
  title: {},
147
255
  description: {},
148
- checked: { type: Boolean },
149
256
  disabled: { type: Boolean },
150
257
  indeterminate: { type: Boolean },
151
258
  isError: { type: Boolean }
152
259
  },
153
- setup(__props) {
260
+ emits: ["update:modelValue"],
261
+ setup(__props, { emit }) {
262
+ const props = __props;
263
+ const localValue = computed({
264
+ get() {
265
+ return props.modelValue;
266
+ },
267
+ set(value) {
268
+ emit("update:modelValue", value);
269
+ }
270
+ });
154
271
  return (_ctx, _cache) => {
155
272
  return openBlock(), createElementBlock("label", {
156
273
  class: normalizeClass({
157
274
  ["top-forms-optionWrapper"]: true,
158
275
  ["top-checkbox"]: true,
159
276
  ["top-checkbox_" + _ctx.name]: _ctx.name !== "",
160
- ["top-active"]: _ctx.checked,
161
277
  ["top-disabled"]: _ctx.disabled,
162
278
  ["top-error"]: _ctx.isError && !_ctx.disabled
163
279
  })
164
280
  }, [
165
- createElementVNode("input", {
281
+ withDirectives(createElementVNode("input", {
166
282
  type: "checkbox",
167
283
  class: normalizeClass({
168
284
  ["top-forms-focusable"]: !_ctx.disabled,
@@ -171,11 +287,13 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
171
287
  ["top-error"]: _ctx.isError && !_ctx.disabled
172
288
  }),
173
289
  name: _ctx.name,
290
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
174
291
  value: _ctx.value,
175
- checked: _ctx.checked,
176
292
  indeterminate: _ctx.indeterminate,
177
293
  disabled: _ctx.disabled
178
- }, null, 10, _hoisted_1$3),
294
+ }, null, 10, _hoisted_1$3), [
295
+ [vModelCheckbox, localValue.value]
296
+ ]),
179
297
  _ctx.title ? (openBlock(), createBlock(ControlLabel, {
180
298
  key: 0,
181
299
  title: _ctx.title,
@@ -298,31 +416,40 @@ const cssModules$2 = {
298
416
  "$style": style0$2
299
417
  };
300
418
  const input = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
301
- const _hoisted_1$1 = ["name", "value", "checked", "disabled"];
419
+ const _hoisted_1$1 = ["name", "value", "disabled"];
302
420
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
303
421
  __name: "radio",
304
422
  props: {
305
- name: {},
423
+ modelValue: {},
306
424
  value: {},
425
+ name: {},
307
426
  title: {},
308
427
  description: {},
309
- checked: { type: Boolean },
310
428
  disabled: { type: Boolean },
311
429
  isError: { type: Boolean }
312
430
  },
313
- setup(__props) {
431
+ emits: ["update:modelValue"],
432
+ setup(__props, { emit }) {
433
+ const props = __props;
434
+ const localValue = computed({
435
+ get() {
436
+ return props.modelValue;
437
+ },
438
+ set(value) {
439
+ emit("update:modelValue", value);
440
+ }
441
+ });
314
442
  return (_ctx, _cache) => {
315
443
  return openBlock(), createElementBlock("label", {
316
444
  class: normalizeClass({
317
445
  ["top-forms-optionWrapper"]: true,
318
446
  ["top-radio"]: true,
319
447
  ["top-radio_" + _ctx.name]: _ctx.name !== "",
320
- ["top-active"]: _ctx.checked,
321
448
  ["top-disabled"]: _ctx.disabled,
322
449
  ["top-error"]: _ctx.isError && !_ctx.disabled
323
450
  })
324
451
  }, [
325
- createElementVNode("input", {
452
+ withDirectives(createElementVNode("input", {
326
453
  type: "radio",
327
454
  class: normalizeClass({
328
455
  ["top-forms-focusable"]: !_ctx.disabled,
@@ -330,11 +457,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
330
457
  ["top-radio_input"]: true,
331
458
  ["top-error"]: _ctx.isError && !_ctx.disabled
332
459
  }),
460
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
333
461
  name: _ctx.name,
334
462
  value: _ctx.value,
335
- checked: _ctx.checked,
336
463
  disabled: _ctx.disabled
337
- }, null, 10, _hoisted_1$1),
464
+ }, null, 10, _hoisted_1$1), [
465
+ [vModelRadio, localValue.value]
466
+ ]),
338
467
  _ctx.title ? (openBlock(), createBlock(ControlLabel, {
339
468
  key: 0,
340
469
  title: _ctx.title,
@@ -354,31 +483,39 @@ const cssModules$1 = {
354
483
  "$style": style0$1
355
484
  };
356
485
  const radio = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
357
- const _hoisted_1 = ["name", "value", "checked", "disabled"];
486
+ const _hoisted_1 = ["name", "value", "disabled"];
358
487
  const _sfc_main = /* @__PURE__ */ defineComponent({
359
488
  __name: "switcher",
360
489
  props: {
490
+ modelValue: { type: [Boolean, Array, Set] },
361
491
  name: {},
362
492
  value: {},
363
493
  title: {},
364
494
  description: {},
365
- checked: { type: Boolean },
366
495
  disabled: { type: Boolean },
367
- isError: { type: Boolean },
368
- isSwitcher: { type: Boolean }
496
+ isError: { type: Boolean }
369
497
  },
370
- setup(__props) {
498
+ emits: ["update:modelValue"],
499
+ setup(__props, { emit }) {
500
+ const props = __props;
501
+ const localValue = computed({
502
+ get() {
503
+ return props.modelValue;
504
+ },
505
+ set(value) {
506
+ emit("update:modelValue", value);
507
+ }
508
+ });
371
509
  return (_ctx, _cache) => {
372
510
  return openBlock(), createElementBlock("label", {
373
511
  class: normalizeClass({
374
512
  ["top-forms-optionWrapper"]: true,
375
513
  ["top-checkboxSwitcher"]: true,
376
- ["top-active"]: _ctx.checked,
377
514
  ["top-disabled"]: _ctx.disabled,
378
515
  ["top-error"]: _ctx.isError && !_ctx.disabled
379
516
  })
380
517
  }, [
381
- createElementVNode("input", {
518
+ withDirectives(createElementVNode("input", {
382
519
  type: "checkbox",
383
520
  class: normalizeClass({
384
521
  ["top-forms-focusable"]: !_ctx.disabled,
@@ -386,11 +523,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
386
523
  ["top-checkboxSwitcher_input"]: true,
387
524
  ["top-error"]: _ctx.isError && !_ctx.disabled
388
525
  }),
526
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
389
527
  name: _ctx.name,
390
528
  value: _ctx.value,
391
- checked: _ctx.checked,
392
529
  disabled: _ctx.disabled
393
- }, null, 10, _hoisted_1),
530
+ }, null, 10, _hoisted_1), [
531
+ [vModelCheckbox, localValue.value]
532
+ ]),
394
533
  _ctx.title ? (openBlock(), createBlock(ControlLabel, {
395
534
  key: 0,
396
535
  title: _ctx.title,
@@ -411,12 +550,16 @@ const cssModules = {
411
550
  };
412
551
  const switcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
413
552
  export {
414
- ControlLabel as C,
553
+ Button as B,
554
+ COLOR as C,
555
+ Hint as H,
415
556
  SIZE as S,
416
- button as b,
557
+ Textarea as T,
558
+ _export_sfc as _,
559
+ ControlLabel as a,
417
560
  checkbox as c,
418
561
  input as i,
419
562
  radio as r,
420
563
  switcher as s
421
564
  };
422
- //# sourceMappingURL=forms-5e17154c.es.js.map
565
+ //# sourceMappingURL=forms-245e3bc0.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forms-245e3bc0.es.js","sources":["../../src/components/forms/helpers.ts","../../src/components/forms/button/button.ts","../../src/components/forms/button/button.vue","../../src/components/forms/textarea/textarea.vue","../../src/components/forms/checkbox/checkbox.vue","../../src/components/forms/input/input.ts","../../src/components/forms/input/input.vue","../../src/components/forms/radio/radio.vue","../../src/components/forms/switcher/switcher.vue"],"sourcesContent":["/**\n * Размеры\n */\nexport enum SIZE {\n\tS = 's',\n\tL = 'l',\n\tXL = 'xl',\n}","import type { VNode } from 'vue';\nimport { SIZE } from '@/components/forms/helpers';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tcolor?: COLOR\n\tstyling?: STYLING // bug: name = style init with object type\n\tsize?: SIZE\n\n\tname?: string\n\ttitle?: string\n\ticon?: string\n\ticon2?: string\n\n\thref?: string // если установлена ссылка, isSubmit не может быть true\n\t// value?: string\n\n\tdisabled?: boolean\n\tisSubmit?: boolean\n\tisActive?: boolean\n\tisProgress?: boolean\n}\n\n// /**\n// * Определение слотов\n// */\n// export interface Slots {\n// \t/**\n// \t * Слот с проивзольным содержимым\n// \t */\n// \tdefault(): VNode[];\n// }\n\n/**\n * Определение событий\n */\nexport interface Emits { }\n\n/**\n * Цвета\n */\nexport enum COLOR {\n\tTheme = 'theme',\n\tBlue = 'blue',\n\tGreen = 'green',\n\tOrange = 'orange',\n\tRed = 'red',\n\tPink = 'pink',\n}\n\n/**\n * Стили\n */\nexport enum STYLING {\n\tRegular = '',\n\tOutline = 'outline',\n\tSoft = 'soft',\n\tTransparent = 'transparent',\n}\n\nexport { SIZE };","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props } from './button';\nimport { COLOR, STYLING, SIZE } from './button';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tcolor: COLOR.Blue,\n\tstyling: STYLING.Regular,\n\tsize: SIZE.S,\n});\n\nconst tagName = computed(() => props.href ? 'a' : 'button');\n\nconst type = computed(() => props.isSubmit ? 'submit' : undefined);\n</script>\n\n<template>\n\t<component\n\t\t:is=\"tagName\"\n\t\t:class=\"{\n\t\t\t['top-active']: isActive,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t['top-button']: true,\n\t\t\t['top-button-progress']: isProgress,\n\t\t\t[`top-size_${size}`]: !!size,\n\t\t\t[`top-color_${color}`]: true,\n\t\t\t[`top-style_${styling}`]: !!styling,\n\t\t}\"\n\t\t:name=\"name\"\n\t\t:title=\"title\"\n\t\t:href=\"href\"\n\t\t:type=\"type\"\n\t\t:data-top-icon=\"icon || undefined\"\n\t\t:data-top-icon2=\"icon2 || undefined\"\n\t\t:disabled=\"disabled || undefined\"\n\t\t:inProgress=\"isProgress\"\n\t>\n\t\t<!-- @slot Текст или HTML в кнопке -->\n\t\t<slot>\n\t\t\t{{ !icon ? 'Button' : '' }}\n\t\t</slot>\n\t</component>\n</template>\n\n<style module>\n@import \"./style/button.css\";\n@import \"./style/style-outline.css\";\n@import \"./style/style-soft.css\";\n@import \"./style/style-transparent.css\";\n\n.top-button {\n\t--top-button-color: var(--color-white);\n\t--top-button-background-color: transparent;\n\t--top-button-background-color-hover: var(--top-button-background-color);\n\t--top-button-background-color-active: var(--top-button-background-color-hover);\n\t--top-button-background-color-selected: var(--top-button-background-color-hover);\n\t--top-button-box-shadow: none;\n\t--top-button-box-shadow-hover: var(--top-shadow-darken-2);\n\t--top-button-box-shadow-active: var(--top-shadow-darken-3);\n\t--top-button-box-shadow-selected: var(--top-shadow-darken-3);\n\t--top-forms-border-width: 0px;\n\t--top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n\t--top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n\n.top-button.top-size_l {\n\t--top-forms-padding: var(--top-forms-padding_l);\n\t--top-forms-base-height: var(--top-forms-base-height_l);\n}\n\n.top-button.top-size_xl {\n\t--top-forms-padding: var(--top-forms-padding_xl);\n\t--top-forms-base-height: var(--top-forms-base-height_xl);\n}\n</style>","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport Hint from '@/components/forms/hint/hint.vue';\nimport type { Props, Emits } from './textarea';\n\nconst props = withDefaults(defineProps<Props>(), {\n\trows: 5,\n\tminHeight: 120,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = computed({\n\tget () {\n\t\treturn props.modelValue;\n\t},\n\tset (value) {\n\t\temit('update:modelValue', value);\n\t},\n});\n</script>\n\n<template>\n\t<label\n\t\t:class=\"{\n\t\t\t['top-textarea']: true,\n\t\t\t['top-textarea-' + name]: name,\n\t\t\t['top-disabled']: disabled,\n\t\t}\"\n\t>\n\t\t<textarea\n\t\t\ttype=\"text\"\n\t\t\t:class=\"{\n\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t['top-textarea_textarea']: true,\n\t\t\t\t['top-textarea_textarea-expandable']: expandable,\n\t\t\t\t['top-error']: isError,\n\t\t\t}\"\n\t\t\tautocomplete=\"off_always\"\n\t\t\t:name=\"name\"\n\t\t\t:placeholder=\"placeholder\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:readonly=\"readonly\"\n\t\t\t:rows=\"!expandable ? rows : undefined\"\n\t\t\t:=\"$attrs\"\n\t\t\tv-model=\"value\"\n\t\t/>\n\n\t\t<div\n\t\t\tv-if=\"expandable\"\n\t\t\tclass=\"top-textarea_pseudoContent\"\n\t\t>\n\t\t\t{{ value + ' ' }}\n\t\t</div>\n\n\t\t<Hint\n\t\t\tv-if=\"hint\"\n\t\t\tclass=\"top-textarea_hint\"\n\t\t\t:hint=\"hint\"\n\t\t\tv-tv-tooltip\n\t\t/>\n\t</label>\n</template>\n\n<style module>\n.top-textarea {\n\twidth: 180px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tposition: relative;\n}\n\n.top-textarea_textarea {\n\tbackground: var(--top-forms-background-color);\n\twidth: 100%;\n\tpadding: var(--top-forms-padding);\n\tresize: none;\n}\n\n.top-textarea_textarea:hover {\n\tbackground: var(--top-forms-background-color-hover);\n}\n\n.top-textarea_textarea:focus {\n\toutline-color: var(--color-theme-75);\n\toutline-offset: 0px;\n}\n\n.top-textarea_textarea.top-textarea_textarea-expandable {\n\twidth: 100%;\n\theight: 100%;\n\toverflow: hidden;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n}\n\n.top-textarea_pseudoContent {\n\tbox-sizing: border-box;\n\tmin-height: v-bind(minHeight + 'px');\n\tpadding: var(--top-forms-padding);\n\tfont-size: 14px;\n\twhite-space: pre-wrap;\n\toverflow-wrap: anywhere;\n\tpointer-events: none;\n\topacity: 0;\n\tz-index: -1;\n}\n\n.top-textarea_hint {\n\tposition: absolute;\n\ttop: 2px;\n\tright: 2px;\n}\n</style>","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props, Emits } from './checkbox';\nimport ControlLabel from '../controlLabel/controlLabel.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst localValue = computed({\n\tget () {\n\t\treturn props.modelValue;\n\t},\n\tset (value) {\n\t\temit('update:modelValue', value);\n\t},\n});\n\n</script>\n\n<template>\n\t<label :class=\"{\n\t\t['top-forms-optionWrapper']: true,\n\t\t['top-checkbox']: true,\n\t\t['top-checkbox_' + name]: name !== '',\n\t\t['top-disabled']: disabled,\n\t\t['top-error']: isError && !disabled,\n\t}\">\n\t\t<input\n\t\t\ttype=\"checkbox\"\n\t\t\t:class=\"{\n\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t['top-forms-option']: true,\n\t\t\t\t['top-checkbox_input']: true,\n\t\t\t\t['top-error']: isError && !disabled,\n\t\t\t}\"\n\t\t\t:name=\"name\"\n\t\t\tv-model=\"localValue\"\n\t\t\t:value=\"value\"\n\t\t\t:indeterminate=\"indeterminate\"\n\t\t\t:disabled=\"disabled\"\n\t\t>\n\n\t\t<ControlLabel\n\t\t\tv-if=\"title\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:disabled=\"disabled\"\n\t\t/>\n\t</label>\n</template>\n\n<style module>\n.top-checkbox {\n\tcursor: pointer;\n\tdisplay: inline-flex;\n}\n\n.top-checkbox_input {\n\tcursor: inherit;\n\tborder-radius: 4px;\n\tbackground: var(--content-background-color);\n\tborder: 1px solid var(--top-forms-border-color);\n\twidth: calc(var(--top-forms-option-height) - 3px * 2);\n\theight: calc(var(--top-forms-option-height) - 3px * 2);\n}\n\n.top-checkbox_input:before {\n\tcontent: ' ';\n\tcolor: #FFF;\n\tfont-family: 'Topvisor-2';\n\tfont-size: 16px;\n}\n\n.top-checkbox_input:hover {\n\tborder-color: var(--top-forms-option-color);\n\tbackground: var(--color-theme-50)\n}\n\n/* checked / indeterminate */\n.top-checkbox_input:checked,\n.top-checkbox_input:indeterminate {\n\tborder-color: var(--top-forms-option-color);\n\tbackground: var(--top-forms-option-color);\n}\n\n.top-checkbox_input:checked:before {\n\tcontent: '';\n}\n\n.top-checkbox_input:indeterminate:before {\n\tcontent: '';\n}\n\n.top-checkbox_input:checked:hover,\n.top-checkbox_input:indeterminate:hover {\n\tborder-color: var(--top-forms-option-color-hover);\n\tbackground: var(--top-forms-option-color-hover);\n}\n\n/* disabled selected */\n.top-checkbox_input:disabled {\n\tborder-color: var(--color-line-1-opacity);\n\tbackground: var(--color-theme-50);\n}\n\n.top-checkbox_input:checked:disabled,\n.top-checkbox_input:indeterminate:disabled {\n\tborder-color: transparent;\n\tbackground: var(--color-theme-400);\n}\n\n/* isError */\n.top-checkbox_input.top-error {\n\tborder-color: var(--color-negative);\n}\n\n.top-checkbox_input.top-error:hover {\n\tborder-color: var(--color-negative-2);\n}\n\n/* isError selected */\n.top-checkbox_input:checked.top-error,\n.top-checkbox_input:indeterminate.top-error {\n\tbackground: var(--color-negative);\n}\n\n.top-checkbox_input:checked.top-error:hover,\n.top-checkbox_input:indeterminate.top-error:hover {\n\tbackground: var(--color-negative-2);\n}\n</style>","import type { VNode } from 'vue';\nimport { SIZE } from '@/components/forms/helpers';\n\n/**\n * Определение параметров\n */\nexport interface Props {\n\tmodelValue?: string\n\n\tname?: string\n\tdisabled?: boolean\n\treadonly?: boolean\n\n\ttitle?: string\n\tcaptionType?: CAPTION_TYPE\n\n\tsize?: SIZE\n\ticon?: string\n\taddCleaner?: boolean\n\tisError?: boolean\n}\n\n/**\n * Определение слотов\n */\nexport interface Slots {\n\t/**\n\t * Cлот с проивзольным содержимым\n\t */\n\tdefault(): VNode[];\n\tbtn(): VNode[];\n}\n\n/**\n * Определение событий\n */\nexport interface Emits {\n\t(e: 'update:modelValue', value?: string): void\n}\n\n/**\n * Типы заголовка\n */\nexport enum CAPTION_TYPE {\n\tNONE = '',\n\tSLIDE = 'slide',\n\tTOP = 'top',\n}\n\nexport { SIZE };","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props, Emits } from './input';\nimport { SIZE, CAPTION_TYPE } from './input';\n\nconst props = withDefaults(defineProps<Props>(), {\n\tsize: SIZE.S,\n\tcaptionType: CAPTION_TYPE.NONE,\n});\n\nconst emit = defineEmits<Emits>();\n\nconst value = computed({\n\tget () {\n\t\treturn props.modelValue;\n\t},\n\tset (value) {\n\t\temit('update:modelValue', value);\n\t},\n});\n\nconst placeholder = computed(() => {\n\tif (props.addCleaner && !props.title) {\n\t\treturn '';\n\t}\n\tif (props.captionType !== CAPTION_TYPE.NONE) {\n\t\treturn '';\n\t}\n\n\treturn props.title;\n});\n\nconst clean = () => {\n\temit('update:modelValue', '');\n};\n</script>\n\n<template>\n\t<label\n\t\t:class=\"{\n\t\t\t['top-input']: true,\n\t\t\t['top-input-' + name]: name,\n\t\t\t['top-size_' + size]: true,\n\t\t\t['top-disabled']: disabled,\n\t\t\t['top-input-withCleaner']: addCleaner,\n\t\t\t['top-formsCaptionWrapper']: captionType !== CAPTION_TYPE.NONE,\n\t\t\t['top-formsCaptionWrapper-always']: captionType === CAPTION_TYPE.TOP,\n\t\t\t['top-input-withButton']: !!$slots.btn,\n\t\t}\"\n\t\t:data-top-icon=\"icon\"\n\t>\n\t\t<input\n\t\t\ttype=\"text\"\n\t\t\t:class=\"{\n\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t['top-input_input']: true,\n\t\t\t\t['top-error']: isError,\n\t\t\t}\"\n\t\t\tautocomplete=\"off_always\"\n\t\t\t:name=\"name\"\n\t\t\tv-model=\"value\"\n\t\t\t:title=\"title\"\n\t\t\t:placeholder=\"placeholder\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:readonly=\"readonly\"\n\t\t\t@keydown.esc=\"() => (addCleaner || !!$slots.btn) && clean()\"\n\t\t>\n\n\t\t<span\n\t\t\tv-if=\"addCleaner && value\"\n\t\t\tclass=\"top-input_cleaner top-cleaner\"\n\t\t\tdata-top-icon=\"\"\n\t\t\t@click=\"clean\"\n\t\t></span>\n\n\t\t<!-- TODO: кнопка должна отоборажаться только при изменении value -->\n\t\t<!-- TODO: до нажатия на кнопку, изменеине не должно применяться -->\n\t\t<!-- TODO: при отмене состояние должно возвращаться к первоначальному -->\n\t\t<slot\n\t\t\tv-if=\"value\"\n\t\t\tname=\"btn\"\n\t\t/>\n\n\t\t<slot></slot>\n\n\t\t<span\n\t\t\tv-if=\"captionType !== CAPTION_TYPE.NONE\"\n\t\t\tclass=\"top-formsCaption\"\n\t\t>\n\t\t\t{{ title }}\n\t\t</span>\n\t</label>\n</template>\n\n<style module>\n.top-input {\n\twidth: 180px;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tgap: var(--top-gap-1);\n}\n\n.top-input_input {\n\tbackground: var(--top-forms-background-color);\n}\n\n.top-input_input:hover {\n\tbackground: var(--top-forms-background-color-hover);\n}\n\n.top-input_input:focus {\n\toutline-color: var(--color-theme-75);\n\toutline-offset: 0px;\n}\n\n.top-input-withCleaner .top-input_input:not(:placeholder-shown) {\n\t--top-forms_clear-width: 24px;\n}\n\n/* TODO: перенести в inputsRange */\n.top-input_input {\n\twidth: 50%;\n\tflex-grow: 1;\n}\n\n.top-input[data-top-icon]:before {\n\t--top-icon-color: var(--color-text-secondary);\n}\n</style>","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props, Emits } from './radio';\nimport ControlLabel from '../controlLabel/controlLabel.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst localValue = computed({\n\tget () {\n\t\treturn props.modelValue;\n\t},\n\tset (value) {\n\t\temit('update:modelValue', value);\n\t},\n});\n\n</script>\n\n<template>\n\t<label\n\t\t:class=\"{\n\t\t['top-forms-optionWrapper']: true,\n\t\t['top-radio']: true,\n\t\t['top-radio_' + name]: name !== '',\n\t\t['top-disabled']: disabled,\n\t\t['top-error']: isError && !disabled,\n\t}\"\n\t>\n\t\t<input\n\t\t\ttype=\"radio\"\n\t\t\t:class=\"{\n\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t['top-forms-option']: true,\n\t\t\t\t['top-radio_input']: true,\n\t\t\t\t['top-error']: isError && !disabled,\n\t\t\t}\"\n\t\t\tv-model=\"localValue\"\n\t\t\t:name=\"name\"\n\t\t\t:value=\"value\"\n\t\t\t:disabled=\"disabled\"\n\t\t>\n\n\t\t<ControlLabel\n\t\t\tv-if=\"title\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:disabled=\"disabled\"\n\t\t/>\n\t</label>\n</template>\n\n<style module>\n:root {\n\t--top-radio-background-color: var(--content-background-color);\n\t--top-radio-background-color-hover: var(--top-radio-background-color);\n\t--top-radio-background-color-active: var(--top-radio-background-color);\n}\n\n.top-radio {\n\tcursor: pointer;\n}\n\n.top-radio_input {\n\tborder-radius: 50%;\n\tbackground: var(--content-background-color);\n\tborder: 1px solid var(--top-forms-border-color);\n\twidth: calc(var(--top-forms-option-height) - 3px * 2);\n\theight: calc(var(--top-forms-option-height) - 3px * 2);\n}\n\n.top-radio_input:hover {\n\tborder-color: var(--top-forms-option-color);\n\tbackground: var(--color-theme-50)\n}\n\n.top-radio_input:checked {\n\tborder-color: var(--top-forms-option-color);\n\tborder-width: 5px;\n}\n\n.top-radio_input:checked:hover {\n\tborder-color: var(--top-forms-option-color-hover);\n}\n\n/* disabled */\n.top-radio_input:disabled {\n\tborder-color: var(--color-line-1-opacity);\n\tbackground: var(--color-theme-50);\n}\n\n/* disabled selected */\n.top-radio_input:checked:disabled {\n\tborder-color: var(--color-theme-400);\n}\n\n/* isError */\n.top-radio_input.top-error {\n\tborder-color: var(--color-negative);\n}\n\n.top-radio_input.top-error:hover {\n\tborder-color: var(--color-negative-2);\n}\n</style>","<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport type { Props, Emits } from './switcher';\nimport ControlLabel from '../controlLabel/controlLabel.vue';\n\nconst props = defineProps<Props>();\nconst emit = defineEmits<Emits>();\n\nconst localValue = computed({\n\tget () {\n\t\treturn props.modelValue;\n\t},\n\tset (value) {\n\t\temit('update:modelValue', value);\n\t},\n});\n</script>\n\n<template>\n\t<label\n\t\t:class=\"{\n\t\t['top-forms-optionWrapper']: true,\n\t\t['top-checkboxSwitcher']: true,\n\t\t['top-disabled']: disabled,\n\t\t['top-error']: isError && !disabled,\n\t}\"\n\t>\n\t\t<input\n\t\t\ttype=\"checkbox\"\n\t\t\t:class=\"{\n\t\t\t\t['top-forms-focusable']: !disabled,\n\t\t\t\t['top-forms-option']: true,\n\t\t\t\t['top-checkboxSwitcher_input']: true,\n\t\t\t\t['top-error']: isError && !disabled,\n\t\t\t}\"\n\t\t\tv-model=\"localValue\"\n\t\t\t:name=\"name\"\n\t\t\t:value=\"value\"\n\t\t\t:disabled=\"disabled\"\n\t\t>\n\n\t\t<ControlLabel\n\t\t\tv-if=\"title\"\n\t\t\t:title=\"title\"\n\t\t\t:description=\"description\"\n\t\t\t:disabled=\"disabled\"\n\t\t/>\n\t</label>\n</template>\n\n<style module>\n.top-checkboxSwitcher {\n\tcursor: pointer;\n\tdisplay: inline-flex;\n\tgap: 4px;\n}\n\n.top-checkboxSwitcher_input {\n\tborder-radius: 9px;\n\tborder: none;\n\tbackground: var(--color-theme-100);\n\twidth: 36px;\n\theight: 18px;\n\tposition: relative;\n}\n\n.top-checkboxSwitcher_input:before {\n\tcontent: '';\n\tborder-radius: 50%;\n\tbackground: var(--color-white);\n\twidth: 12px;\n\theight: 12px;\n\tmargin: 3px;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\n\ttransition: left 0.1s;\n}\n\n.top-checkboxSwitcher_input:hover {\n\tbackground: var(--color-theme-150);\n}\n\n/* checked */\n.top-checkboxSwitcher_input:checked {\n\tbackground: var(--top-forms-option-color);\n}\n\n.top-checkboxSwitcher_input:checked:hover {\n\tbackground: var(--top-forms-option-color-hover);\n}\n\n.top-checkboxSwitcher_input:checked:before {\n\tleft: 50%;\n}\n\n/* disabled */\n.top-checkboxSwitcher_input:disabled {\n\tbackground: var(--color-theme-400);\n}\n\n/* isError */\n.top-checkboxSwitcher_input.top-error {\n\tbackground: var(--color-negative);\n}\n\n.top-checkboxSwitcher_input.top-error:hover {\n\tbackground: var(--color-negative-2);\n}\n</style>"],"names":["SIZE","COLOR","STYLING","value","CAPTION_TYPE"],"mappings":"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"}