@topvisor/ui 0.9.32 → 0.9.33-dev

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 (210) hide show
  1. package/.chunks/datepicker-B2sjxM3R.amd.js +247 -0
  2. package/.chunks/datepicker-B2sjxM3R.amd.js.map +1 -0
  3. package/.chunks/datepicker-V4rjmE4P.es.js +289 -0
  4. package/.chunks/datepicker-V4rjmE4P.es.js.map +1 -0
  5. package/.chunks/forms-Dixfp052.amd.js +4 -0
  6. package/.chunks/forms-Dixfp052.amd.js.map +1 -0
  7. package/.chunks/forms-o7UeMJFf.es.js +1507 -0
  8. package/.chunks/forms-o7UeMJFf.es.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-BfCj7kQR.es.js → listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js} +2 -2
  10. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BliXIrA8.es.js.map +1 -0
  11. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-C7tg-67i.amd.js → listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js} +2 -2
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C0tRJmSC.amd.js.map +1 -0
  13. package/.chunks/{menu-v5knQbeF.es.js → menu-CHczkYl6.es.js} +2 -2
  14. package/.chunks/menu-CHczkYl6.es.js.map +1 -0
  15. package/.chunks/{menu-S1Hk7D3W.amd.js → menu-buQxcAhv.amd.js} +2 -2
  16. package/.chunks/menu-buQxcAhv.amd.js.map +1 -0
  17. package/.chunks/{popup-DncRq57t.amd.js → popup-BMNS1F2G.amd.js} +440 -440
  18. package/.chunks/popup-BMNS1F2G.amd.js.map +1 -0
  19. package/.chunks/{popup-BK3xlBZm.es.js → popup-CJLGyBwQ.es.js} +485 -485
  20. package/.chunks/popup-CJLGyBwQ.es.js.map +1 -0
  21. package/.chunks/store-Bl79G7T_.amd.js.map +1 -1
  22. package/.chunks/store-PoMCiuBr.es.js.map +1 -1
  23. package/.chunks/{widgetInput-CrrUoVPc.amd.js → widgetInput-ASxjfQpi.amd.js} +2 -2
  24. package/.chunks/widgetInput-ASxjfQpi.amd.js.map +1 -0
  25. package/.chunks/{widgetInput-Br5COpvG.es.js → widgetInput-p8fSQGk9.es.js} +2 -2
  26. package/.chunks/widgetInput-p8fSQGk9.es.js.map +1 -0
  27. package/README.md +86 -86
  28. package/assets/core.css +1 -1
  29. package/assets/dark.css +1 -1
  30. package/assets/forms.css +1 -1
  31. package/assets/formsExt.css +1 -1
  32. package/assets/light.css +1 -1
  33. package/core/core.amd.js +1 -1
  34. package/core/core.js +1 -1
  35. package/forms/forms.amd.js +1 -1
  36. package/forms/forms.js +15 -14
  37. package/forms/forms.js.map +1 -1
  38. package/forms/helpers.amd.js.map +1 -1
  39. package/forms/helpers.js.map +1 -1
  40. package/formsExt/formsExt.amd.js +1 -1
  41. package/formsExt/formsExt.amd.js.map +1 -1
  42. package/formsExt/formsExt.js +82 -82
  43. package/formsExt/formsExt.js.map +1 -1
  44. package/icomoon/Read Me.txt +7 -7
  45. package/icomoon/demo-files/demo.css +161 -161
  46. package/icomoon/demo-files/demo.js +30 -30
  47. package/icomoon/demo.html +3379 -3379
  48. package/icomoon/fonts/Topvisor-2.svg +263 -263
  49. package/icomoon/style.css +740 -740
  50. package/package.json +24 -24
  51. package/popup/popup.amd.js +1 -1
  52. package/popup/popup.js +2 -2
  53. package/popup/worker.amd.js +1 -1
  54. package/popup/worker.amd.js.map +1 -1
  55. package/popup/worker.js +2 -2
  56. package/popup/worker.js.map +1 -1
  57. package/project/project.amd.js +1 -1
  58. package/project/project.amd.js.map +1 -1
  59. package/project/project.js +3 -3
  60. package/project/project.js.map +1 -1
  61. package/require/css.amd.js +11 -11
  62. package/src/components/forms/avatar/avatar.stories.d.ts +15 -14
  63. package/src/components/forms/avatar/avatar.vue.d.ts +7 -6
  64. package/src/components/forms/button/button.stories.d.ts +62 -60
  65. package/src/components/forms/button/button.vue.d.ts +14 -14
  66. package/src/components/forms/checkbox/checkbox.stories.d.ts +37 -37
  67. package/src/components/forms/checkbox/checkbox.vue.d.ts +20 -23
  68. package/src/components/forms/controlLabel/controlLabel.stories.d.ts +17 -16
  69. package/src/components/forms/controlLabel/controlLabel.vue.d.ts +5 -6
  70. package/src/components/forms/forms.d.ts +8 -0
  71. package/src/components/forms/hint/hint.stories.d.ts +87 -22
  72. package/src/components/forms/hint/hint.vue.d.ts +4 -3
  73. package/src/components/forms/input/input.stories.d.ts +67 -65
  74. package/src/components/forms/input/input.vue.d.ts +13 -13
  75. package/src/components/forms/inputDate/datepicker.d.ts +2 -0
  76. package/src/components/forms/inputDate/inputDate.stories.d.ts +31 -29
  77. package/src/components/forms/inputDate/inputDate.vue.d.ts +6 -5
  78. package/src/components/forms/inputRange/inputRange.stories.d.ts +124 -89
  79. package/src/components/forms/inputRange/inputRange.vue.d.ts +3 -4
  80. package/src/components/forms/loadbar/loadbar.stories.d.ts +2 -1
  81. package/src/components/forms/loadbar/loadbar.vue.d.ts +2 -1
  82. package/src/components/forms/radio/radio.stories.d.ts +35 -34
  83. package/src/components/forms/radio/radio.vue.d.ts +8 -9
  84. package/src/components/forms/select/select.stories.d.ts +24 -22
  85. package/src/components/forms/select/select.vue.d.ts +25 -24
  86. package/src/components/forms/switcher/switcher.stories.d.ts +35 -34
  87. package/src/components/forms/switcher/switcher.vue.d.ts +8 -9
  88. package/src/components/forms/textarea/textarea.stories.d.ts +24 -23
  89. package/src/components/forms/textarea/textarea.vue.d.ts +6 -5
  90. package/src/components/formsExt/editArea/editArea.stories.d.ts +40 -39
  91. package/src/components/formsExt/editArea/editArea.vue.d.ts +6 -5
  92. package/src/components/formsExt/editInput/editInput.stories.d.ts +25 -22
  93. package/src/components/formsExt/editInput/editInput.vue.d.ts +8 -9
  94. package/src/components/formsExt/menu/menu.stories.d.ts +16 -15
  95. package/src/components/formsExt/menu/menu.vue.d.ts +16 -15
  96. package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +16 -14
  97. package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +17 -14
  98. package/src/components/formsExt/selector2/api.d.ts +3 -3
  99. package/src/components/formsExt/selector2/itemMulti.vue.d.ts +5 -4
  100. package/src/components/formsExt/selector2/selector2.stories.d.ts +98 -97
  101. package/src/components/formsExt/selector2/selector2.vue.d.ts +47 -47
  102. package/src/components/popup/popup/listItem.vue.d.ts +9 -10
  103. package/src/components/popup/popup/opener.vue.d.ts +11 -12
  104. package/src/components/popup/popup/popup.stories.d.ts +271 -202
  105. package/src/components/popup/popup/popup.vue.d.ts +17 -18
  106. package/src/components/popup/popup/widgetInput.vue.d.ts +31 -28
  107. package/src/components/project/selectorCompetitors/composables.d.ts +2 -2
  108. package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +9 -8
  109. package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +10 -10
  110. package/src/components/project/selectorCompetitors/stories/items.d.ts +2 -1
  111. package/src/components/tabs/tabs/content.vue.d.ts +5 -6
  112. package/src/components/tabs/tabs/tab.vue.d.ts +5 -6
  113. package/src/components/tabs/tabs/tabs.stories.d.ts +244 -177
  114. package/src/components/tabs/tabs/tabs.vue.d.ts +5 -6
  115. package/src/components/tabsView/tabsView/menu.vue.d.ts +10 -11
  116. package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +2 -1
  117. package/src/components/tabsView/tabsView/menuItem.vue.d.ts +9 -10
  118. package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +5 -6
  119. package/src/components/tabsView/tabsView/store.d.ts +129 -72
  120. package/src/components/tabsView/tabsView/tabsView.d.ts +1 -1
  121. package/src/components/tabsView/tabsView/tabsView.stories.d.ts +107 -106
  122. package/src/components/tabsView/tabsView/tabsView.vue.d.ts +16 -17
  123. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuItem.stories.d.ts +102 -101
  124. package/src/components/tabsView/tabsView//320/255/320/273/320/265/320/274/320/265/320/275/321/202/321/213/MenuTitle.stories.d.ts +54 -53
  125. package/src/core/core/core.d.ts +2 -1
  126. package/src/core/core/page.d.ts +4 -0
  127. package/src/core/core/plugin.d.ts +38 -0
  128. package/src/core/core/state.d.ts +4 -0
  129. package/src/core/utils/device.d.ts +9 -0
  130. package/src/core/utils/image.d.ts +12 -0
  131. package/src/core/utils/number.d.ts +7 -0
  132. package/src/core/utils/price.d.ts +1 -1
  133. package/src/core/utils/store/localStorage.d.ts +1 -1
  134. package/src/core/utils/store/plugin.d.ts +2 -1
  135. package/src/core/utils/store/store.d.ts +2 -2
  136. package/src/core/utils/string.d.ts +5 -1
  137. package/tabs/tabs.amd.js +1 -1
  138. package/tabs/tabs.js +1 -1
  139. package/tabsView/tabsView.amd.js +1 -1
  140. package/tabsView/tabsView.amd.js.map +1 -1
  141. package/tabsView/tabsView.js +2 -2
  142. package/tabsView/tabsView.js.map +1 -1
  143. package/utils/check.amd.js +1 -1
  144. package/utils/check.amd.js.map +1 -1
  145. package/utils/check.js +5 -22
  146. package/utils/check.js.map +1 -1
  147. package/utils/css.amd.js.map +1 -1
  148. package/utils/css.js.map +1 -1
  149. package/utils/date.amd.js +1 -1
  150. package/utils/date.js +4 -4
  151. package/utils/device.amd.js +1 -1
  152. package/utils/device.js +7 -6
  153. package/utils/dom.amd.js.map +1 -1
  154. package/utils/dom.js.map +1 -1
  155. package/utils/image.amd.js +2 -0
  156. package/utils/image.amd.js.map +1 -0
  157. package/utils/image.d.ts +1 -0
  158. package/utils/image.js +13 -0
  159. package/utils/image.js.map +1 -0
  160. package/utils/keyboard.amd.js.map +1 -1
  161. package/utils/keyboard.js.map +1 -1
  162. package/utils/number.amd.js +2 -0
  163. package/utils/number.amd.js.map +1 -0
  164. package/utils/number.d.ts +1 -0
  165. package/utils/number.js +9 -0
  166. package/utils/number.js.map +1 -0
  167. package/utils/price.amd.js.map +1 -1
  168. package/utils/price.js.map +1 -1
  169. package/utils/route.amd.js.map +1 -1
  170. package/utils/route.js.map +1 -1
  171. package/utils/scroll.amd.js +1 -1
  172. package/utils/scroll.amd.js.map +1 -1
  173. package/utils/scroll.js +1 -1
  174. package/utils/scroll.js.map +1 -1
  175. package/utils/string.amd.js +1 -1
  176. package/utils/string.amd.js.map +1 -1
  177. package/utils/string.js +17 -128
  178. package/utils/string.js.map +1 -1
  179. package/utils/system.amd.js +1 -1
  180. package/utils/system.amd.js.map +1 -1
  181. package/utils/system.js +8 -8
  182. package/utils/system.js.map +1 -1
  183. package/utils/url.amd.js +1 -2
  184. package/utils/url.amd.js.map +1 -1
  185. package/utils/url.js +8 -173
  186. package/utils/url.js.map +1 -1
  187. package/utils/window.amd.js +1 -1
  188. package/utils/window.js +1 -1
  189. package/.chunks/datepicker-5QMJRJn-.amd.js +0 -247
  190. package/.chunks/datepicker-5QMJRJn-.amd.js.map +0 -1
  191. package/.chunks/datepicker-D1JLNEmV.es.js +0 -289
  192. package/.chunks/datepicker-D1JLNEmV.es.js.map +0 -1
  193. package/.chunks/forms-B2NcBl7S.amd.js +0 -3
  194. package/.chunks/forms-B2NcBl7S.amd.js.map +0 -1
  195. package/.chunks/forms-S36M7cBH.es.js +0 -1170
  196. package/.chunks/forms-S36M7cBH.es.js.map +0 -1
  197. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-BfCj7kQR.es.js.map +0 -1
  198. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-C7tg-67i.amd.js.map +0 -1
  199. package/.chunks/menu-S1Hk7D3W.amd.js.map +0 -1
  200. package/.chunks/menu-v5knQbeF.es.js.map +0 -1
  201. package/.chunks/popup-BK3xlBZm.es.js.map +0 -1
  202. package/.chunks/popup-DncRq57t.amd.js.map +0 -1
  203. package/.chunks/widgetInput-Br5COpvG.es.js.map +0 -1
  204. package/.chunks/widgetInput-CrrUoVPc.amd.js.map +0 -1
  205. package/src/core/utils/common.d.ts +0 -21
  206. package/utils/common.amd.js +0 -2
  207. package/utils/common.amd.js.map +0 -1
  208. package/utils/common.d.ts +0 -1
  209. package/utils/common.js +0 -21
  210. package/utils/common.js.map +0 -1
@@ -1,1170 +0,0 @@
1
- import { insertToPage as ae } from "../utils/css.js";
2
- import { reactive as Y, defineComponent as y, useCssVars as te, computed as h, openBlock as u, createElementBlock as m, createElementVNode as _, createCommentVNode as g, createBlock as M, resolveDynamicComponent as re, normalizeClass as w, withCtx as D, renderSlot as k, createTextVNode as le, toDisplayString as W, mergeModels as H, useModel as oe, withDirectives as T, vModelCheckbox as se, onUnmounted as de, ref as pe, unref as B, mergeProps as A, vModelRadio as ue, resolveDirective as ce, vModelText as ne, watch as me, Fragment as O, renderList as X, vModelSelect as fe, withKeys as be, withModifiers as he } from "vue";
3
- const ie = ["../assets/forms.css"].map((t) => import.meta.resolve(t));
4
- ae(ie, !0);
5
- function ge() {
6
- return "devicePixelRatio" in window && window.devicePixelRatio > 1;
7
- }
8
- function we() {
9
- return !!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|Opera Mini/i);
10
- }
11
- function ve() {
12
- return navigator.userAgent.indexOf("Topvisor_App") != -1;
13
- }
14
- function ye() {
15
- return navigator.userAgent.indexOf("Mac OS X") !== -1;
16
- }
17
- function eo() {
18
- const t = /Chrome|Android/.test(navigator.userAgent);
19
- let e = /Safari/.test(navigator.userAgent);
20
- return t && e && (e = !1), e;
21
- }
22
- function to() {
23
- return ye() ? "⌘" : "Ctrl";
24
- }
25
- const oo = () => $(document).scrollTop(), so = () => $(document), no = () => [document], _e = () => {
26
- const t = [
27
- ["iOS", /(iPhone|iPad)/i],
28
- ["Android", /(Android)/i],
29
- ["Windows Phone", /(IEMobile)/i],
30
- ["Windows 3.11", /Win16/i],
31
- ["Windows 95", /(Windows 95)|(Win95)|(Windows_95)/i],
32
- ["Windows 98", /(Windows 98)|(Win98)/i],
33
- ["Windows 2000", /(Windows NT 5.0)|(Windows 2000)/i],
34
- ["Windows XP", /(Windows NT 5.1)|(Windows XP)/i],
35
- ["Windows Server 2003", /(Windows NT 5.2)/i],
36
- ["Windows Vista", /(Windows NT 6.0)/i],
37
- ["Windows 7", /(Windows NT 6.1)/i],
38
- ["Windows 8", /(Windows NT 6.[23])|(Windows 8)/i],
39
- ["Windows 10", /(Windows NT 10)/i],
40
- ["Windows NT 4.0", /(Windows NT 4.0)|(WinNT4.0)|(WinNT)|(Windows NT)/i],
41
- ["Windows ME", /Windows ME/i],
42
- ["Windows", /Windows/i],
43
- ["Open BSD", /OpenBSD/i],
44
- ["Sun OS", /SunOS/i],
45
- ["Linux", /(Linux)|(X11)/i],
46
- ["Macintosh", /(Mac_PowerPC)|(Macintosh)|(Mac OS X 10.4)|(Mac OS X 10.5)|(Mac OS X 10.6)/i],
47
- ["QNX", /QNX/i],
48
- ["BeOS", /BeOS/i],
49
- ["OS/2", /OS\/2/i]
50
- ];
51
- let e = "";
52
- for (let s = 0; s < t.length; s++)
53
- if (t[s][1].test(navigator.userAgent)) {
54
- e = t[s][0];
55
- break;
56
- }
57
- return e;
58
- }, ao = async () => {
59
- var e;
60
- let t = _e();
61
- if (t === "Windows 10") {
62
- const s = await ((e = navigator == null ? void 0 : navigator.userAgentData) == null ? void 0 : e.getHighEntropyValues(["platformVersion"]));
63
- s && s.platformVersion >= "13" && (t = "Windows 11");
64
- }
65
- return t;
66
- };
67
- class $e {
68
- }
69
- const Se = 100;
70
- let G;
71
- const I = /* @__PURE__ */ new Map(), R = {
72
- width: window.innerWidth,
73
- height: window.innerHeight
74
- };
75
- function ke(t) {
76
- I.set(t, t);
77
- }
78
- function Me(t) {
79
- I.delete(t);
80
- }
81
- function Ve(t) {
82
- clearTimeout(G), G = setTimeout(function() {
83
- t.topEvent = {
84
- widthDiff: R.width - window.innerWidth,
85
- hightDiff: R.height - window.innerHeight
86
- }, R.width = window.innerWidth, R.height = window.innerHeight, I.forEach((e) => e(t));
87
- }, Se);
88
- }
89
- window.addEventListener("resize", Ve);
90
- const We = {
91
- addOnReize: ke,
92
- removeOnResize: Me
93
- };
94
- var x;
95
- const Te = {
96
- widthForMobile: 900,
97
- dateFormat: "Y-m-d",
98
- /**
99
- * Для Москвы: +0300
100
- */
101
- gmt: (x = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : x[1]
102
- };
103
- var ee;
104
- const Be = {
105
- /**
106
- * Device by size
107
- * @see widthForMobile
108
- */
109
- isMobile: !1,
110
- /**
111
- * Device by user agent
112
- */
113
- isMobileUA: !1,
114
- /**
115
- * true, если плотность пикселей экрана больше 1
116
- */
117
- isRetina: !1,
118
- /**
119
- * true, елси это приложение
120
- */
121
- isApp: !1,
122
- /**
123
- * true при горизонтальном расположении устройства
124
- */
125
- isLandscape: !0,
126
- /**
127
- * true при вертикальном расположении устройства
128
- */
129
- isPortrait: !1,
130
- size: 0,
131
- // См. core.options
132
- dateFormat: "Y-m-d",
133
- // См. core.options
134
- gmt: (ee = (/* @__PURE__ */ new Date()).toString().match(/GMT(\S+)/)) == null ? void 0 : ee[1]
135
- }, C = (t) => {
136
- var e, s;
137
- if (!((s = (e = p.$) == null ? void 0 : e.ui) != null && s.tooltip)) {
138
- console.info("Для работы v-top-tooltip требуется глобальная загрузка jQuery UI Tooltip");
139
- return;
140
- }
141
- return p.$(t);
142
- }, K = (t, e) => {
143
- var n;
144
- const s = t.value ?? {};
145
- return s.content ??= (n = e.props) == null ? void 0 : n.title, s.content = String(s.content).replace(/\r\n|\r|\n/g, "<br>"), s.position ??= {
146
- my: "bottom-18px",
147
- at: "top center"
148
- }, s;
149
- }, Le = {
150
- mounted(t, e, s) {
151
- var n;
152
- (n = C(t)) == null || n.tooltip(K(e, s));
153
- },
154
- updated(t, e, s, n) {
155
- var i;
156
- const a = K(e, s), o = (i = C(t)) == null ? void 0 : i.tooltip("instance");
157
- o && (o.options = {
158
- ...o.options,
159
- ...a
160
- });
161
- },
162
- unmounted(t, e, s) {
163
- var n;
164
- (n = C(t)) == null || n.tooltip("destroy");
165
- }
166
- }, Ee = {
167
- mounted: function(t, e) {
168
- (e.value || e.value === void 0) && t.focus();
169
- }
170
- };
171
- let E;
172
- const ze = {
173
- mounted(t, e, s) {
174
- const n = e.value || "top-sticky";
175
- E = new IntersectionObserver((a) => {
176
- let o = a[0].intersectionRatio < 1;
177
- o && e.arg === "bottom" && a[0].intersectionRect.y === 0 && (o = !1), t.classList.toggle(n, o);
178
- }, {
179
- threshold: [1]
180
- }), E.observe(t);
181
- },
182
- unmounted(t, e, s) {
183
- E == null || E.disconnect();
184
- }
185
- };
186
- let Q = !1, z, F;
187
- const P = /* @__PURE__ */ new Map(), De = (t, e) => {
188
- const { distance: s, percent: n } = F, a = t.getBoundingClientRect().top, o = e * n / 100 / s, i = (e - a) / o;
189
- i <= s ? t.style.transform = `translateY(${s - i}px)` : t.style.transform = "translateY(0px)";
190
- }, Ne = (t) => {
191
- let e = window.innerHeight;
192
- window.addEventListener("scroll", () => {
193
- P.forEach((s) => De(s, e));
194
- }, { passive: !0 }), z = new IntersectionObserver((s) => {
195
- e = window.innerHeight, s.forEach((n) => {
196
- const a = n.target;
197
- if (n.intersectionRatio < 0.1 ? P.delete(a) : P.set(a, a), n.intersectionRatio === 0) {
198
- const { distance: o, percent: i } = F;
199
- a.style.transform = `translateY(${o}px)`;
200
- }
201
- });
202
- }, {
203
- threshold: 0.1
204
- });
205
- }, Re = {
206
- mounted(t, e, s) {
207
- var i;
208
- if (p.state.isMobileUA) return;
209
- const n = (i = e.arg) == null ? void 0 : i.split(":");
210
- let a = Number((n == null ? void 0 : n[0]) ?? 100), o = Number((n == null ? void 0 : n[1]) ?? 30);
211
- F = {
212
- distance: a,
213
- percent: o
214
- }, Q || (Ne(), Q = !0), z.observe(t);
215
- },
216
- unmounted(t, e, s) {
217
- P.delete(t), z == null || z.unobserve(t);
218
- }
219
- }, Pe = () => typeof window > "u" ? {} : window, q = Pe();
220
- class p {
221
- /**
222
- * Настройки словаря
223
- */
224
- static L = Y({
225
- Not_date: "Not date"
226
- });
227
- static page = q.page ?? {};
228
- static Page = $e;
229
- static options = Te;
230
- static state = Y({ ...Be });
231
- static matchMediaIsMobile;
232
- static $ = q.$;
233
- /**
234
- * Добавить на страницу стили, используется для загрузки стилей из js
235
- *
236
- * Условная загрузка стилей m и pc отключена в пользу производительсности, стили грузятся всегда, но применяются по условию
237
- * @param style - css стили в строке
238
- * @param type - если указать 'm' или 'pc', то стили будут применяться по условию в зависимости от настройки this.options.widthForMobile
239
- */
240
- static appendStyle(e, s = "") {
241
- let n = "all";
242
- s === "m" && (n = "(max-width: " + this.options.widthForMobile + "px)"), s === "pc" && (n = "(min-width: " + this.options.widthForMobile + "px)");
243
- const a = document.createElement("style");
244
- a.innerHTML = e, a.media = n, document.head.append(a);
245
- }
246
- /**
247
- * Установить как плагин в прилоежнии Vue
248
- * Core.state является общим для всех приложений Vue на странице
249
- * Core.options является общим для всех приложений Vue на странице
250
- * @param app - Vue App
251
- * @param {typeof options} options - параметры UI
252
- */
253
- static install(e, s) {
254
- p.defineOptions(s), e.provide("top-core", p), this.installDirectives(e);
255
- }
256
- static installDirectives(e) {
257
- e.directive("top-tooltip", Le), e.directive("top-focus", Ee), e.directive("top-sticky", ze), e.directive("top-swim-up", Re);
258
- }
259
- /**
260
- * Установить конфигурацию UI
261
- * @param {typeof options} options
262
- */
263
- static defineOptions(e) {
264
- e != null && e.widthForMobile && (this.options.widthForMobile = e.widthForMobile), e != null && e.dateFormat && (this.options.dateFormat = e.dateFormat), e != null && e.gmt && (this.options.gmt = e.gmt), p.setState();
265
- }
266
- static setState() {
267
- p.matchMediaIsMobile = window.matchMedia(`(max-width: ${p.options.widthForMobile}px)`), p.state.isMobileUA = we(), p.state.isRetina = ge(), p.state.isApp = ve(), p.state.dateFormat = this.options.dateFormat, p.state.gmt = this.options.gmt, p.setStateByWindowSize(), We.addOnReize(p.onResize), p.onResize(), p.saveToCookie();
268
- }
269
- static onResize() {
270
- p.setStateByWindowSize(), document.documentElement.style.setProperty("--100vh", window.innerHeight + "px");
271
- }
272
- static setStateByWindowSize() {
273
- var e;
274
- p.state.isMobile = !!((e = p.matchMediaIsMobile) != null && e.matches), p.state.isLandscape = window.innerWidth > window.innerHeight, p.state.isPortrait = !p.state.isLandscape, p.state.size = window.innerWidth > window.innerHeight ? window.innerWidth : window.innerHeight, p.saveToCookie();
275
- }
276
- /**
277
- * Сохранить информацию об устройстве в cookie
278
- */
279
- static saveToCookie() {
280
- const e = [
281
- 1,
282
- window.innerWidth,
283
- window.innerHeight,
284
- window.devicePixelRatio,
285
- Number(p.state.isMobile),
286
- Number(p.state.isRetina)
287
- ];
288
- document.cookie = "device=" + e.join(",") + "; path=/;";
289
- }
290
- }
291
- const V = window.L ?? {}, io = (t, e, s) => {
292
- switch (new Date(t, e, s).getDay()) {
293
- case 0:
294
- return V.Vs + ".";
295
- case 1:
296
- return V.Pn + ".";
297
- case 2:
298
- return V.Vt + ".";
299
- case 3:
300
- return V.Sr + ".";
301
- case 4:
302
- return V.Ct + ".";
303
- case 5:
304
- return V.Pt + ".";
305
- case 6:
306
- return V.Sb + ".";
307
- default:
308
- return "";
309
- }
310
- }, ro = (t, e = !0, s = 2) => {
311
- let n = String(t.getFullYear()), a = String(t.getDate()).padStart(2, "0"), o = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getHours()).padStart(2, "0"), l = String(t.getMinutes()).padStart(2, "0"), f = String(t.getSeconds()).padStart(2, "0"), r = n + "-" + o + "-" + a;
312
- return s >= 1 && (r += " " + i), s >= 2 && (r += ":" + l), s === 3 && (r += ":" + f), e && (r = L(r, s)), r;
313
- };
314
- function lo(t) {
315
- return t.indexOf("T") === -1 && (t.length == 10 && (t += " 00:00:00"), t = t.replace(" ", "T") + p.state.gmt), new Date(t);
316
- }
317
- function Ae(t, e = !0, s = 0) {
318
- let n;
319
- t != null ? n = new Date(t) : n = /* @__PURE__ */ new Date();
320
- const a = n.getFullYear(), o = String(n.getMonth() + 1).padStart(2, "0"), i = n.getDate().toString().padStart(2, "0"), l = n.getHours().toString().padStart(2, "0"), f = n.getMinutes().toString().padStart(2, "0"), r = n.getSeconds().toString().padStart(2, "0");
321
- return n = a + "-" + o + "-" + i, s && (n += " "), s >= 1 && (n += l), s >= 2 && (n += ":" + f), s >= 3 && (n += ":" + r), e && (n = L(n, s)), n;
322
- }
323
- function po(t, e = !0) {
324
- const n = (/* @__PURE__ */ new Date()).getTimezoneOffset() / 60 * -1 * 60 * 60 * 1e3, a = 3 * 60 * 60 * 1e3;
325
- let o;
326
- t !== void 0 ? o = new Date(t) : o = /* @__PURE__ */ new Date(), o.setTime(o.getTime() - n + a);
327
- let i = String(o.getFullYear()), l = String(o.getDate()).padStart(2, "0"), f = String(o.getMonth() + 1).padStart(2, "0"), r = String(o.getHours()).padStart(2, "0"), d = String(o.getMinutes()).padStart(2, "0"), c = String(o.getSeconds()).padStart(2, "0"), b = i + "-" + f + "-" + l + " " + r + ":" + d + ":" + c;
328
- return e && (b = L(b)), b;
329
- }
330
- function L(t, e = 2, s, n = p.L.Not_date) {
331
- if (typeof t == "string" && (!t || t.substring(0, 10) === "0000-00-00") && n && n !== "0000-00-00" || !t) return n;
332
- s || (s = p.state.dateFormat.toLowerCase().toLowerCase().replace("m", "mm").replace("y", "yy").replace("d", "dd"));
333
- let a;
334
- if (t instanceof Date)
335
- a = t;
336
- else {
337
- let i = t.substring(0, 10);
338
- if (i.length === 7 && (i += "-01"), i += " 00:00", i = i.replace(/-/g, "/"), a = new Date(i), isNaN(Number(a))) return n;
339
- }
340
- let o = "";
341
- if (s && window.$ && (o = $.datepicker.formatDate(s, a)), e && typeof t == "string" && t.length > 10 || e && t instanceof Date) {
342
- let i = "";
343
- if (t instanceof Date)
344
- i = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", {
345
- hour12: !1,
346
- hour: "numeric",
347
- minute: e >= 2 ? "numeric" : void 0,
348
- second: e >= 3 ? "numeric" : void 0
349
- });
350
- else
351
- switch (e) {
352
- case 1:
353
- i = t.substring(11, 13);
354
- break;
355
- case 2:
356
- i = t.substring(11, 16);
357
- break;
358
- case 3:
359
- i = t.substring(11, 19);
360
- break;
361
- }
362
- o += " " + i;
363
- }
364
- return o = o.trim(), o;
365
- }
366
- function J(t, e = p.L.Not_date) {
367
- if (!t)
368
- return e;
369
- if (t.match(/\d\d\d\d-\d\d-\d\d/))
370
- return t;
371
- const s = p.state.dateFormat.toLowerCase(), n = t.split(/\W/), a = s.split(/\W/);
372
- let o = "", i = "", l = "";
373
- a.forEach((r, d) => {
374
- switch (r) {
375
- case "d":
376
- o = n[d];
377
- break;
378
- case "m":
379
- i = n[d];
380
- break;
381
- case "y":
382
- l = n[d];
383
- break;
384
- }
385
- });
386
- let f = l + "-" + i + "-" + o;
387
- return f.match(/\d\d\d\d-\d\d-\d\d/) || (console.info("Неверный формат даты, будет возращена текущая дата, " + f), f = Ae((/* @__PURE__ */ new Date()).getTime(), !1).substring(0, 10)), f;
388
- }
389
- const Oe = { class: "top-avatar" }, Ce = ["src", "title"], He = ["title"], Ie = /* @__PURE__ */ y({
390
- __name: "avatar",
391
- props: {
392
- size: { default: 64 },
393
- image: {},
394
- nickname: {},
395
- isOnline: { type: Boolean },
396
- lastActiveTime: {},
397
- i18n: { default: () => ({
398
- Online: "Online",
399
- LastSeen: "Last seen"
400
- }) }
401
- },
402
- setup(t) {
403
- te((a) => ({
404
- "15bd2dfc": a.size + "px"
405
- }));
406
- const e = t, s = h(() => {
407
- var a, o;
408
- if (e.isOnline)
409
- return (a = e.i18n) == null ? void 0 : a.Online;
410
- if (e.lastActiveTime)
411
- return ((o = e.i18n) == null ? void 0 : o.LastSeen) + ": " + L(e.lastActiveTime, 2);
412
- }), n = h(() => e.nickname ? e.nickname + (s.value ? `
413
- ${s.value}` : "") : s.value);
414
- return (a, o) => (u(), m("div", Oe, [
415
- _("img", {
416
- class: "top-avatar_image",
417
- src: a.image,
418
- title: n.value,
419
- alt: ""
420
- }, null, 8, Ce),
421
- a.isOnline ? (u(), m("div", {
422
- key: 0,
423
- class: "top-avatar_status",
424
- title: s.value
425
- }, null, 8, He)) : g("", !0)
426
- ]));
427
- }
428
- }), Fe = {
429
- "top-avatar": "top-avatar",
430
- "top-avatar_image": "top-avatar_image",
431
- "top-avatar_status": "top-avatar_status"
432
- }, v = (t, e) => {
433
- const s = t.__vccOpts || t;
434
- for (const [n, a] of e)
435
- s[n] = a;
436
- return s;
437
- }, Ue = {
438
- $style: Fe
439
- }, uo = /* @__PURE__ */ v(Ie, [["__cssModules", Ue]]), Ye = {
440
- key: 0,
441
- class: "top-ellipsis"
442
- }, Xe = /* @__PURE__ */ y({
443
- __name: "button",
444
- props: {
445
- color: { default: "blue" },
446
- styling: { default: "" },
447
- size: { default: "s" },
448
- name: {},
449
- title: {},
450
- icon: {},
451
- icon2: {},
452
- href: {},
453
- disabled: { type: Boolean },
454
- isSubmit: { type: Boolean },
455
- isActive: { type: Boolean },
456
- isProgress: { type: Boolean }
457
- },
458
- setup(t) {
459
- const e = t, s = h(() => e.href ? "a" : "button"), n = h(() => e.isSubmit ? "submit" : void 0);
460
- return (a, o) => (u(), M(re(s.value), {
461
- class: w({
462
- "top-active": a.isActive,
463
- "top-disabled": a.disabled,
464
- "top-forms-focusable": !a.disabled,
465
- "top-button": !0,
466
- "top-button-progress": a.isProgress,
467
- [`top-size_${a.size}`]: !!a.size,
468
- [`top-color_${a.color}`]: !0,
469
- [`top-style_${a.styling}`]: !!a.styling,
470
- "top-button-withoutText": !a.$slots.default
471
- }),
472
- name: a.name,
473
- title: a.title,
474
- href: a.href,
475
- type: n.value,
476
- "data-top-icon": a.icon || void 0,
477
- "data-top-icon2": a.icon2 || void 0,
478
- disabled: a.disabled || void 0,
479
- inProgress: a.isProgress
480
- }, {
481
- default: D(() => [
482
- a.$slots.default ? (u(), m("span", Ye, [
483
- k(a.$slots, "default", {}, () => [
484
- le(W(a.icon ? "" : "Button"), 1)
485
- ])
486
- ])) : g("", !0),
487
- k(a.$slots, "html")
488
- ]),
489
- _: 3
490
- }, 8, ["class", "name", "title", "href", "type", "data-top-icon", "data-top-icon2", "disabled", "inProgress"]));
491
- }
492
- }), Ge = "_progress_1f1nw_1", Ke = {
493
- "top-button": "top-button",
494
- "top-active": "top-active",
495
- "top-button-progress": "top-button-progress",
496
- progress: Ge,
497
- "top-button-withoutText": "top-button-withoutText",
498
- "top-color_blue": "top-color_blue",
499
- "top-color_green": "top-color_green",
500
- "top-color_orange": "top-color_orange",
501
- "top-color_red": "top-color_red",
502
- "top-color_pink": "top-color_pink",
503
- "top-color_theme": "top-color_theme",
504
- "top-style_outline": "top-style_outline",
505
- "top-style_soft": "top-style_soft",
506
- "top-style_transparent": "top-style_transparent",
507
- "top-size_l": "top-size_l",
508
- "top-size_xl": "top-size_xl"
509
- }, Qe = {
510
- $style: Ke
511
- }, co = /* @__PURE__ */ v(Xe, [["__cssModules", Qe]]), qe = { class: "top-forms-optionLabel" }, Je = /* @__PURE__ */ y({
512
- __name: "controlLabel",
513
- props: {
514
- description: {},
515
- disabled: { type: Boolean }
516
- },
517
- setup(t) {
518
- return (e, s) => (u(), m("div", qe, [
519
- _("div", {
520
- class: w({
521
- "top-forms-optionLabel_title": !0,
522
- "top-forms-optionLabel_title-disabled": e.disabled
523
- })
524
- }, [
525
- k(e.$slots, "default")
526
- ], 2),
527
- e.description ? (u(), m("div", {
528
- key: 0,
529
- class: w(["top-forms-optionLabel_description", { "top-forms-optionLabel_description-disabled": e.disabled }])
530
- }, W(e.description), 3)) : g("", !0)
531
- ]));
532
- }
533
- }), Ze = {
534
- "top-forms-optionLabel": "top-forms-optionLabel",
535
- "top-forms-optionLabel_title": "top-forms-optionLabel_title",
536
- "top-forms-optionLabel_title-disabled": "top-forms-optionLabel_title-disabled",
537
- "top-forms-optionLabel_description": "top-forms-optionLabel_description",
538
- "top-forms-optionLabel_description-disabled": "top-forms-optionLabel_description-disabled"
539
- }, je = {
540
- $style: Ze
541
- }, U = /* @__PURE__ */ v(Je, [["__cssModules", je]]), xe = ["name", "value", "indeterminate", "disabled"], et = /* @__PURE__ */ y({
542
- __name: "checkbox",
543
- props: /* @__PURE__ */ H({
544
- modelValue: { type: [Boolean, Array, Set] },
545
- name: {},
546
- value: {},
547
- description: {},
548
- disabled: { type: Boolean },
549
- indeterminate: { type: Boolean },
550
- isError: { type: Boolean }
551
- }, {
552
- modelValue: { type: [Boolean, Array, Set] },
553
- modelModifiers: {}
554
- }),
555
- emits: ["update:modelValue"],
556
- setup(t) {
557
- const e = oe(t, "modelValue");
558
- return (s, n) => (u(), m("label", {
559
- class: w({
560
- "top-forms-optionWrapper": !0,
561
- "top-checkbox": !0,
562
- ["top-checkbox_" + s.name]: !!s.name,
563
- "top-disabled": s.disabled,
564
- "top-error": s.isError && !s.disabled
565
- })
566
- }, [
567
- T(_("input", {
568
- type: "checkbox",
569
- class: w({
570
- "top-forms-focusable": !s.disabled,
571
- "top-forms-option": !0,
572
- "top-checkbox_input": !0,
573
- "top-error": s.isError && !s.disabled
574
- }),
575
- name: s.name,
576
- "onUpdate:modelValue": n[0] || (n[0] = (a) => e.value = a),
577
- value: s.value,
578
- indeterminate: s.indeterminate,
579
- disabled: s.disabled
580
- }, null, 10, xe), [
581
- [se, e.value]
582
- ]),
583
- s.$slots.default ? (u(), M(U, {
584
- key: 0,
585
- description: s.description,
586
- disabled: s.disabled
587
- }, {
588
- default: D(() => [
589
- k(s.$slots, "default")
590
- ]),
591
- _: 3
592
- }, 8, ["description", "disabled"])) : g("", !0)
593
- ], 2));
594
- }
595
- }), tt = {
596
- "top-checkbox": "top-checkbox",
597
- "top-checkbox_input": "top-checkbox_input",
598
- "top-error": "top-error"
599
- }, ot = {
600
- $style: tt
601
- }, mo = /* @__PURE__ */ v(et, [["__cssModules", ot]]), st = ["title"], nt = /* @__PURE__ */ y({
602
- __name: "hint",
603
- props: {
604
- hint: {}
605
- },
606
- setup(t) {
607
- return (e, s) => (u(), m("span", {
608
- class: "top-hint",
609
- "data-top-icon": "",
610
- title: e.hint
611
- }, null, 8, st));
612
- }
613
- }), at = {
614
- "top-hint": "top-hint"
615
- }, it = {
616
- $style: at
617
- }, rt = /* @__PURE__ */ v(nt, [["__cssModules", it]]), lt = ["modelValue"], dt = !!document.documentElement.ontouchstart && !!document.createElement("input").showPicker;
618
- let Z = (t) => {
619
- };
620
- const pt = /* @__PURE__ */ y({
621
- __name: "inputDate",
622
- props: {
623
- modelValue: {},
624
- name: {},
625
- disabled: { type: Boolean },
626
- readonly: { type: Boolean },
627
- modificator: {},
628
- size: {},
629
- isError: { type: Boolean },
630
- isLoading: { type: Boolean },
631
- icon: {},
632
- icon2: { default: "" },
633
- addCleaner: { type: Boolean },
634
- title: {},
635
- captionType: {}
636
- },
637
- emits: ["update:modelValue"],
638
- setup(t, { emit: e }) {
639
- const s = t, n = e;
640
- de(() => {
641
- o && o.datepicker("destroy");
642
- });
643
- const a = pe();
644
- let o;
645
- const i = h({
646
- get() {
647
- return L(s.modelValue, 2, void 0, "0000-00-00");
648
- },
649
- set(d) {
650
- d = J(d, "0000-00-00"), n("update:modelValue", d);
651
- }
652
- });
653
- let l = (d) => {
654
- Z(d);
655
- }, f = (d) => {
656
- const c = J(d.target.value), b = L(c);
657
- if (!b || b === p.L.Not_date || d.target.value !== b) {
658
- d.target.value = i.value;
659
- return;
660
- }
661
- i.value = d.target.value;
662
- };
663
- async function r(d) {
664
- const c = await import("./datepicker-D1JLNEmV.es.js");
665
- Z = c.oninput, o = c.connectDatepicker(d.target, {
666
- onSelect: () => f(d)
667
- }), o && o.datepicker("show");
668
- }
669
- return (d, c) => B(dt) ? (u(), M(B(j), A({ key: 0 }, d.$props, {
670
- modelValue: i.value,
671
- readonly: "",
672
- onClick: c[1] || (c[1] = (b) => a.value.showPicker())
673
- }), {
674
- default: D(() => [
675
- _("input", {
676
- ref_key: "el",
677
- ref: a,
678
- type: "date",
679
- class: "top-input_input-date",
680
- modelValue: d.modelValue,
681
- onChange: c[0] || (c[0] = (b) => i.value = b.target.value),
682
- tabindex: "-1"
683
- }, null, 40, lt)
684
- ]),
685
- _: 1
686
- }, 16, ["modelValue"])) : (u(), M(B(j), A({ key: 1 }, d.$props, {
687
- modelValue: i.value,
688
- "onUpdate:modelValue": c[2] || (c[2] = (b) => b === "" ? i.value = "" : ""),
689
- onInput: B(l),
690
- onFocusOnce: r,
691
- onChange: B(f),
692
- modificator: "datepicker"
693
- }), null, 16, ["modelValue", "onInput", "onChange"]));
694
- }
695
- }), ut = {
696
- "top-input-datepicker": "top-input-datepicker",
697
- "top-input_input-date": "top-input_input-date"
698
- }, ct = {
699
- $style: ut
700
- }, fo = /* @__PURE__ */ v(pt, [["__cssModules", ct]]), mt = { class: "top-inputRange" }, ft = /* @__PURE__ */ _("span", { class: "top-inputRange_dash" }, " — ", -1), bt = /* @__PURE__ */ y({
701
- __name: "inputRange",
702
- setup(t) {
703
- return (e, s) => (u(), m("div", mt, [
704
- k(e.$slots, "from"),
705
- ft,
706
- k(e.$slots, "to")
707
- ]));
708
- }
709
- }), ht = {
710
- "top-inputRange": "top-inputRange",
711
- "top-inputRange_dash": "top-inputRange_dash",
712
- "top-input": "top-input"
713
- }, gt = {
714
- $style: ht
715
- }, bo = /* @__PURE__ */ v(bt, [["__cssModules", gt]]), wt = ["name", "value", "disabled"], vt = /* @__PURE__ */ y({
716
- __name: "radio",
717
- props: {
718
- modelValue: {},
719
- value: {},
720
- name: {},
721
- description: {},
722
- disabled: { type: Boolean },
723
- isError: { type: Boolean }
724
- },
725
- emits: ["update:modelValue"],
726
- setup(t, { emit: e }) {
727
- const s = t, n = e, a = h({
728
- get() {
729
- return s.modelValue;
730
- },
731
- set(o) {
732
- n("update:modelValue", o);
733
- }
734
- });
735
- return (o, i) => (u(), m("label", {
736
- class: w({
737
- "top-forms-optionWrapper": !0,
738
- "top-radio": !0,
739
- ["top-radio_" + o.name]: o.name !== "",
740
- "top-disabled": o.disabled,
741
- "top-error": o.isError && !o.disabled
742
- })
743
- }, [
744
- T(_("input", {
745
- type: "radio",
746
- class: w({
747
- "top-forms-focusable": !o.disabled,
748
- "top-forms-option": !0,
749
- "top-radio_input": !0,
750
- "top-error": o.isError && !o.disabled
751
- }),
752
- "onUpdate:modelValue": i[0] || (i[0] = (l) => a.value = l),
753
- name: o.name,
754
- value: o.value,
755
- disabled: o.disabled
756
- }, null, 10, wt), [
757
- [ue, a.value]
758
- ]),
759
- o.$slots.default ? (u(), M(U, {
760
- key: 0,
761
- description: o.description,
762
- disabled: o.disabled
763
- }, {
764
- default: D(() => [
765
- k(o.$slots, "default")
766
- ]),
767
- _: 3
768
- }, 8, ["description", "disabled"])) : g("", !0)
769
- ], 2));
770
- }
771
- }), yt = {
772
- "top-radio": "top-radio",
773
- "top-radio_input": "top-radio_input",
774
- "top-error": "top-error"
775
- }, _t = {
776
- $style: yt
777
- }, ho = /* @__PURE__ */ v(vt, [["__cssModules", _t]]), $t = ["name", "value", "disabled"], St = /* @__PURE__ */ y({
778
- __name: "switcher",
779
- props: {
780
- modelValue: { type: [Boolean, Array, Set] },
781
- name: {},
782
- value: {},
783
- description: {},
784
- disabled: { type: Boolean },
785
- isError: { type: Boolean }
786
- },
787
- emits: ["update:modelValue"],
788
- setup(t, { emit: e }) {
789
- const s = t, n = e, a = h({
790
- get() {
791
- return s.modelValue;
792
- },
793
- set(o) {
794
- n("update:modelValue", o);
795
- }
796
- });
797
- return (o, i) => (u(), m("label", {
798
- class: w({
799
- "top-forms-optionWrapper": !0,
800
- "top-checkboxSwitcher": !0,
801
- "top-disabled": o.disabled,
802
- "top-error": o.isError && !o.disabled
803
- })
804
- }, [
805
- T(_("input", {
806
- type: "checkbox",
807
- class: w({
808
- "top-forms-focusable": !o.disabled,
809
- "top-forms-option": !0,
810
- "top-checkboxSwitcher_input": !0,
811
- "top-error": o.isError && !o.disabled
812
- }),
813
- "onUpdate:modelValue": i[0] || (i[0] = (l) => a.value = l),
814
- name: o.name,
815
- value: o.value,
816
- disabled: o.disabled
817
- }, null, 10, $t), [
818
- [se, a.value]
819
- ]),
820
- o.$slots.default ? (u(), M(U, {
821
- key: 0,
822
- description: o.description,
823
- disabled: o.disabled
824
- }, {
825
- default: D(() => [
826
- k(o.$slots, "default")
827
- ]),
828
- _: 3
829
- }, 8, ["description", "disabled"])) : g("", !0)
830
- ], 2));
831
- }
832
- }), kt = {
833
- "top-checkboxSwitcher": "top-checkboxSwitcher",
834
- "top-checkboxSwitcher_input": "top-checkboxSwitcher_input",
835
- "top-error": "top-error"
836
- }, Mt = {
837
- $style: kt
838
- }, go = /* @__PURE__ */ v(St, [["__cssModules", Mt]]), Vt = ["name", "placeholder", "disabled", "readonly", "rows"], Wt = {
839
- key: 0,
840
- class: "top-textarea_pseudoContent"
841
- }, Tt = /* @__PURE__ */ y({
842
- inheritAttrs: !1,
843
- __name: "textarea",
844
- props: {
845
- modelValue: {},
846
- name: {},
847
- placeholder: {},
848
- rows: { default: 5 },
849
- minHeight: { default: 120 },
850
- expandable: { type: Boolean },
851
- disabled: { type: Boolean },
852
- readonly: { type: Boolean },
853
- isError: { type: Boolean },
854
- hint: {}
855
- },
856
- emits: ["update:modelValue"],
857
- setup(t, { emit: e }) {
858
- te((o) => ({
859
- "6e3fbb58": o.minHeight + "px"
860
- }));
861
- const s = t, n = e, a = h({
862
- get() {
863
- return s.modelValue;
864
- },
865
- set(o) {
866
- n("update:modelValue", o);
867
- }
868
- });
869
- return (o, i) => {
870
- const l = ce("top-tooltip");
871
- return u(), m("label", {
872
- class: w({
873
- "top-textarea": !0,
874
- ["top-textarea-" + o.name]: o.name,
875
- "top-disabled": o.disabled
876
- })
877
- }, [
878
- T(_("textarea", A({
879
- type: "text",
880
- class: {
881
- "top-forms-focusable": !o.disabled,
882
- "top-textarea_textarea": !0,
883
- "top-textarea_textarea-expandable": o.expandable,
884
- "top-error": o.isError
885
- },
886
- autocomplete: "off_always",
887
- name: o.name,
888
- placeholder: o.placeholder,
889
- disabled: o.disabled,
890
- readonly: o.readonly,
891
- rows: o.expandable ? void 0 : o.rows
892
- }, o.$attrs, {
893
- "onUpdate:modelValue": i[0] || (i[0] = (f) => a.value = f)
894
- }), null, 16, Vt), [
895
- [ne, a.value]
896
- ]),
897
- o.expandable ? (u(), m("div", Wt, W(a.value + " "), 1)) : g("", !0),
898
- o.hint ? T((u(), M(rt, {
899
- key: 1,
900
- class: "top-textarea_hint",
901
- hint: o.hint
902
- }, null, 8, ["hint"])), [
903
- [l]
904
- ]) : g("", !0)
905
- ], 2);
906
- };
907
- }
908
- }), Bt = {
909
- "top-textarea": "top-textarea",
910
- "top-textarea_textarea": "top-textarea_textarea",
911
- "top-textarea_textarea-expandable": "top-textarea_textarea-expandable",
912
- "top-textarea_pseudoContent": "top-textarea_pseudoContent",
913
- "top-textarea_hint": "top-textarea_hint"
914
- }, Lt = {
915
- $style: Bt
916
- }, wo = /* @__PURE__ */ v(Tt, [["__cssModules", Lt]]), Et = ["data-value", "data-top-icon", "data-top-icon2"], zt = ["name", "disabled"], Dt = ["label", "disabled"], Nt = ["value", "selected", "disabled"], Rt = ["value", "selected", "disabled"], Pt = {
917
- key: 1,
918
- class: "top-formsCaption"
919
- }, At = /* @__PURE__ */ y({
920
- __name: "select",
921
- props: /* @__PURE__ */ H({
922
- modelValue: {},
923
- options: {},
924
- name: {},
925
- disabled: { type: Boolean },
926
- icon: {},
927
- size: { default: "s" },
928
- addChanger: { type: Boolean },
929
- title: {},
930
- isError: { type: Boolean }
931
- }, {
932
- modelValue: {
933
- required: !0
934
- },
935
- modelModifiers: {}
936
- }),
937
- emits: /* @__PURE__ */ H(["update:modelValue"], ["update:modelValue"]),
938
- setup(t, { emit: e }) {
939
- const s = t, n = oe(t, "modelValue"), a = h(() => {
940
- const r = /* @__PURE__ */ new Map();
941
- return s.options.forEach((d, c) => {
942
- if (typeof d == "string" && (d = i(c, d)), d.children) {
943
- const b = /* @__PURE__ */ new Map();
944
- d.children.forEach((S, N) => {
945
- typeof S == "string" && (S = i(N, S)), b.set(S.value, S);
946
- }), d = { ...d }, d.children = b, r.set(d.value, d);
947
- } else
948
- r.set(d.value, d);
949
- }), r;
950
- }), o = h(() => {
951
- const r = /* @__PURE__ */ new Map();
952
- return a.value.forEach((d) => {
953
- if (!d.disabled) {
954
- if (d.children) {
955
- d.children.forEach((c) => {
956
- c.disabled || r.set(c.value, c);
957
- });
958
- return;
959
- }
960
- r.set(d.value, d);
961
- }
962
- }), r;
963
- }), i = (r, d) => ({
964
- value: r,
965
- title: d
966
- });
967
- me([
968
- () => s.modelValue,
969
- o
970
- ], () => {
971
- (n.value === null || n.value === void 0) && o.value.size && (console.warn("Пожалуйста, не передавайте в компонент Select значения null и undefined"), n.value = o.value.keys().next().value);
972
- }, { immediate: !0 });
973
- const l = h(() => {
974
- var r;
975
- return (r = o.value.get(n.value)) == null ? void 0 : r.icon;
976
- }), f = () => {
977
- const r = [...o.value.keys()], c = (r.indexOf(n.value) + 1) % r.length;
978
- n.value = r[c];
979
- };
980
- return (r, d) => (u(), m("label", {
981
- class: w({
982
- "top-select": !0,
983
- ["top-select-" + r.name]: r.name,
984
- ["top-size_" + r.size]: !0,
985
- "top-formsCaptionWrapper": !!r.title,
986
- "top-select-error": r.isError,
987
- "top-disabled": r.disabled
988
- }),
989
- "data-value": n.value,
990
- "data-top-icon": r.icon,
991
- "data-top-icon2": l.value
992
- }, [
993
- T(_("select", {
994
- class: w({
995
- "top-forms-focusable": !r.disabled,
996
- "top-select_select": !0,
997
- "top-select_arrow": !0,
998
- "top-error": r.isError
999
- }),
1000
- name: r.name,
1001
- disabled: r.disabled,
1002
- "onUpdate:modelValue": d[0] || (d[0] = (c) => n.value = c)
1003
- }, [
1004
- (u(!0), m(O, null, X(a.value, ([c, b]) => (u(), m(O, null, [
1005
- b.children ? (u(), m("optgroup", {
1006
- key: "group_" + c,
1007
- label: b.title,
1008
- disabled: b.disabled
1009
- }, [
1010
- (u(!0), m(O, null, X(b.children, ([S, N]) => (u(), m("option", {
1011
- key: S,
1012
- value: S,
1013
- selected: S === n.value,
1014
- disabled: N.disabled
1015
- }, W(N.title), 9, Nt))), 128))
1016
- ], 8, Dt)) : (u(), m("option", {
1017
- key: c ?? void 0,
1018
- value: c,
1019
- selected: c === n.value,
1020
- disabled: b.disabled
1021
- }, W(b.title), 9, Rt))
1022
- ], 64))), 256))
1023
- ], 10, zt), [
1024
- [fe, n.value]
1025
- ]),
1026
- r.addChanger && o.value.size && !r.disabled ? (u(), m("span", {
1027
- key: 0,
1028
- class: "top-changer",
1029
- onClick: f
1030
- })) : g("", !0),
1031
- r.title ? (u(), m("span", Pt, W(r.title), 1)) : g("", !0)
1032
- ], 10, Et));
1033
- }
1034
- }), Ot = {
1035
- "top-select": "top-select",
1036
- "top-select-error": "top-select-error",
1037
- "top-select_select": "top-select_select",
1038
- "top-changer": "top-changer"
1039
- }, Ct = {
1040
- $style: Ot
1041
- }, vo = /* @__PURE__ */ v(At, [["__cssModules", Ct]]), Ht = {
1042
- "top-loadbar": "top-loadbar"
1043
- }, It = {}, Ft = { class: "top-loadbar" };
1044
- function Ut(t, e) {
1045
- return u(), m("div", Ft);
1046
- }
1047
- const Yt = {
1048
- $style: Ht
1049
- }, Xt = /* @__PURE__ */ v(It, [["render", Ut], ["__cssModules", Yt]]), Gt = ["data-top-icon", "data-top-icon2"], Kt = ["name", "title", "placeholder", "disabled", "readonly"], Qt = {
1050
- key: 2,
1051
- class: "top-formsCaption"
1052
- }, qt = /* @__PURE__ */ y({
1053
- inheritAttrs: !1,
1054
- __name: "input",
1055
- props: {
1056
- modelValue: {},
1057
- name: {},
1058
- disabled: { type: Boolean },
1059
- readonly: { type: Boolean },
1060
- modificator: {},
1061
- size: { default: "s" },
1062
- isError: { type: Boolean },
1063
- isLoading: { type: Boolean },
1064
- icon: {},
1065
- icon2: {},
1066
- addCleaner: { type: Boolean },
1067
- title: {},
1068
- captionType: { default: "" }
1069
- },
1070
- emits: ["update:modelValue"],
1071
- setup(t, { emit: e }) {
1072
- const s = t, n = e, a = h({
1073
- get() {
1074
- return s.modelValue;
1075
- },
1076
- set(l) {
1077
- n("update:modelValue", l);
1078
- }
1079
- }), o = h(() => s.addCleaner && !s.title || s.captionType !== "" ? "" : s.title), i = (l) => {
1080
- s.modelValue && l.stopPropagation(), n("update:modelValue", "");
1081
- };
1082
- return (l, f) => (u(), m("label", {
1083
- class: w({
1084
- "top-input": !0,
1085
- ["top-size_" + l.size]: !0,
1086
- "top-disabled": l.disabled,
1087
- ["top-input-" + l.modificator]: !!l.modificator,
1088
- "top-input-withCleaner": l.addCleaner && a.value && a.value !== "0000-00-00",
1089
- "top-formsCaptionWrapper": l.captionType !== "",
1090
- "top-formsCaptionWrapper-always": l.captionType === "top"
1091
- }),
1092
- "data-top-icon": l.icon,
1093
- "data-top-icon2": l.icon2
1094
- }, [
1095
- l.isLoading ? (u(), M(B(Xt), { key: 0 })) : g("", !0),
1096
- T(_("input", A({
1097
- type: "text",
1098
- class: {
1099
- "top-input_input": !0,
1100
- ["top-input_input-" + l.modificator]: !!l.modificator,
1101
- "top-forms-focusable": !l.disabled,
1102
- "top-error": l.isError
1103
- },
1104
- autocomplete: "off_always",
1105
- name: l.name,
1106
- "onUpdate:modelValue": f[0] || (f[0] = (r) => a.value = r),
1107
- title: l.title,
1108
- placeholder: o.value,
1109
- disabled: l.disabled,
1110
- readonly: l.readonly,
1111
- onKeydown: f[1] || (f[1] = be((r) => (l.addCleaner || !!l.$slots.btn) && i(r), ["esc"]))
1112
- }, l.$attrs), null, 16, Kt), [
1113
- [ne, a.value]
1114
- ]),
1115
- l.addCleaner && a.value && a.value !== "0000-00-00" ? (u(), m("span", {
1116
- key: 1,
1117
- class: "top-input_cleaner",
1118
- "data-top-icon": "",
1119
- onClick: he(i, ["prevent"])
1120
- })) : g("", !0),
1121
- l.captionType !== "" ? (u(), m("span", Qt, W(l.title), 1)) : g("", !0),
1122
- k(l.$slots, "default")
1123
- ], 10, Gt));
1124
- }
1125
- }), Jt = {
1126
- "top-input": "top-input",
1127
- "top-input_input": "top-input_input",
1128
- "top-input-withCleaner": "top-input-withCleaner",
1129
- "top-input_cleaner": "top-input_cleaner",
1130
- "top-loadbar": "top-loadbar"
1131
- }, Zt = {
1132
- $style: Jt
1133
- }, j = /* @__PURE__ */ v(qt, [["__cssModules", Zt]]);
1134
- export {
1135
- co as B,
1136
- p as C,
1137
- We as E,
1138
- rt as H,
1139
- j as I,
1140
- Xt as L,
1141
- wo as T,
1142
- q as _,
1143
- v as a,
1144
- ge as b,
1145
- we as c,
1146
- L as d,
1147
- ve as e,
1148
- ye as f,
1149
- to as g,
1150
- oo as h,
1151
- eo as i,
1152
- so as j,
1153
- no as k,
1154
- ao as l,
1155
- io as m,
1156
- ro as n,
1157
- Ae as o,
1158
- po as p,
1159
- J as q,
1160
- uo as r,
1161
- lo as s,
1162
- mo as t,
1163
- U as u,
1164
- fo as v,
1165
- bo as w,
1166
- ho as x,
1167
- go as y,
1168
- vo as z
1169
- };
1170
- //# sourceMappingURL=forms-S36M7cBH.es.js.map