@topvisor/ui 0.0.35 → 0.0.37

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