@topvisor/ui 0.0.17 → 0.0.33

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 (86) hide show
  1. package/.chunks/datepicker-48f2fa8d.es.js +275 -0
  2. package/.chunks/datepicker-48f2fa8d.es.js.map +1 -0
  3. package/.chunks/datepicker-f94ba423.amd.js +234 -0
  4. package/.chunks/datepicker-f94ba423.amd.js.map +1 -0
  5. package/.chunks/forms-6c397f5a.es.js +935 -0
  6. package/.chunks/forms-6c397f5a.es.js.map +1 -0
  7. package/.chunks/forms-cab135c7.amd.js +3 -0
  8. package/.chunks/forms-cab135c7.amd.js.map +1 -0
  9. package/.chunks/popup-04c385e0.es.js +701 -0
  10. package/.chunks/popup-04c385e0.es.js.map +1 -0
  11. package/.chunks/popup-33f53a1c.amd.js +342 -0
  12. package/.chunks/popup-33f53a1c.amd.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 +1 -20
  17. package/common/common.js.map +1 -1
  18. package/core/core.amd.js +1 -4
  19. package/core/core.amd.js.map +1 -1
  20. package/core/core.js +2 -3
  21. package/core/core.js.map +1 -1
  22. package/core.css +1 -648
  23. package/dark.css +1 -136
  24. package/forms/forms.amd.js +1 -12
  25. package/forms/forms.amd.js.map +1 -1
  26. package/forms/forms.js +11 -9
  27. package/forms/helpers.amd.js +1 -5
  28. package/forms/helpers.amd.js.map +1 -1
  29. package/forms/helpers.js +6 -3
  30. package/forms/helpers.js.map +1 -1
  31. package/forms.css +1 -505
  32. package/formsExt/formsExt.amd.js +3 -0
  33. package/formsExt/formsExt.amd.js.map +1 -0
  34. package/formsExt/formsExt.js +152 -0
  35. package/formsExt/formsExt.js.map +1 -0
  36. package/formsExt.css +1 -0
  37. package/icomoon/demo-files/demo.css +161 -161
  38. package/icomoon/demo-files/demo.js +30 -30
  39. package/icomoon/demo.html +2945 -2945
  40. package/icomoon/fonts/Topvisor-2.svg +232 -232
  41. package/icomoon/style.css +647 -647
  42. package/light.css +1 -136
  43. package/package.json +19 -19
  44. package/popup/popup.amd.js +2 -197
  45. package/popup/popup.amd.js.map +1 -1
  46. package/popup/popup.js +104 -158
  47. package/popup/popup.js.map +1 -1
  48. package/popup/worker.amd.js +1 -233
  49. package/popup/worker.amd.js.map +1 -1
  50. package/popup/worker.js +60 -143
  51. package/popup/worker.js.map +1 -1
  52. package/popup.css +1 -19
  53. package/tabs/tabs.amd.js +2 -122
  54. package/tabs/tabs.amd.js.map +1 -1
  55. package/tabs/tabs.js +63 -86
  56. package/tabs/tabs.js.map +1 -1
  57. package/tabs.css +1 -60
  58. package/utils/date.amd.js +2 -0
  59. package/utils/date.amd.js.map +1 -0
  60. package/utils/date.js +6 -0
  61. package/utils/date.js.map +1 -0
  62. package/utils/device.amd.js +1 -41
  63. package/utils/device.amd.js.map +1 -1
  64. package/utils/device.js +3 -38
  65. package/utils/device.js.map +1 -1
  66. package/utils/dom.amd.js +1 -94
  67. package/utils/dom.amd.js.map +1 -1
  68. package/utils/dom.js +47 -77
  69. package/utils/dom.js.map +1 -1
  70. package/.chunks/core-0b2c7817.es.js +0 -152
  71. package/.chunks/core-0b2c7817.es.js.map +0 -1
  72. package/.chunks/core-51f7b679.amd.js +0 -151
  73. package/.chunks/core-51f7b679.amd.js.map +0 -1
  74. package/.chunks/forms-245e3bc0.es.js +0 -565
  75. package/.chunks/forms-245e3bc0.es.js.map +0 -1
  76. package/.chunks/forms-f7b7b259.amd.js +0 -568
  77. package/.chunks/forms-f7b7b259.amd.js.map +0 -1
  78. package/.chunks/popup-8f650530.amd.js +0 -728
  79. package/.chunks/popup-8f650530.amd.js.map +0 -1
  80. package/.chunks/popup-d240ed19.es.js +0 -731
  81. package/.chunks/popup-d240ed19.es.js.map +0 -1
  82. package/editArea/editArea.amd.js +0 -126
  83. package/editArea/editArea.amd.js.map +0 -1
  84. package/editArea/editArea.js +0 -123
  85. package/editArea/editArea.js.map +0 -1
  86. package/editArea.css +0 -61
@@ -1,568 +0,0 @@
1
- define(["exports", "vue"], function(exports, vue) {
2
- "use strict";
3
- var __vite_style__ = document.createElement("style");
4
- __vite_style__.textContent = ".top-button {\n cursor: pointer;\n box-sizing: border-box;\n box-shadow: var(--top-button-box-shadow);\n border-radius: var(--top-forms-radius);\n border: var(--top-forms-border-width) solid var(--top-forms-border-color);\n background-color: var(--top-button-background-color);\n height: var(--top-forms-base-height);\n padding: 0 var(--top-forms-padding);\n color: var(--top-button-color);\n line-height: 1;\n white-space: nowrap;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n transition: background-color 150ms, border-color 150ms, box-shadow 150ms;\n}\n.top-button:hover {\n box-shadow: var(--top-button-box-shadow-hover);\n background-color: var(--top-button-background-color-hover);\n}\n.top-button:active {\n box-shadow: var(--top-button-box-shadow-active);\n background-color: var(--top-button-background-color-active);\n}\n.top-button.top-active {\n box-shadow: var(--top-button-box-shadow-selected);\n background-color: var(--top-button-background-color-selected);\n}\n.top-button.top-button-progress {\n cursor: help;\n box-shadow: inset rgba(0, 0, 0, 0.5) 0 0 64px;\n background-image:\n linear-gradient(-45deg,\n rgba(255, 255, 255, 0.2) 25%,\n transparent 25%,\n transparent 50%,\n rgba(255, 255, 255, 0.2) 50%,\n rgba(255, 255, 255, 0.2) 75%,\n transparent 75%,\n transparent);\n background-size: 32px 32px;\n animation: _progress_1hqxk_1 1s linear infinite;\n}\n@keyframes _progress_1hqxk_1 {\n0% {\n background-position-x: 0px;\n}\n100% {\n background-position-x: 32px;\n}\n}\na.top-button,\nbutton.top-button {\n min-width: 100px;\n text-decoration: none;\n}\na.top-button,\na.top-button:hover {\n min-width: var(--top-forms-base-height);\n text-decoration: none;\n}\n.top-button[data-top-icon]:not(:empty),\n.top-button[data-top-icon2]:not(:empty) {\n justify-content: flex-start;\n text-align: left;\n}\n.top-button[data-top-icon] {\n padding-left: 0;\n}\n.top-button[data-top-icon2] {\n padding-right: var(--top-select_arrow-width);\n}\n.top-button[data-top-icon2]:after {\n margin-left: auto;\n}\n.top-button:empty {\n min-width: var(--top-forms-base-height);\n}\n.top-button[data-top-icon]:empty,\n.top-button[data-top-icon2]:empty {\n padding: 0;\n}\n.top-button.top-color_blue {\n --top-button-background-color: var(--color-blue-500);\n}\n.top-button.top-color_green {\n --top-button-background-color: var(--color-green-500);\n}\n.top-button.top-color_orange {\n --top-button-background-color: var(--color-orange-500);\n}\n.top-button.top-color_red {\n --top-button-background-color: var(--color-red-500);\n}\n.top-button.top-color_pink {\n --top-button-background-color: var(--color-pink-500);\n}\n.top-button.top-color_theme {\n --top-button-box-shadow-hover: none;\n --top-button-box-shadow-active: none;\n --top-button-box-shadow-selected: none;\n\n --top-icon-color: var(--color-text-2);\n --top-icon2-color: var(--color-text-2);\n\n --top-button-color: var(--color-text-1);\n --top-button-background-color: transparent;\n --top-button-background-color-hover: var(--color-secondary-opacity);\n --top-button-background-color-active: var(--color-secondary-2-opacity);\n --top-button-background-color-selected: var(--color-secondary-2-opacity);\n}\n.top-button.top-color_theme.top-active {\n --top-icon-color: var(--color-text-2);\n}\n.top-button.top-style_outline {\n --top-button-box-shadow: none;\n --top-button-box-shadow-hover: none;\n --top-button-box-shadow-active: none;\n --top-button-box-shadow-selected: none;\n\n --top-forms-border-color: var(--top-style_outline-color);\n\n --top-style_outline-color: var(--color-steel-400);\n\n --top-button-color: var(--top-style_outline-color);\n --top-button-background-color: var(--content-background-color);\n --top-button-background-color-hover: var(--color-theme-100);\n --top-button-background-color-active: var(--color-theme-150);\n --top-button-background-color-selected: var(--color-theme-125);\n\n --top-forms-border-width: 1px;\n}\n.top-button.top-style_outline.top-color_theme {\n --top-button-color: var(--color-text);\n}\n.top-button.top-style_outline.top-color_blue {\n --top-style_outline-color: var(--color-blue-500);\n}\n.top-button.top-style_outline.top-color_green {\n --top-style_outline-color: var(--color-green-500);\n}\n.top-button.top-style_outline.top-color_orange {\n --top-style_outline-color: var(--color-orange-500);\n}\n.top-button.top-style_outline.top-color_red {\n --top-style_outline-color: var(--color-red-500);\n}\n.top-button.top-style_outline.top-color_pink {\n --top-style_outline-color: var(--color-pink-500);\n}\n.top-button.top-style_soft {\n --top-shadow-darken: none;\n --top-shadow-darken-2: none;\n --top-shadow-darken-3: none;\n\n --top-button-color: var(--color-text);\n --top-button-background-color: var(--color-secondary-opacity);\n --top-button-background-color-hover: var(--color-secondary-2-opacity);\n --top-button-background-color-active: var(--color-secondary-3-opacity);\n --top-button-background-color-selected: var(--color-secondary-3-opacity);\n}\n.top-button.top-style_soft.top-color_blue {\n --top-button-color: var(--color-blue-500);\n}\n.top-button.top-style_soft.top-color_orange {\n --top-button-color: var(--color-orange-500);\n}\n.top-button.top-style_soft.top-color_green {\n --top-button-color: var(--color-green-500);\n}\n.top-button.top-style_soft.top-color_red {\n --top-button-color: var(--color-red-500);\n}\n.top-button.top-style_soft.top-color_pink {\n --top-button-color: var(--color-pink-500);\n}\n.top-button.top-style_transparent {\n --top-shadow-darken: none;\n --top-shadow-darken-2: none;\n --top-shadow-darken-3: none;\n\n --top-button-color: var(--color-text);\n --top-button-background-color: transparent;\n --top-button-background-color-hover: transparent;\n --top-button-background-color-active: transparent;\n --top-button-background-color-selected: var(--color-steel-200);\n}\n.top-button.top-style_transparent:hover {\n opacity: 0.8;\n}\n.top-button.top-style_transparent.top-color_blue {\n --top-button-color: var(--color-blue-450);\n}\n.top-button.top-style_transparent.top-color_green {\n --top-button-color: var(--color-green-450);\n}\n.top-button.top-style_transparent.top-color_orange {\n --top-button-color: var(--color-orange-450);\n}\n.top-button.top-style_transparent.top-color_red {\n --top-button-color: var(--color-red-450);\n}\n.top-button.top-style_transparent.top-color_pink {\n --top-button-color: var(--color-pink-450);\n}\n.top-button {\n --top-button-color: var(--color-white);\n --top-button-background-color: transparent;\n --top-button-background-color-hover: var(--top-button-background-color);\n --top-button-background-color-active: var(--top-button-background-color-hover);\n --top-button-background-color-selected: var(--top-button-background-color-hover);\n --top-button-box-shadow: none;\n --top-button-box-shadow-hover: var(--top-shadow-darken-2);\n --top-button-box-shadow-active: var(--top-shadow-darken-3);\n --top-button-box-shadow-selected: var(--top-shadow-darken-3);\n --top-forms-border-width: 0px;\n --top-icon-width: calc(var(--top-icon-size) + var(--top-forms-padding));\n --top-icon2-width: calc(var(--top-icon2-size) + var(--top-forms-padding));\n}\n.top-button.top-size_l {\n --top-forms-padding: var(--top-forms-padding_l);\n --top-forms-base-height: var(--top-forms-base-height_l);\n}\n.top-button.top-size_xl {\n --top-forms-padding: var(--top-forms-padding_xl);\n --top-forms-base-height: var(--top-forms-base-height_xl);\n}\n\n.top-hint {\n --top-icon-size: 16px;\n --top-icon-width: var(--top-icon-size);\n\n border-radius: 50%;\n background: var(--content-background-color);\n padding: 1px;\n color: var(--color-text-4);\n line-height: 1;\n z-index: 1;\n pointer-events: all;\n}\n.top-hint:hover {\n color: var(--color-text-3);\n}\n\n.top-textarea {\n width: 180px;\n display: inline-flex;\n align-items: center;\n position: relative;\n}\n.top-textarea_textarea {\n background: var(--top-forms-background-color);\n width: 100%;\n padding: var(--top-forms-padding);\n resize: none;\n}\n.top-textarea_textarea:hover {\n background: var(--top-forms-background-color-hover);\n}\n.top-textarea_textarea:focus {\n outline-color: var(--color-theme-75);\n outline-offset: 0px;\n}\n.top-textarea_textarea.top-textarea_textarea-expandable {\n width: 100%;\n height: 100%;\n overflow: hidden;\n position: absolute;\n top: 0;\n left: 0;\n}\n.top-textarea_pseudoContent {\n box-sizing: border-box;\n min-height: var(--bcf6b9ae);\n padding: var(--top-forms-padding);\n font-size: 14px;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n pointer-events: none;\n opacity: 0;\n z-index: -1;\n}\n.top-textarea_hint {\n position: absolute;\n top: 2px;\n right: 2px;\n}\n\n.top-forms-optionLabel {\n flex-grow: 1;\n}\n.top-forms-optionLabel_title {\n min-height: var(--top-forms-option-height);\n display: flex;\n align-items: center;\n}\n.top-forms-optionLabel_title-disabled {\n color: var(--color-text-3);\n}\n.top-forms-optionLabel_description {\n color: var(--color-text-3);\n font-size: 0.85em;\n line-height: var(--top-forms-option-height);\n}\n\n.top-checkbox {\n cursor: pointer;\n display: inline-flex;\n}\n.top-checkbox_input {\n cursor: inherit;\n border-radius: 4px;\n background: var(--content-background-color);\n border: 1px solid var(--top-forms-border-color);\n width: calc(var(--top-forms-option-height) - 3px * 2);\n height: calc(var(--top-forms-option-height) - 3px * 2);\n}\n.top-checkbox_input:before {\n content: ' ';\n color: #FFF;\n font-family: 'Topvisor-2';\n font-size: 16px;\n}\n.top-checkbox_input:hover {\n border-color: var(--top-forms-option-color);\n background: var(--color-theme-50)\n}\n\n/* checked / indeterminate */\n.top-checkbox_input:checked,\n.top-checkbox_input:indeterminate {\n border-color: var(--top-forms-option-color);\n background: var(--top-forms-option-color);\n}\n.top-checkbox_input:checked:before {\n content: '';\n}\n.top-checkbox_input:indeterminate:before {\n content: '';\n}\n.top-checkbox_input:checked:hover,\n.top-checkbox_input:indeterminate:hover {\n border-color: var(--top-forms-option-color-hover);\n background: var(--top-forms-option-color-hover);\n}\n\n/* disabled selected */\n.top-checkbox_input:disabled {\n border-color: var(--color-line-1-opacity);\n background: var(--color-theme-50);\n}\n.top-checkbox_input:checked:disabled,\n.top-checkbox_input:indeterminate:disabled {\n border-color: transparent;\n background: var(--color-theme-400);\n}\n\n/* isError */\n.top-checkbox_input.top-error {\n border-color: var(--color-negative);\n}\n.top-checkbox_input.top-error:hover {\n border-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 background: var(--color-negative);\n}\n.top-checkbox_input:checked.top-error:hover,\n.top-checkbox_input:indeterminate.top-error:hover {\n background: var(--color-negative-2);\n}\n\n.top-input {\n width: 180px;\n display: inline-flex;\n align-items: center;\n gap: var(--top-gap-1);\n}\n.top-input_input {\n background: var(--top-forms-background-color);\n}\n.top-input_input:hover {\n background: var(--top-forms-background-color-hover);\n}\n.top-input_input:focus {\n outline-color: var(--color-theme-75);\n outline-offset: 0px;\n}\n.top-input-withCleaner .top-input_input:not(:placeholder-shown) {\n --top-forms_clear-width: 24px;\n}\n\n/* TODO: перенести в inputsRange */\n.top-input_input {\n width: 50%;\n flex-grow: 1;\n}\n.top-input[data-top-icon]:before {\n --top-icon-color: var(--color-text-secondary);\n}\n\n:root {\n --top-radio-background-color: var(--content-background-color);\n --top-radio-background-color-hover: var(--top-radio-background-color);\n --top-radio-background-color-active: var(--top-radio-background-color);\n}\n.top-radio {\n cursor: pointer;\n}\n.top-radio_input {\n border-radius: 50%;\n background: var(--content-background-color);\n border: 1px solid var(--top-forms-border-color);\n width: calc(var(--top-forms-option-height) - 3px * 2);\n height: calc(var(--top-forms-option-height) - 3px * 2);\n}\n.top-radio_input:hover {\n border-color: var(--top-forms-option-color);\n background: var(--color-theme-50)\n}\n.top-radio_input:checked {\n border-color: var(--top-forms-option-color);\n border-width: 5px;\n}\n.top-radio_input:checked:hover {\n border-color: var(--top-forms-option-color-hover);\n}\n\n/* disabled */\n.top-radio_input:disabled {\n border-color: var(--color-line-1-opacity);\n background: var(--color-theme-50);\n}\n\n/* disabled selected */\n.top-radio_input:checked:disabled {\n border-color: var(--color-theme-400);\n}\n\n/* isError */\n.top-radio_input.top-error {\n border-color: var(--color-negative);\n}\n.top-radio_input.top-error:hover {\n border-color: var(--color-negative-2);\n}\n\n.top-checkboxSwitcher {\n cursor: pointer;\n display: inline-flex;\n gap: 4px;\n}\n.top-checkboxSwitcher_input {\n border-radius: 9px;\n border: none;\n background: var(--color-theme-100);\n width: 36px;\n height: 18px;\n position: relative;\n}\n.top-checkboxSwitcher_input:before {\n content: '';\n border-radius: 50%;\n background: var(--color-white);\n width: 12px;\n height: 12px;\n margin: 3px;\n position: absolute;\n top: 0;\n left: 0;\n\n transition: left 0.1s;\n}\n.top-checkboxSwitcher_input:hover {\n background: var(--color-theme-150);\n}\n\n/* checked */\n.top-checkboxSwitcher_input:checked {\n background: var(--top-forms-option-color);\n}\n.top-checkboxSwitcher_input:checked:hover {\n background: var(--top-forms-option-color-hover);\n}\n.top-checkboxSwitcher_input:checked:before {\n left: 50%;\n}\n\n/* disabled */\n.top-checkboxSwitcher_input:disabled {\n background: var(--color-theme-400);\n}\n\n/* isError */\n.top-checkboxSwitcher_input.top-error {\n background: var(--color-negative);\n}\n.top-checkboxSwitcher_input.top-error:hover {\n background: var(--color-negative-2);\n}\n";
5
- document.head.appendChild(__vite_style__);
6
- var SIZE = /* @__PURE__ */ ((SIZE2) => {
7
- SIZE2["S"] = "s";
8
- SIZE2["L"] = "l";
9
- SIZE2["XL"] = "xl";
10
- return SIZE2;
11
- })(SIZE || {});
12
- var COLOR = /* @__PURE__ */ ((COLOR2) => {
13
- COLOR2["Theme"] = "theme";
14
- COLOR2["Blue"] = "blue";
15
- COLOR2["Green"] = "green";
16
- COLOR2["Orange"] = "orange";
17
- COLOR2["Red"] = "red";
18
- COLOR2["Pink"] = "pink";
19
- return COLOR2;
20
- })(COLOR || {});
21
- var STYLING = /* @__PURE__ */ ((STYLING2) => {
22
- STYLING2["Regular"] = "";
23
- STYLING2["Outline"] = "outline";
24
- STYLING2["Soft"] = "soft";
25
- STYLING2["Transparent"] = "transparent";
26
- return STYLING2;
27
- })(STYLING || {});
28
- const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
29
- __name: "button",
30
- props: {
31
- color: { default: COLOR.Blue },
32
- styling: { default: STYLING.Regular },
33
- size: { default: SIZE.S },
34
- name: {},
35
- title: {},
36
- icon: {},
37
- icon2: {},
38
- href: {},
39
- disabled: { type: Boolean },
40
- isSubmit: { type: Boolean },
41
- isActive: { type: Boolean },
42
- isProgress: { type: Boolean }
43
- },
44
- setup(__props) {
45
- const props = __props;
46
- const tagName = vue.computed(() => props.href ? "a" : "button");
47
- const type = vue.computed(() => props.isSubmit ? "submit" : void 0);
48
- return (_ctx, _cache) => {
49
- return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tagName.value), {
50
- class: vue.normalizeClass({
51
- ["top-active"]: _ctx.isActive,
52
- ["top-disabled"]: _ctx.disabled,
53
- ["top-forms-focusable"]: !_ctx.disabled,
54
- ["top-button"]: true,
55
- ["top-button-progress"]: _ctx.isProgress,
56
- [`top-size_${_ctx.size}`]: !!_ctx.size,
57
- [`top-color_${_ctx.color}`]: true,
58
- [`top-style_${_ctx.styling}`]: !!_ctx.styling
59
- }),
60
- name: _ctx.name,
61
- title: _ctx.title,
62
- href: _ctx.href,
63
- type: type.value,
64
- "data-top-icon": _ctx.icon || void 0,
65
- "data-top-icon2": _ctx.icon2 || void 0,
66
- disabled: _ctx.disabled || void 0,
67
- inProgress: _ctx.isProgress
68
- }, {
69
- default: vue.withCtx(() => [
70
- vue.renderSlot(_ctx.$slots, "default", {}, () => [
71
- vue.createTextVNode(vue.toDisplayString(!_ctx.icon ? "Button" : ""), 1)
72
- ])
73
- ]),
74
- _: 3
75
- }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]);
76
- };
77
- }
78
- });
79
- const progress = "_progress_1hqxk_1";
80
- const style0$7 = {
81
- "top-button": "top-button",
82
- "top-active": "top-active",
83
- "top-button-progress": "top-button-progress",
84
- progress,
85
- "top-color_blue": "top-color_blue",
86
- "top-color_green": "top-color_green",
87
- "top-color_orange": "top-color_orange",
88
- "top-color_red": "top-color_red",
89
- "top-color_pink": "top-color_pink",
90
- "top-color_theme": "top-color_theme",
91
- "top-style_outline": "top-style_outline",
92
- "top-style_soft": "top-style_soft",
93
- "top-style_transparent": "top-style_transparent",
94
- "top-size_l": "top-size_l",
95
- "top-size_xl": "top-size_xl"
96
- };
97
- const _export_sfc = (sfc, props) => {
98
- const target = sfc.__vccOpts || sfc;
99
- for (const [key, val] of props) {
100
- target[key] = val;
101
- }
102
- return target;
103
- };
104
- const cssModules$7 = {
105
- "$style": style0$7
106
- };
107
- const Button = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__cssModules", cssModules$7]]);
108
- const _hoisted_1$6 = ["title"];
109
- const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
110
- __name: "hint",
111
- props: {
112
- hint: {}
113
- },
114
- setup(__props) {
115
- return (_ctx, _cache) => {
116
- return vue.openBlock(), vue.createElementBlock("span", {
117
- class: "top-hint",
118
- "data-top-icon": "",
119
- title: _ctx.hint
120
- }, null, 8, _hoisted_1$6);
121
- };
122
- }
123
- });
124
- const style0$6 = {
125
- "top-hint": "top-hint"
126
- };
127
- const cssModules$6 = {
128
- "$style": style0$6
129
- };
130
- const Hint = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__cssModules", cssModules$6]]);
131
- const _hoisted_1$5 = ["name", "placeholder", "disabled", "readonly", "rows"];
132
- const _hoisted_2$2 = {
133
- key: 0,
134
- class: "top-textarea_pseudoContent"
135
- };
136
- const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
137
- __name: "textarea",
138
- props: {
139
- modelValue: {},
140
- name: {},
141
- placeholder: {},
142
- rows: { default: 5 },
143
- minHeight: { default: 120 },
144
- expandable: { type: Boolean },
145
- disabled: { type: Boolean },
146
- readonly: { type: Boolean },
147
- isError: { type: Boolean },
148
- hint: {}
149
- },
150
- emits: ["update:modelValue"],
151
- setup(__props, { emit }) {
152
- const props = __props;
153
- vue.useCssVars((_ctx) => ({
154
- "bcf6b9ae": _ctx.minHeight + "px"
155
- }));
156
- const value = vue.computed({
157
- get() {
158
- return props.modelValue;
159
- },
160
- set(value2) {
161
- emit("update:modelValue", value2);
162
- }
163
- });
164
- return (_ctx, _cache) => {
165
- const _directive_tv_tooltip = vue.resolveDirective("tv-tooltip");
166
- return vue.openBlock(), vue.createElementBlock("label", {
167
- class: vue.normalizeClass({
168
- ["top-textarea"]: true,
169
- ["top-textarea-" + _ctx.name]: _ctx.name,
170
- ["top-disabled"]: _ctx.disabled
171
- })
172
- }, [
173
- vue.withDirectives(vue.createElementVNode("textarea", vue.mergeProps({
174
- type: "text",
175
- class: {
176
- ["top-forms-focusable"]: !_ctx.disabled,
177
- ["top-textarea_textarea"]: true,
178
- ["top-textarea_textarea-expandable"]: _ctx.expandable,
179
- ["top-error"]: _ctx.isError
180
- },
181
- autocomplete: "off_always",
182
- name: _ctx.name,
183
- placeholder: _ctx.placeholder,
184
- disabled: _ctx.disabled,
185
- readonly: _ctx.readonly,
186
- rows: !_ctx.expandable ? _ctx.rows : void 0
187
- }, _ctx.$attrs, {
188
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event)
189
- }), null, 16, _hoisted_1$5), [
190
- [vue.vModelText, value.value]
191
- ]),
192
- _ctx.expandable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, vue.toDisplayString(value.value + " "), 1)) : vue.createCommentVNode("", true),
193
- _ctx.hint ? vue.withDirectives((vue.openBlock(), vue.createBlock(Hint, {
194
- key: 1,
195
- class: "top-textarea_hint",
196
- hint: _ctx.hint
197
- }, null, 8, ["hint"])), [
198
- [_directive_tv_tooltip]
199
- ]) : vue.createCommentVNode("", true)
200
- ], 2);
201
- };
202
- }
203
- });
204
- const style0$5 = {
205
- "top-textarea": "top-textarea",
206
- "top-textarea_textarea": "top-textarea_textarea",
207
- "top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
208
- "top-textarea_pseudoContent": "top-textarea_pseudoContent",
209
- "top-textarea_hint": "top-textarea_hint"
210
- };
211
- const cssModules$5 = {
212
- "$style": style0$5
213
- };
214
- const Textarea = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__cssModules", cssModules$5]]);
215
- const _hoisted_1$4 = { class: "top-forms-optionLabel" };
216
- const _hoisted_2$1 = {
217
- key: 0,
218
- class: "top-forms-optionLabel_description"
219
- };
220
- const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
221
- __name: "controlLabel",
222
- props: {
223
- title: {},
224
- description: {},
225
- disabled: { type: Boolean }
226
- },
227
- setup(__props) {
228
- return (_ctx, _cache) => {
229
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
230
- vue.createElementVNode("div", {
231
- class: vue.normalizeClass({
232
- "top-forms-optionLabel_title": true,
233
- "top-forms-optionLabel_title-disabled": _ctx.disabled
234
- })
235
- }, vue.toDisplayString(_ctx.title), 3),
236
- _ctx.description ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, vue.toDisplayString(_ctx.description), 1)) : vue.createCommentVNode("", true)
237
- ]);
238
- };
239
- }
240
- });
241
- const style0$4 = {
242
- "top-forms-optionLabel": "top-forms-optionLabel",
243
- "top-forms-optionLabel_title": "top-forms-optionLabel_title",
244
- "top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
245
- "top-forms-optionLabel_description": "top-forms-optionLabel_description"
246
- };
247
- const cssModules$4 = {
248
- "$style": style0$4
249
- };
250
- const ControlLabel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__cssModules", cssModules$4]]);
251
- const _hoisted_1$3 = ["name", "value", "indeterminate", "disabled"];
252
- const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
253
- __name: "checkbox",
254
- props: {
255
- modelValue: { type: [Boolean, Array, Set] },
256
- name: {},
257
- value: {},
258
- title: {},
259
- description: {},
260
- disabled: { type: Boolean },
261
- indeterminate: { type: Boolean },
262
- isError: { type: Boolean }
263
- },
264
- emits: ["update:modelValue"],
265
- setup(__props, { emit }) {
266
- const props = __props;
267
- const localValue = vue.computed({
268
- get() {
269
- return props.modelValue;
270
- },
271
- set(value) {
272
- emit("update:modelValue", value);
273
- }
274
- });
275
- return (_ctx, _cache) => {
276
- return vue.openBlock(), vue.createElementBlock("label", {
277
- class: vue.normalizeClass({
278
- ["top-forms-optionWrapper"]: true,
279
- ["top-checkbox"]: true,
280
- ["top-checkbox_" + _ctx.name]: _ctx.name !== "",
281
- ["top-disabled"]: _ctx.disabled,
282
- ["top-error"]: _ctx.isError && !_ctx.disabled
283
- })
284
- }, [
285
- vue.withDirectives(vue.createElementVNode("input", {
286
- type: "checkbox",
287
- class: vue.normalizeClass({
288
- ["top-forms-focusable"]: !_ctx.disabled,
289
- ["top-forms-option"]: true,
290
- ["top-checkbox_input"]: true,
291
- ["top-error"]: _ctx.isError && !_ctx.disabled
292
- }),
293
- name: _ctx.name,
294
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
295
- value: _ctx.value,
296
- indeterminate: _ctx.indeterminate,
297
- disabled: _ctx.disabled
298
- }, null, 10, _hoisted_1$3), [
299
- [vue.vModelCheckbox, localValue.value]
300
- ]),
301
- _ctx.title ? (vue.openBlock(), vue.createBlock(ControlLabel, {
302
- key: 0,
303
- title: _ctx.title,
304
- description: _ctx.description,
305
- disabled: _ctx.disabled
306
- }, null, 8, ["title", "description", "disabled"])) : vue.createCommentVNode("", true)
307
- ], 2);
308
- };
309
- }
310
- });
311
- const style0$3 = {
312
- "top-checkbox": "top-checkbox",
313
- "top-checkbox_input": "top-checkbox_input",
314
- "top-error": "top-error"
315
- };
316
- const cssModules$3 = {
317
- "$style": style0$3
318
- };
319
- const checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__cssModules", cssModules$3]]);
320
- var CAPTION_TYPE = /* @__PURE__ */ ((CAPTION_TYPE2) => {
321
- CAPTION_TYPE2["NONE"] = "";
322
- CAPTION_TYPE2["SLIDE"] = "slide";
323
- CAPTION_TYPE2["TOP"] = "top";
324
- return CAPTION_TYPE2;
325
- })(CAPTION_TYPE || {});
326
- const _hoisted_1$2 = ["data-top-icon"];
327
- const _hoisted_2 = ["name", "title", "placeholder", "disabled", "readonly"];
328
- const _hoisted_3 = {
329
- key: 2,
330
- class: "top-formsCaption"
331
- };
332
- const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
333
- __name: "input",
334
- props: {
335
- modelValue: {},
336
- name: {},
337
- disabled: { type: Boolean },
338
- readonly: { type: Boolean },
339
- title: {},
340
- captionType: { default: CAPTION_TYPE.NONE },
341
- size: { default: SIZE.S },
342
- icon: {},
343
- addCleaner: { type: Boolean },
344
- isError: { type: Boolean }
345
- },
346
- emits: ["update:modelValue"],
347
- setup(__props, { emit }) {
348
- const props = __props;
349
- const value = vue.computed({
350
- get() {
351
- return props.modelValue;
352
- },
353
- set(value2) {
354
- emit("update:modelValue", value2);
355
- }
356
- });
357
- const placeholder = vue.computed(() => {
358
- if (props.addCleaner && !props.title) {
359
- return "";
360
- }
361
- if (props.captionType !== CAPTION_TYPE.NONE) {
362
- return "";
363
- }
364
- return props.title;
365
- });
366
- const clean = () => {
367
- emit("update:modelValue", "");
368
- };
369
- return (_ctx, _cache) => {
370
- return vue.openBlock(), vue.createElementBlock("label", {
371
- class: vue.normalizeClass({
372
- ["top-input"]: true,
373
- ["top-input-" + _ctx.name]: _ctx.name,
374
- ["top-size_" + _ctx.size]: true,
375
- ["top-disabled"]: _ctx.disabled,
376
- ["top-input-withCleaner"]: _ctx.addCleaner,
377
- ["top-formsCaptionWrapper"]: _ctx.captionType !== vue.unref(CAPTION_TYPE).NONE,
378
- ["top-formsCaptionWrapper-always"]: _ctx.captionType === vue.unref(CAPTION_TYPE).TOP,
379
- ["top-input-withButton"]: !!_ctx.$slots.btn
380
- }),
381
- "data-top-icon": _ctx.icon
382
- }, [
383
- vue.withDirectives(vue.createElementVNode("input", {
384
- type: "text",
385
- class: vue.normalizeClass({
386
- ["top-forms-focusable"]: !_ctx.disabled,
387
- ["top-input_input"]: true,
388
- ["top-error"]: _ctx.isError
389
- }),
390
- autocomplete: "off_always",
391
- name: _ctx.name,
392
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => value.value = $event),
393
- title: _ctx.title,
394
- placeholder: placeholder.value,
395
- disabled: _ctx.disabled,
396
- readonly: _ctx.readonly,
397
- onKeydown: _cache[1] || (_cache[1] = vue.withKeys(() => (_ctx.addCleaner || !!_ctx.$slots.btn) && clean(), ["esc"]))
398
- }, null, 42, _hoisted_2), [
399
- [vue.vModelText, value.value]
400
- ]),
401
- _ctx.addCleaner && value.value ? (vue.openBlock(), vue.createElementBlock("span", {
402
- key: 0,
403
- class: "top-input_cleaner top-cleaner",
404
- "data-top-icon": "",
405
- onClick: clean
406
- })) : vue.createCommentVNode("", true),
407
- value.value ? vue.renderSlot(_ctx.$slots, "btn", { key: 1 }) : vue.createCommentVNode("", true),
408
- vue.renderSlot(_ctx.$slots, "default"),
409
- _ctx.captionType !== vue.unref(CAPTION_TYPE).NONE ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3, vue.toDisplayString(_ctx.title), 1)) : vue.createCommentVNode("", true)
410
- ], 10, _hoisted_1$2);
411
- };
412
- }
413
- });
414
- const style0$2 = {
415
- "top-input": "top-input",
416
- "top-input_input": "top-input_input",
417
- "top-input-withCleaner": "top-input-withCleaner"
418
- };
419
- const cssModules$2 = {
420
- "$style": style0$2
421
- };
422
- const input = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__cssModules", cssModules$2]]);
423
- const _hoisted_1$1 = ["name", "value", "disabled"];
424
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
425
- __name: "radio",
426
- props: {
427
- modelValue: {},
428
- value: {},
429
- name: {},
430
- title: {},
431
- description: {},
432
- disabled: { type: Boolean },
433
- isError: { type: Boolean }
434
- },
435
- emits: ["update:modelValue"],
436
- setup(__props, { emit }) {
437
- const props = __props;
438
- const localValue = vue.computed({
439
- get() {
440
- return props.modelValue;
441
- },
442
- set(value) {
443
- emit("update:modelValue", value);
444
- }
445
- });
446
- return (_ctx, _cache) => {
447
- return vue.openBlock(), vue.createElementBlock("label", {
448
- class: vue.normalizeClass({
449
- ["top-forms-optionWrapper"]: true,
450
- ["top-radio"]: true,
451
- ["top-radio_" + _ctx.name]: _ctx.name !== "",
452
- ["top-disabled"]: _ctx.disabled,
453
- ["top-error"]: _ctx.isError && !_ctx.disabled
454
- })
455
- }, [
456
- vue.withDirectives(vue.createElementVNode("input", {
457
- type: "radio",
458
- class: vue.normalizeClass({
459
- ["top-forms-focusable"]: !_ctx.disabled,
460
- ["top-forms-option"]: true,
461
- ["top-radio_input"]: true,
462
- ["top-error"]: _ctx.isError && !_ctx.disabled
463
- }),
464
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
465
- name: _ctx.name,
466
- value: _ctx.value,
467
- disabled: _ctx.disabled
468
- }, null, 10, _hoisted_1$1), [
469
- [vue.vModelRadio, localValue.value]
470
- ]),
471
- _ctx.title ? (vue.openBlock(), vue.createBlock(ControlLabel, {
472
- key: 0,
473
- title: _ctx.title,
474
- description: _ctx.description,
475
- disabled: _ctx.disabled
476
- }, null, 8, ["title", "description", "disabled"])) : vue.createCommentVNode("", true)
477
- ], 2);
478
- };
479
- }
480
- });
481
- const style0$1 = {
482
- "top-radio": "top-radio",
483
- "top-radio_input": "top-radio_input",
484
- "top-error": "top-error"
485
- };
486
- const cssModules$1 = {
487
- "$style": style0$1
488
- };
489
- const radio = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__cssModules", cssModules$1]]);
490
- const _hoisted_1 = ["name", "value", "disabled"];
491
- const _sfc_main = /* @__PURE__ */ vue.defineComponent({
492
- __name: "switcher",
493
- props: {
494
- modelValue: { type: [Boolean, Array, Set] },
495
- name: {},
496
- value: {},
497
- title: {},
498
- description: {},
499
- disabled: { type: Boolean },
500
- isError: { type: Boolean }
501
- },
502
- emits: ["update:modelValue"],
503
- setup(__props, { emit }) {
504
- const props = __props;
505
- const localValue = vue.computed({
506
- get() {
507
- return props.modelValue;
508
- },
509
- set(value) {
510
- emit("update:modelValue", value);
511
- }
512
- });
513
- return (_ctx, _cache) => {
514
- return vue.openBlock(), vue.createElementBlock("label", {
515
- class: vue.normalizeClass({
516
- ["top-forms-optionWrapper"]: true,
517
- ["top-checkboxSwitcher"]: true,
518
- ["top-disabled"]: _ctx.disabled,
519
- ["top-error"]: _ctx.isError && !_ctx.disabled
520
- })
521
- }, [
522
- vue.withDirectives(vue.createElementVNode("input", {
523
- type: "checkbox",
524
- class: vue.normalizeClass({
525
- ["top-forms-focusable"]: !_ctx.disabled,
526
- ["top-forms-option"]: true,
527
- ["top-checkboxSwitcher_input"]: true,
528
- ["top-error"]: _ctx.isError && !_ctx.disabled
529
- }),
530
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => localValue.value = $event),
531
- name: _ctx.name,
532
- value: _ctx.value,
533
- disabled: _ctx.disabled
534
- }, null, 10, _hoisted_1), [
535
- [vue.vModelCheckbox, localValue.value]
536
- ]),
537
- _ctx.title ? (vue.openBlock(), vue.createBlock(ControlLabel, {
538
- key: 0,
539
- title: _ctx.title,
540
- description: _ctx.description,
541
- disabled: _ctx.disabled
542
- }, null, 8, ["title", "description", "disabled"])) : vue.createCommentVNode("", true)
543
- ], 2);
544
- };
545
- }
546
- });
547
- const style0 = {
548
- "top-checkboxSwitcher": "top-checkboxSwitcher",
549
- "top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
550
- "top-error": "top-error"
551
- };
552
- const cssModules = {
553
- "$style": style0
554
- };
555
- const switcher = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
556
- exports.Button = Button;
557
- exports.COLOR = COLOR;
558
- exports.ControlLabel = ControlLabel;
559
- exports.Hint = Hint;
560
- exports.SIZE = SIZE;
561
- exports.Textarea = Textarea;
562
- exports._export_sfc = _export_sfc;
563
- exports.checkbox = checkbox;
564
- exports.input = input;
565
- exports.radio = radio;
566
- exports.switcher = switcher;
567
- });
568
- //# sourceMappingURL=forms-f7b7b259.amd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"forms-f7b7b259.amd.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","computed","value","CAPTION_TYPE"],"mappings":";;;;;AAGY,MAAA,yBAAAA,UAAL;AACNA,UAAA,GAAI,IAAA;AACJA,UAAA,GAAI,IAAA;AACJA,UAAA,IAAK,IAAA;AAHMA,WAAAA;AAAAA,EAAA,GAAA,QAAA,CAAA,CAAA;ACwCA,MAAA,0BAAAC,WAAL;AACNA,WAAA,OAAQ,IAAA;AACRA,WAAA,MAAO,IAAA;AACPA,WAAA,OAAQ,IAAA;AACRA,WAAA,QAAS,IAAA;AACTA,WAAA,KAAM,IAAA;AACNA,WAAA,MAAO,IAAA;AANIA,WAAAA;AAAAA,EAAA,GAAA,SAAA,CAAA,CAAA;AAYA,MAAA,4BAAAC,aAAL;AACNA,aAAA,SAAU,IAAA;AACVA,aAAA,SAAU,IAAA;AACVA,aAAA,MAAO,IAAA;AACPA,aAAA,aAAc,IAAA;AAJHA,WAAAA;AAAAA,EAAA,GAAA,WAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;AC5CZ,YAAM,UAAUC,IAAAA,SAAS,MAAM,MAAM,OAAO,MAAM,QAAQ;AAE1D,YAAM,OAAOA,IAAAA,SAAS,MAAM,MAAM,WAAW,WAAW,MAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACDjE,YAAM,QAAQA,IAAAA,SAAS;AAAA,QACtB,MAAO;AACN,iBAAO,MAAM;AAAA,QACd;AAAA,QACA,IAAKC,QAAO;AACX,eAAK,qBAAqBA,MAAK;AAAA,QAChC;AAAA,MAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACXD,YAAM,aAAaD,IAAAA,SAAS;AAAA,QAC3B,MAAO;AACN,iBAAO,MAAM;AAAA,QACd;AAAA,QACA,IAAK,OAAO;AACX,eAAK,qBAAqB,KAAK;AAAA,QAChC;AAAA,MAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC4BW,MAAA,iCAAAE,kBAAL;AACNA,kBAAA,MAAO,IAAA;AACPA,kBAAA,OAAQ,IAAA;AACRA,kBAAA,KAAM,IAAA;AAHKA,WAAAA;AAAAA,EAAA,GAAA,gBAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;AC/BZ,YAAM,QAAQF,IAAAA,SAAS;AAAA,QACtB,MAAO;AACN,iBAAO,MAAM;AAAA,QACd;AAAA,QACA,IAAKC,QAAO;AACX,eAAK,qBAAqBA,MAAK;AAAA,QAChC;AAAA,MAAA,CACA;AAEK,YAAA,cAAcD,IAAAA,SAAS,MAAM;AAClC,YAAI,MAAM,cAAc,CAAC,MAAM,OAAO;AAC9B,iBAAA;AAAA,QACR;AACI,YAAA,MAAM,gBAAgB,aAAa,MAAM;AACrC,iBAAA;AAAA,QACR;AAEA,eAAO,MAAM;AAAA,MAAA,CACb;AAED,YAAM,QAAQ,MAAM;AACnB,aAAK,qBAAqB,EAAE;AAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzB7B,YAAM,aAAaA,IAAAA,SAAS;AAAA,QAC3B,MAAO;AACN,iBAAO,MAAM;AAAA,QACd;AAAA,QACA,IAAK,OAAO;AACX,eAAK,qBAAqB,KAAK;AAAA,QAChC;AAAA,MAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPD,YAAM,aAAaA,IAAAA,SAAS;AAAA,QAC3B,MAAO;AACN,iBAAO,MAAM;AAAA,QACd;AAAA,QACA,IAAK,OAAO;AACX,eAAK,qBAAqB,KAAK;AAAA,QAChC;AAAA,MAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}