@topvisor/ui 0.9.26 → 0.9.27-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 (229) hide show
  1. package/.chunks/datepicker-34kJtztn.amd.js +234 -0
  2. package/.chunks/datepicker-34kJtztn.amd.js.map +1 -0
  3. package/.chunks/datepicker-DwZTG-k0.es.js +276 -0
  4. package/.chunks/datepicker-DwZTG-k0.es.js.map +1 -0
  5. package/.chunks/forms-1ZAO_mt8.es.js +1179 -0
  6. package/.chunks/forms-1ZAO_mt8.es.js.map +1 -0
  7. package/.chunks/forms-D_IeAEJM.amd.js +3 -0
  8. package/.chunks/forms-D_IeAEJM.amd.js.map +1 -0
  9. package/.chunks/{listItem.vue_vue_type_script_setup_true_lang-Caw4oFU-.es.js → listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js} +38 -38
  10. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js.map +1 -0
  11. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js +2 -0
  12. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-HVMrwfs6.amd.js.map +1 -0
  13. package/.chunks/menu-C-SkDk9B.amd.js +2 -0
  14. package/.chunks/menu-C-SkDk9B.amd.js.map +1 -0
  15. package/.chunks/menu-CBKYqQZZ.es.js +120 -0
  16. package/.chunks/menu-CBKYqQZZ.es.js.map +1 -0
  17. package/.chunks/{popup-Dfz5hkrQ.amd.js → popup-7Bt5JEDW.amd.js} +386 -386
  18. package/.chunks/popup-7Bt5JEDW.amd.js.map +1 -0
  19. package/.chunks/{popup-ZmdXZkvb.es.js → popup-D0tRWEp2.es.js} +438 -445
  20. package/.chunks/popup-D0tRWEp2.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-BxO9y9L7.amd.js → widgetInput-CeUAGCKd.amd.js} +2 -2
  24. package/.chunks/widgetInput-CeUAGCKd.amd.js.map +1 -0
  25. package/.chunks/{widgetInput-DPOH_qya.es.js → widgetInput-CmVe9G3z.es.js} +2 -2
  26. package/.chunks/widgetInput-CmVe9G3z.es.js.map +1 -0
  27. package/README.md +86 -86
  28. package/assets/forms.css +1 -1
  29. package/assets/formsExt.css +1 -1
  30. package/assets/menu.css +1 -0
  31. package/assets/project.css +1 -0
  32. package/core/core.amd.js +1 -1
  33. package/core/core.js +1 -1
  34. package/forms/forms.amd.js +1 -1
  35. package/forms/forms.js +8 -8
  36. package/forms/helpers.amd.js.map +1 -1
  37. package/forms/helpers.js.map +1 -1
  38. package/formsExt/formsExt.amd.js +1 -1
  39. package/formsExt/formsExt.amd.js.map +1 -1
  40. package/formsExt/formsExt.js +297 -390
  41. package/formsExt/formsExt.js.map +1 -1
  42. package/icomoon/Read Me.txt +7 -7
  43. package/icomoon/demo-files/demo.css +161 -161
  44. package/icomoon/demo-files/demo.js +30 -30
  45. package/icomoon/demo.html +3239 -3225
  46. package/icomoon/fonts/Topvisor-2.svg +253 -252
  47. package/icomoon/fonts/Topvisor-2.ttf +0 -0
  48. package/icomoon/fonts/Topvisor-2.woff +0 -0
  49. package/icomoon/selection.json +1 -1
  50. package/icomoon/style.css +710 -707
  51. package/package.json +20 -20
  52. package/popup/popup.amd.js +1 -1
  53. package/popup/popup.js +2 -2
  54. package/popup/worker.amd.js +1 -1
  55. package/popup/worker.amd.js.map +1 -1
  56. package/popup/worker.d.ts +2 -0
  57. package/popup/worker.js +4 -6
  58. package/popup/worker.js.map +1 -1
  59. package/project/project.amd.js +2 -0
  60. package/project/project.amd.js.map +1 -0
  61. package/project/project.d.ts +1 -0
  62. package/project/project.js +93 -0
  63. package/project/project.js.map +1 -0
  64. package/require/css.amd.js +11 -11
  65. package/src/components/forms/avatar/avatar.d.ts +9 -0
  66. package/src/components/forms/avatar/avatar.stories.d.ts +38 -13
  67. package/src/components/forms/avatar/avatar.vue.d.ts +17 -4
  68. package/src/components/forms/button/button.d.ts +2 -2
  69. package/src/components/forms/button/button.stories.d.ts +59 -58
  70. package/src/components/forms/button/button.vue.d.ts +7 -6
  71. package/src/components/forms/checkbox/checkbox.stories.d.ts +35 -34
  72. package/src/components/forms/checkbox/checkbox.vue.d.ts +16 -16
  73. package/src/components/forms/controlLabel/controlLabel.stories.d.ts +13 -13
  74. package/src/components/forms/controlLabel/controlLabel.vue.d.ts +3 -2
  75. package/src/components/forms/hint/hint.stories.d.ts +44 -44
  76. package/src/components/forms/hint/hint.vue.d.ts +3 -2
  77. package/src/components/forms/input/input.d.ts +2 -2
  78. package/src/components/forms/input/input.stories.d.ts +64 -63
  79. package/src/components/forms/input/input.vue.d.ts +7 -6
  80. package/src/components/forms/inputDate/inputDate.d.ts +2 -1
  81. package/src/components/forms/inputDate/inputDate.stories.d.ts +31 -30
  82. package/src/components/forms/inputDate/inputDate.vue.d.ts +5 -4
  83. package/src/components/forms/inputRange/inputRange.stories.d.ts +93 -92
  84. package/src/components/forms/inputRange/inputRange.vue.d.ts +1 -1
  85. package/src/components/forms/loadbar/loadbar.stories.d.ts +1 -1
  86. package/src/components/forms/loadbar/loadbar.vue.d.ts +1 -1
  87. package/src/components/forms/radio/radio.stories.d.ts +33 -32
  88. package/src/components/forms/radio/radio.vue.d.ts +4 -3
  89. package/src/components/forms/select/select.d.ts +2 -2
  90. package/src/components/forms/select/select.stories.d.ts +24 -23
  91. package/src/components/forms/select/select.vue.d.ts +22 -22
  92. package/src/components/forms/select/stories/exampleOptions.d.ts +2 -1
  93. package/src/components/forms/switcher/switcher.stories.d.ts +33 -32
  94. package/src/components/forms/switcher/switcher.vue.d.ts +4 -3
  95. package/src/components/forms/textarea/textarea.stories.d.ts +25 -24
  96. package/src/components/forms/textarea/textarea.vue.d.ts +5 -4
  97. package/src/components/formsExt/editArea/editArea.d.ts +18 -4
  98. package/src/components/formsExt/editArea/editArea.stories.d.ts +69 -52
  99. package/src/components/formsExt/editArea/editArea.vue.d.ts +17 -8
  100. package/src/components/formsExt/editInput/editInput.d.ts +3 -2
  101. package/src/components/formsExt/editInput/editInput.stories.d.ts +21 -20
  102. package/src/components/formsExt/editInput/editInput.vue.d.ts +4 -3
  103. package/src/components/formsExt/menu/menu.d.ts +2 -1
  104. package/src/components/formsExt/menu/menu.stories.d.ts +16 -15
  105. package/src/components/formsExt/menu/menu.vue.d.ts +16 -15
  106. package/src/components/formsExt/menu/stories/items.d.ts +2 -1
  107. package/src/components/formsExt/radioGroup/radioGroup.d.ts +2 -2
  108. package/src/components/formsExt/radioGroup/radioGroup.stories.d.ts +16 -15
  109. package/src/components/formsExt/radioGroup/radioGroup.vue.d.ts +14 -14
  110. package/src/components/formsExt/selector2/api.d.ts +3 -2
  111. package/src/components/formsExt/selector2/itemMulti.vue.d.ts +4 -3
  112. package/src/components/formsExt/selector2/selector2.d.ts +2 -2
  113. package/src/components/formsExt/selector2/selector2.stories.d.ts +67 -66
  114. package/src/components/formsExt/selector2/selector2.vue.d.ts +33 -32
  115. package/src/components/popup/lib/popup.d.ts +2 -4
  116. package/src/components/popup/lib/worker.d.ts +2 -1
  117. package/src/components/popup/popup/listItem.vue.d.ts +4 -3
  118. package/src/components/popup/popup/opener.vue.d.ts +6 -5
  119. package/src/components/popup/popup/popup.stories.d.ts +219 -218
  120. package/src/components/popup/popup/popup.vue.d.ts +8 -7
  121. package/src/components/popup/popup/widgetInput.vue.d.ts +28 -28
  122. package/src/components/project/project.d.ts +1 -0
  123. package/src/components/project/selectorCompetitors/selectorCompetitors.d.ts +20 -0
  124. package/src/components/project/selectorCompetitors/selectorCompetitors.stories.d.ts +42 -0
  125. package/src/components/project/selectorCompetitors/selectorCompetitors.vue.d.ts +24 -0
  126. package/src/components/project/selectorCompetitors/stories/items.d.ts +4 -0
  127. package/src/components/tabs/tabs/content.vue.d.ts +3 -2
  128. package/src/components/tabs/tabs/tab.vue.d.ts +3 -2
  129. package/src/components/tabs/tabs/tabs.stories.d.ts +184 -184
  130. package/src/components/tabs/tabs/tabs.vue.d.ts +3 -2
  131. package/src/components/tabsView/tabsView/menu.vue.d.ts +6 -6
  132. package/src/components/tabsView/tabsView/menuDelimeter.vue.d.ts +1 -1
  133. package/src/components/tabsView/tabsView/menuItem.vue.d.ts +5 -4
  134. package/src/components/tabsView/tabsView/menuTitle.vue.d.ts +3 -2
  135. package/src/components/tabsView/tabsView/store.d.ts +23 -22
  136. package/src/components/tabsView/tabsView/tabsView.d.ts +2 -1
  137. package/src/components/tabsView/tabsView/tabsView.stories.d.ts +94 -94
  138. package/src/components/tabsView/tabsView/tabsView.vue.d.ts +12 -12
  139. 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 +92 -92
  140. 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 +44 -44
  141. package/src/core/core/core.d.ts +3 -3
  142. package/src/core/core/page.d.ts +4 -0
  143. package/src/core/core/state.d.ts +4 -0
  144. package/src/core/utils/check.d.ts +22 -0
  145. package/src/core/utils/date.d.ts +30 -12
  146. package/src/core/utils/device.d.ts +34 -1
  147. package/src/core/utils/dom.d.ts +23 -27
  148. package/src/core/utils/image.d.ts +6 -0
  149. package/src/core/utils/keyboard.d.ts +3 -0
  150. package/src/core/utils/number.d.ts +7 -0
  151. package/src/core/utils/price.d.ts +8 -0
  152. package/src/core/utils/scroll.d.ts +4 -0
  153. package/src/core/utils/store/localStorage.d.ts +2 -1
  154. package/src/core/utils/store/plugin.d.ts +3 -2
  155. package/src/core/utils/store/store.d.ts +3 -11
  156. package/src/core/utils/string.d.ts +80 -0
  157. package/src/core/utils/url.d.ts +32 -0
  158. package/tabs/tabs.amd.js +1 -1
  159. package/tabs/tabs.js +1 -1
  160. package/tabsView/tabsView.amd.js +1 -1
  161. package/tabsView/tabsView.amd.js.map +1 -1
  162. package/tabsView/tabsView.js +6 -10
  163. package/tabsView/tabsView.js.map +1 -1
  164. package/utils/check.amd.js +2 -0
  165. package/utils/check.amd.js.map +1 -0
  166. package/utils/check.d.ts +1 -0
  167. package/utils/check.js +26 -0
  168. package/utils/check.js.map +1 -0
  169. package/utils/css.amd.js.map +1 -1
  170. package/utils/css.js +1 -2
  171. package/utils/css.js.map +1 -1
  172. package/utils/date.amd.js +1 -1
  173. package/utils/date.js +8 -5
  174. package/utils/device.amd.js +1 -1
  175. package/utils/device.js +11 -7
  176. package/utils/dom.amd.js.map +1 -1
  177. package/utils/dom.js.map +1 -1
  178. package/utils/image.amd.js +2 -0
  179. package/utils/image.amd.js.map +1 -0
  180. package/utils/image.d.ts +1 -0
  181. package/utils/image.js +8 -0
  182. package/utils/image.js.map +1 -0
  183. package/utils/keyboard.amd.js.map +1 -1
  184. package/utils/keyboard.js.map +1 -1
  185. package/utils/number.amd.js +2 -0
  186. package/utils/number.amd.js.map +1 -0
  187. package/utils/number.d.ts +1 -0
  188. package/utils/number.js +9 -0
  189. package/utils/number.js.map +1 -0
  190. package/utils/price.amd.js +2 -0
  191. package/utils/price.amd.js.map +1 -0
  192. package/utils/price.d.ts +1 -0
  193. package/utils/price.js +10 -0
  194. package/utils/price.js.map +1 -0
  195. package/utils/route.amd.js.map +1 -1
  196. package/utils/route.js.map +1 -1
  197. package/utils/scroll.amd.js +1 -1
  198. package/utils/scroll.amd.js.map +1 -1
  199. package/utils/scroll.js +21 -15
  200. package/utils/scroll.js.map +1 -1
  201. package/utils/string.amd.js +2 -0
  202. package/utils/string.amd.js.map +1 -0
  203. package/utils/string.d.ts +1 -0
  204. package/utils/string.js +138 -0
  205. package/utils/string.js.map +1 -0
  206. package/utils/system.amd.js.map +1 -1
  207. package/utils/system.js.map +1 -1
  208. package/utils/url.amd.js +3 -0
  209. package/utils/url.amd.js.map +1 -0
  210. package/utils/url.d.ts +1 -0
  211. package/utils/url.js +176 -0
  212. package/utils/url.js.map +1 -0
  213. package/utils/window.amd.js +1 -1
  214. package/utils/window.js +1 -1
  215. package/.chunks/datepicker-B9eprAyk.amd.js +0 -234
  216. package/.chunks/datepicker-B9eprAyk.amd.js.map +0 -1
  217. package/.chunks/datepicker-C86O1mQq.es.js +0 -277
  218. package/.chunks/datepicker-C86O1mQq.es.js.map +0 -1
  219. package/.chunks/forms-DkNAMd-D.amd.js +0 -3
  220. package/.chunks/forms-DkNAMd-D.amd.js.map +0 -1
  221. package/.chunks/forms-gb7uf2K8.es.js +0 -1026
  222. package/.chunks/forms-gb7uf2K8.es.js.map +0 -1
  223. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-2TAzIZZA.amd.js +0 -2
  224. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-2TAzIZZA.amd.js.map +0 -1
  225. package/.chunks/listItem.vue_vue_type_script_setup_true_lang-Caw4oFU-.es.js.map +0 -1
  226. package/.chunks/popup-Dfz5hkrQ.amd.js.map +0 -1
  227. package/.chunks/popup-ZmdXZkvb.es.js.map +0 -1
  228. package/.chunks/widgetInput-BxO9y9L7.amd.js.map +0 -1
  229. package/.chunks/widgetInput-DPOH_qya.es.js.map +0 -1
@@ -1,23 +1,25 @@
1
1
  import { insertToPage as Z } from "../utils/css.js";
2
- import { defineComponent as E, ref as b, watch as S, toRef as R, computed as U, openBlock as f, createElementBlock as h, normalizeClass as w, toDisplayString as $, createCommentVNode as M, createElementVNode as G, createVNode as O, withKeys as W, withModifiers as L, createBlock as I, withCtx as V, createTextVNode as k, mergeProps as D, renderSlot as j, mergeModels as H, useModel as F, Fragment as P, renderList as z, withDirectives as x, vModelRadio as ee, unref as T, onMounted as te, onUpdated as le, createSlots as X } from "vue";
3
- import { T as oe, B as N, a as K, I as ae, C as Q, i as se } from "../.chunks/forms-gb7uf2K8.es.js";
2
+ import { defineComponent as K, ref as V, computed as N, resolveDirective as q, openBlock as c, createElementBlock as v, normalizeClass as T, toDisplayString as C, createCommentVNode as _, createElementVNode as E, withDirectives as Y, createVNode as F, withKeys as O, withModifiers as B, createBlock as I, withCtx as $, createTextVNode as M, watch as S, toRef as ee, mergeProps as X, renderSlot as j, mergeModels as D, useModel as Q, Fragment as P, renderList as H, vModelRadio as te, unref as k } from "vue";
3
+ import { T as oe, B as z, a as L, I as le, C as ae } from "../.chunks/forms-1ZAO_mt8.es.js";
4
4
  import { invertKeyboardLayout as re } from "../utils/keyboard.js";
5
- import { _ as ne, b as Y } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-Caw4oFU-.es.js";
6
- import { P as ie } from "../.chunks/widgetInput-DPOH_qya.es.js";
7
- import { debounce as ue } from "lodash";
8
- const q = ["../assets/formsExt.css"].map((n) => import.meta.resolve(n));
9
- await Z(q);
10
- const de = {
11
- key: 0,
12
- class: "top-editArea_title"
13
- }, pe = { class: "top-editArea_footer" }, ce = /* @__PURE__ */ E({
5
+ import { _ as se, b as R } from "../.chunks/listItem.vue_vue_type_script_setup_true_lang-DsAW8MMm.es.js";
6
+ import { P as ne } from "../.chunks/widgetInput-CmVe9G3z.es.js";
7
+ import { debounce as ie } from "lodash";
8
+ import { M as Re } from "../.chunks/menu-CBKYqQZZ.es.js";
9
+ const x = ["../assets/formsExt.css"].map((s) => import.meta.resolve(s));
10
+ await Z(x);
11
+ const ue = { class: "top-editArea_footer" }, de = /* @__PURE__ */ K({
14
12
  __name: "editArea",
15
13
  props: {
16
- modelValue: {},
14
+ defaultValue: { default: "" },
17
15
  title: {},
18
- cancelText: { default: "Отмена" },
19
- submitText: { default: "Отправить" },
16
+ cancelText: { default: "Cancel" },
17
+ submitText: { default: "Send" },
18
+ closeText: { default: "Close" },
19
+ isFocused: { type: Boolean },
20
+ forceShowCloseBtn: { type: Boolean },
20
21
  attachToKeyboard: { type: Boolean },
22
+ modelValue: {},
21
23
  name: {},
22
24
  placeholder: {},
23
25
  rows: {},
@@ -28,90 +30,105 @@ const de = {
28
30
  isError: { type: Boolean },
29
31
  hint: {}
30
32
  },
31
- emits: ["update:modelValue", "cancel"],
32
- setup(n, { emit: a }) {
33
- const e = n, o = a, y = b(""), v = b(e.modelValue);
34
- S(R(e, "modelValue"), () => {
35
- v.value = e.modelValue;
36
- });
37
- const p = U(() => v.value !== e.modelValue), c = (t) => {
38
- o("update:modelValue", t);
39
- }, m = () => {
40
- o("cancel"), v.value = e.modelValue;
33
+ emits: ["submit", "close", "clickOnTitle"],
34
+ setup(s, { emit: d }) {
35
+ const e = s, a = d, m = V(e.defaultValue), f = V(e.isFocused), r = N(() => m.value !== e.defaultValue), p = N(() => e.attachToKeyboard ? "" : e.forceShowCloseBtn && !r.value ? e.closeText : e.cancelText), i = (u) => {
36
+ a("submit", u), m.value = e.defaultValue;
37
+ }, y = () => {
38
+ if (e.forceShowCloseBtn && !r.value) {
39
+ a("close");
40
+ return;
41
+ }
42
+ m.value = e.defaultValue;
43
+ }, A = () => {
44
+ e.attachToKeyboard && a("clickOnTitle");
41
45
  };
42
- return (t, u) => (f(), h("div", {
43
- class: w({
44
- "top-editArea": !0,
45
- "top-editArea-attachedToKeyboard": t.attachToKeyboard
46
- })
47
- }, [
48
- t.title ? (f(), h("div", de, $(t.title), 1)) : M("", !0),
49
- G("div", {
50
- class: w({
51
- "top-editArea_form": !0,
52
- "top-error": t.isError,
53
- "top-focus": y.value == "focus"
46
+ return (u, o) => {
47
+ const g = q("focus");
48
+ return c(), v("div", {
49
+ class: T({
50
+ "top-editArea": !0,
51
+ "top-editArea-attachedToKeyboard": u.attachToKeyboard
54
52
  })
55
53
  }, [
56
- O(oe, {
57
- modelValue: v.value,
58
- "onUpdate:modelValue": u[0] || (u[0] = (r) => v.value = r),
59
- name: t.name,
60
- placeholder: t.placeholder,
61
- rows: t.rows,
62
- minHeight: t.minHeight,
63
- expandable: t.expandable,
64
- disabled: t.disabled,
65
- readonly: t.readonly,
66
- isError: t.isError,
67
- hint: t.hint,
68
- class: "top-editArea_element",
69
- onFocus: u[1] || (u[1] = (r) => y.value = "focus"),
70
- onBlur: u[2] || (u[2] = (r) => y.value = ""),
71
- onKeyup: [
72
- W(m, ["esc"]),
73
- u[3] || (u[3] = W(L((r) => c(v.value), ["ctrl"]), ["enter"]))
74
- ]
75
- }, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]),
76
- G("div", pe, [
77
- p.value && (!t.attachToKeyboard || t.modelValue) ? (f(), I(N, {
78
- key: 0,
79
- class: "top-editArea_button",
80
- color: "theme",
81
- icon: t.attachToKeyboard ? "" : "",
82
- onClick: m
83
- }, {
84
- default: V(() => [
85
- k($(t.attachToKeyboard ? "" : t.cancelText), 1)
86
- ]),
87
- _: 1
88
- }, 8, ["icon"])) : M("", !0),
89
- O(N, {
90
- class: "top-editArea_button",
91
- icon: t.attachToKeyboard ? "" : "",
92
- onClick: u[4] || (u[4] = (r) => c(v.value))
93
- }, {
94
- default: V(() => [
95
- k($(t.attachToKeyboard ? "" : t.submitText), 1)
96
- ]),
97
- _: 1
98
- }, 8, ["icon"])
99
- ])
100
- ], 2)
101
- ], 2));
54
+ u.title ? (c(), v("div", {
55
+ key: 0,
56
+ class: "top-editArea_title",
57
+ onClick: o[0] || (o[0] = (h) => A())
58
+ }, C(u.title), 1)) : _("", !0),
59
+ E("div", {
60
+ class: T({
61
+ "top-editArea_form": !0,
62
+ "top-error": u.isError,
63
+ "top-editArea_form-focus": f.value
64
+ })
65
+ }, [
66
+ Y(F(oe, {
67
+ modelValue: m.value,
68
+ "onUpdate:modelValue": o[1] || (o[1] = (h) => m.value = h),
69
+ name: u.name,
70
+ placeholder: u.placeholder,
71
+ rows: u.rows,
72
+ minHeight: u.minHeight,
73
+ expandable: u.expandable,
74
+ disabled: u.disabled,
75
+ readonly: u.readonly,
76
+ isError: u.isError,
77
+ hint: u.hint,
78
+ class: "top-editArea_element",
79
+ onFocus: o[2] || (o[2] = () => f.value = !0),
80
+ onBlur: o[3] || (o[3] = () => f.value = !1),
81
+ onKeyup: [
82
+ O(y, ["esc"]),
83
+ o[4] || (o[4] = O(B((h) => i(m.value), ["ctrl"]), ["enter"]))
84
+ ]
85
+ }, null, 8, ["modelValue", "name", "placeholder", "rows", "minHeight", "expandable", "disabled", "readonly", "isError", "hint"]), [
86
+ [g, f.value]
87
+ ]),
88
+ E("div", ue, [
89
+ r.value || u.forceShowCloseBtn ? (c(), I(z, {
90
+ key: 0,
91
+ class: "top-editArea_button",
92
+ color: "theme",
93
+ icon: u.attachToKeyboard ? "" : "",
94
+ onClick: y
95
+ }, {
96
+ default: $(() => [
97
+ M(C(p.value), 1)
98
+ ]),
99
+ _: 1
100
+ }, 8, ["icon"])) : _("", !0),
101
+ r.value ? (c(), I(z, {
102
+ key: 1,
103
+ class: "top-editArea_button",
104
+ icon: u.attachToKeyboard ? "" : "",
105
+ onClick: o[5] || (o[5] = (h) => i(m.value))
106
+ }, {
107
+ default: $(() => [
108
+ M(C(u.attachToKeyboard ? "" : u.submitText), 1)
109
+ ]),
110
+ _: 1
111
+ }, 8, ["icon"])) : _("", !0)
112
+ ])
113
+ ], 2)
114
+ ], 2);
115
+ };
102
116
  }
103
- }), me = {
117
+ }), pe = {
104
118
  "top-editArea": "top-editArea",
105
119
  "top-editArea_title": "top-editArea_title",
106
120
  "top-editArea_form": "top-editArea_form",
121
+ "top-editArea_form-focus": "top-editArea_form-focus",
107
122
  "top-textarea": "top-textarea",
108
123
  "top-editArea_element": "top-editArea_element",
109
124
  "top-textarea_textarea": "top-textarea_textarea",
110
125
  "top-editArea_footer": "top-editArea_footer",
111
- "top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard"
112
- }, fe = {
113
- $style: me
114
- }, Xe = /* @__PURE__ */ K(ce, [["__cssModules", fe]]), ve = { class: "top-editInput" }, ye = /* @__PURE__ */ E({
126
+ "top-editArea-attachedToKeyboard": "top-editArea-attachedToKeyboard",
127
+ "top-button": "top-button",
128
+ "top-editArea_button": "top-editArea_button"
129
+ }, ce = {
130
+ $style: pe
131
+ }, ze = /* @__PURE__ */ L(de, [["__cssModules", ce]]), me = { class: "top-editInput" }, fe = /* @__PURE__ */ K({
115
132
  __name: "editInput",
116
133
  props: {
117
134
  modelValue: {},
@@ -119,44 +136,44 @@ const de = {
119
136
  button: {}
120
137
  },
121
138
  emits: ["update:modelValue"],
122
- setup(n, { emit: a }) {
123
- const e = n, o = b(e.modelValue);
124
- S(R(e.modelValue), () => {
125
- o.value = e.modelValue;
139
+ setup(s, { emit: d }) {
140
+ const e = s, a = V(e.modelValue);
141
+ S(ee(e.modelValue), () => {
142
+ a.value = e.modelValue;
126
143
  });
127
- const y = a, v = () => {
128
- y("update:modelValue", o.value);
144
+ const m = d, f = () => {
145
+ m("update:modelValue", a.value);
129
146
  };
130
- return (p, c) => (f(), h("div", ve, [
131
- O(ae, D(p.input, {
132
- onKeydownCapture: c[0] || (c[0] = W(L((m) => o.value = p.modelValue, ["stop"]), ["esc"])),
133
- onKeydown: W(L(v, ["stop"]), ["enter"]),
134
- modelValue: o.value,
135
- "onUpdate:modelValue": c[1] || (c[1] = (m) => o.value = m)
147
+ return (r, p) => (c(), v("div", me, [
148
+ F(le, X(r.input, {
149
+ onKeydownCapture: p[0] || (p[0] = O(B((i) => a.value = r.modelValue, ["stop"]), ["esc"])),
150
+ onKeydown: O(B(f, ["stop"]), ["enter"]),
151
+ modelValue: a.value,
152
+ "onUpdate:modelValue": p[1] || (p[1] = (i) => a.value = i)
136
153
  }), null, 16, ["onKeydown", "modelValue"]),
137
- o.value !== p.modelValue ? (f(), I(N, D({
154
+ a.value !== r.modelValue ? (c(), I(z, X({
138
155
  key: 0,
139
156
  icon: "",
140
157
  styling: "soft"
141
- }, p.button, { onClick: v }), {
142
- default: V(() => [
143
- j(p.$slots, "default")
158
+ }, r.button, { onClick: f }), {
159
+ default: $(() => [
160
+ j(r.$slots, "default")
144
161
  ]),
145
162
  _: 3
146
- }, 16)) : M("", !0)
163
+ }, 16)) : _("", !0)
147
164
  ]));
148
165
  }
149
- }), he = {
166
+ }), ve = {
150
167
  "top-editInput": "top-editInput",
151
168
  "top-input": "top-input"
152
- }, Ae = {
153
- $style: he
154
- }, Ye = /* @__PURE__ */ K(ye, [["__cssModules", Ae]]), ge = ["data-top-icon", "onClick"], Ve = {
169
+ }, ye = {
170
+ $style: ve
171
+ }, Fe = /* @__PURE__ */ L(fe, [["__cssModules", ye]]), he = ["data-top-icon", "onClick"], Ae = {
155
172
  key: 0,
156
173
  class: "top-radioGroup_circle"
157
- }, be = ["value", "disabled"], _e = /* @__PURE__ */ E({
174
+ }, be = ["value", "disabled"], ge = /* @__PURE__ */ K({
158
175
  __name: "radioGroup",
159
- props: /* @__PURE__ */ H({
176
+ props: /* @__PURE__ */ D({
160
177
  modelValue: {},
161
178
  radiosProps: {},
162
179
  showIndicator: { type: Boolean },
@@ -168,52 +185,52 @@ const de = {
168
185
  },
169
186
  modelModifiers: {}
170
187
  }),
171
- emits: /* @__PURE__ */ H(["update:modelValue"], ["update:modelValue"]),
172
- setup(n, { emit: a }) {
173
- const e = F(n, "modelValue"), o = n, y = b(null);
188
+ emits: /* @__PURE__ */ D(["update:modelValue"], ["update:modelValue"]),
189
+ setup(s, { emit: d }) {
190
+ const e = Q(s, "modelValue"), a = s, m = V(null);
174
191
  S(e, () => {
175
- var p, c, m, t, u;
176
- (p = o.radiosProps) != null && p.some((r) => r.value === e.value) || (e.value = ((m = (c = o.radiosProps) == null ? void 0 : c[0]) == null ? void 0 : m.value) ?? ""), (u = (t = y.value) == null ? void 0 : t.querySelector(".radioGroup_item-selected")) == null || u.scrollIntoView();
192
+ var r, p, i, y, A;
193
+ (r = a.radiosProps) != null && r.some((u) => u.value === e.value) || (e.value = ((i = (p = a.radiosProps) == null ? void 0 : p[0]) == null ? void 0 : i.value) ?? ""), (A = (y = m.value) == null ? void 0 : y.querySelector(".radioGroup_item-selected")) == null || A.scrollIntoView();
177
194
  }, { immediate: !0 });
178
- const v = "radioGroup-" + Math.random();
179
- return (p, c) => (f(), h("div", {
195
+ const f = "radioGroup-" + Math.random();
196
+ return (r, p) => (c(), v("div", {
180
197
  ref_key: "elRef",
181
- ref: y,
182
- class: w({
198
+ ref: m,
199
+ class: T({
183
200
  "top-radioGroup": !0,
184
201
  "top-scrollBarXHidding": !0,
185
- ["top-size_" + p.size]: !!p.size,
186
- "top-error": p.isError
202
+ ["top-size_" + r.size]: !!r.size,
203
+ "top-error": r.isError
187
204
  })
188
205
  }, [
189
- (f(!0), h(P, null, z(p.radiosProps, (m) => (f(), h("label", {
190
- class: w({
191
- "top-radioGroup_item-selected": m.value === e.value,
206
+ (c(!0), v(P, null, H(r.radiosProps, (i) => (c(), v("label", {
207
+ class: T({
208
+ "top-radioGroup_item-selected": i.value === e.value,
192
209
  "top-radioGroup_item": !0,
193
210
  "top-forms-focusable": !0,
194
- "top-disabled": m.disabled
211
+ "top-disabled": i.disabled
195
212
  }),
196
- "data-top-icon": m.icon,
197
- onClick: (t) => e.value = m.value
213
+ "data-top-icon": i.icon,
214
+ onClick: (y) => e.value = i.value
198
215
  }, [
199
- k($(m.title) + " ", 1),
200
- p.showIndicator ? (f(), h("span", Ve)) : M("", !0),
201
- x(G("input", {
202
- "onUpdate:modelValue": c[0] || (c[0] = (t) => e.value = t),
203
- name: v,
216
+ M(C(i.title) + " ", 1),
217
+ r.showIndicator ? (c(), v("span", Ae)) : _("", !0),
218
+ Y(E("input", {
219
+ "onUpdate:modelValue": p[0] || (p[0] = (y) => e.value = y),
220
+ name: f,
204
221
  type: "radio",
205
- class: w({
222
+ class: T({
206
223
  "top-unvisible": !0
207
224
  }),
208
- value: m.value,
209
- disabled: m.disabled
225
+ value: i.value,
226
+ disabled: i.disabled
210
227
  }, null, 8, be), [
211
- [ee, e.value]
228
+ [te, e.value]
212
229
  ])
213
- ], 10, ge))), 256))
230
+ ], 10, he))), 256))
214
231
  ], 2));
215
232
  }
216
- }), Me = {
233
+ }), _e = {
217
234
  "top-scrollBarXHidding": "top-scrollBarXHidding",
218
235
  "top-radioGroup": "top-radioGroup",
219
236
  "top-radioGroup_item": "top-radioGroup_item",
@@ -221,86 +238,82 @@ const de = {
221
238
  "top-radioGroup_circle": "top-radioGroup_circle",
222
239
  "top-disabled": "top-disabled",
223
240
  "top-error": "top-error"
224
- }, $e = {
225
- $style: Me
226
- }, Re = /* @__PURE__ */ K(_e, [["__cssModules", $e]]), Ie = (n, a, e) => {
227
- const o = b([]), y = b(!1);
228
- let v = "", p;
229
- n && !n.params.limit && (n.params.limit = 100);
230
- const c = async () => {
231
- if (!n)
232
- return;
233
- let d, A;
234
- if (e && (n.cache ??= /* @__PURE__ */ new Map(), A = JSON.stringify(n.params), d = n.cache.get(A), d))
235
- return d;
236
- if (y.value = !0, d = await n.call(), y.value = !1, d.errors)
237
- return;
238
- if (!Array.isArray(d.result)) {
241
+ }, Ve = {
242
+ $style: _e
243
+ }, Ue = /* @__PURE__ */ L(ge, [["__cssModules", Ve]]), $e = (s, d, e) => {
244
+ const a = V([]), m = V(!1);
245
+ let f = "", r;
246
+ s && !s.params.limit && (s.params.limit = 100);
247
+ const p = async () => {
248
+ if (!s) return;
249
+ let o, g;
250
+ if (e && (s.cache ??= /* @__PURE__ */ new Map(), g = JSON.stringify(s.params), o = s.cache.get(g), o))
251
+ return o;
252
+ if (m.value = !0, o = await s.call(), m.value = !1, o.errors) return;
253
+ if (!Array.isArray(o.result)) {
239
254
  console.warn("В result ожидался массив");
240
255
  return;
241
256
  }
242
- const _ = d.result.findIndex((C) => C.id === void 0 || C.name === void 0);
243
- if (_ !== -1) {
244
- console.warn(`В result[${_}] нет id или name`);
257
+ const h = o.result.findIndex((G) => G.id === void 0 || G.name === void 0);
258
+ if (h !== -1) {
259
+ console.warn(`В result[${h}] нет id или name`);
245
260
  return;
246
261
  }
247
- return e && n.cache.set(A, d), d;
248
- }, m = async () => {
249
- if (!n)
250
- return;
251
- n.params.offset = 0, n.params.search = v;
252
- const d = await c();
253
- d && (p = d.nextOffset, o.value = d.result);
254
- }, t = async () => {
255
- if (!n || !p || y.value)
256
- return;
257
- n.params.offset = p, n.params.search = v;
258
- const d = await c();
259
- d && (p = d.nextOffset, o.value = o.value.concat(d.result));
260
- }, u = ue(() => m(), 200);
262
+ return e && s.cache.set(g, o), o;
263
+ }, i = async () => {
264
+ if (!s) return;
265
+ s.params.offset = 0, s.params.search = f;
266
+ const o = await p();
267
+ o && (r = o.nextOffset, a.value = o.result);
268
+ }, y = async () => {
269
+ if (!s || !r || m.value) return;
270
+ s.params.offset = r, s.params.search = f;
271
+ const o = await p();
272
+ o && (r = o.nextOffset, a.value = a.value.concat(o.result));
273
+ }, A = ie(() => i(), 200);
261
274
  return {
262
- items: o,
263
- isLoading: y,
264
- loadAppend: t,
265
- setSearchTextAndLoad: (d, A = !0) => {
266
- n && (d.length < a || d === v && o.value.length || (v = d, A ? u() : m()));
275
+ items: a,
276
+ isLoading: m,
277
+ loadAppend: y,
278
+ setSearchTextAndLoad: (o, g = !0) => {
279
+ s && (o.length < d || o === f && a.value.length || (f = o, g ? A() : i()));
267
280
  }
268
281
  };
269
- }, we = { class: "top-selector2_itemMulti top-ellipsis" }, ke = /* @__PURE__ */ E({
282
+ }, we = { class: "top-selector2_itemMulti top-ellipsis" }, Ie = /* @__PURE__ */ K({
270
283
  __name: "itemMulti",
271
284
  props: {
272
285
  id: {},
273
286
  name: {}
274
287
  },
275
288
  emits: ["delete"],
276
- setup(n) {
277
- return (a, e) => (f(), h("div", we, [
278
- k($(a.name) + " ", 1),
279
- G("span", {
289
+ setup(s) {
290
+ return (d, e) => (c(), v("div", we, [
291
+ M(C(d.name) + " ", 1),
292
+ E("span", {
280
293
  class: "top-selector2_itemMultiDelete",
281
294
  "data-top-icon": "",
282
- onClick: e[0] || (e[0] = (o) => a.$emit("delete", a.id)),
283
- onMousedown: e[1] || (e[1] = L(() => {
295
+ onClick: e[0] || (e[0] = (a) => d.$emit("delete", d.id)),
296
+ onMousedown: e[1] || (e[1] = B(() => {
284
297
  }, ["stop"]))
285
298
  }, null, 32)
286
299
  ]));
287
300
  }
288
- }), Be = {
301
+ }), Te = {
289
302
  "top-selector2_itemMulti": "top-selector2_itemMulti",
290
303
  "top-selector2_itemMultiDelete": "top-selector2_itemMultiDelete",
291
304
  "top-selector2": "top-selector2",
292
305
  "top-active": "top-active"
293
- }, Te = {
294
- $style: Be
295
- }, Ce = /* @__PURE__ */ K(ke, [["__cssModules", Te]]), Se = {
306
+ }, Ce = {
307
+ $style: Te
308
+ }, Be = /* @__PURE__ */ L(Ie, [["__cssModules", Ce]]), Me = {
296
309
  key: 0,
297
310
  class: "top-selector2_activeItems"
298
- }, Le = {
311
+ }, ke = {
299
312
  key: 1,
300
313
  class: "top-selector2_activeName top-ellipsis"
301
- }, Ee = /* @__PURE__ */ E({
314
+ }, Se = /* @__PURE__ */ K({
302
315
  __name: "selector2",
303
- props: /* @__PURE__ */ H({
316
+ props: /* @__PURE__ */ D({
304
317
  modelValue: {},
305
318
  items: { default: () => [] },
306
319
  multiselect: { type: Boolean },
@@ -320,133 +333,133 @@ const de = {
320
333
  modelModifiers: {}
321
334
  }),
322
335
  emits: ["update:modelValue"],
323
- setup(n) {
324
- const a = n, e = F(n, "modelValue"), o = b(""), y = {
336
+ setup(s) {
337
+ const d = s, e = Q(s, "modelValue"), a = V(""), m = {
325
338
  id: 0,
326
339
  name: "Все"
327
- }, v = b(null), p = () => {
328
- var l;
329
- return (l = v.value) == null ? void 0 : l.popup;
340
+ }, f = V(null), r = () => {
341
+ var t;
342
+ return (t = f.value) == null ? void 0 : t.popup;
330
343
  };
331
- window.__STORYBOOK_PREVIEW__ && !a.modelValue && S(
332
- () => a.multiselect,
344
+ window.__STORYBOOK_PREVIEW__ && !d.modelValue && S(
345
+ () => d.multiselect,
333
346
  () => {
334
- e.value = a.multiselect ? [] : { id: null, name: "" };
347
+ e.value = d.multiselect ? [] : { id: null, name: "" };
335
348
  },
336
349
  { immediate: !0 }
337
350
  );
338
- const c = Ie(a.apiRequest, a.minLength, a.useCache), m = U(() => {
339
- const l = [];
340
- return !a.multiselect && a.appendAllValue && l.push(y), a.items.forEach((i) => l.push({ ...i })), l;
341
- }), t = (l, i = !0) => i && l.id === null ? Array.isArray(e.value) ? e.value.some((s) => s.id === l.id && s.name === l.name) : l.name === e.value.name : Array.isArray(e.value) ? e.value.some((s) => s.id === l.id) : l.id === e.value.id, u = U(() => {
342
- const l = o.value.toLowerCase(), i = re(l);
343
- let s = [];
344
- return m.value.forEach((g) => {
345
- const B = g.name.toLowerCase();
346
- (g.id === Number(l) || B.includes(l) || B.includes(i)) && (B === l || B === i ? s.unshift(g) : s.push(g));
347
- }), s.push(...c.items.value), a.appendSearchToResult && o.value && (!s.length || s[0].name.toLowerCase() !== l) && s.push({
351
+ const p = $e(d.apiRequest, d.minLength, d.useCache), i = N(() => {
352
+ const t = [];
353
+ return !d.multiselect && d.appendAllValue && t.push(m), d.items.forEach((n) => t.push({ ...n })), t;
354
+ }), y = (t, n = !0) => n && t.id === null ? Array.isArray(e.value) ? e.value.some((l) => l.id === t.id && l.name === t.name) : t.name === e.value.name : Array.isArray(e.value) ? e.value.some((l) => l.id === t.id) : t.id === e.value.id, A = N(() => {
355
+ const t = a.value.toLowerCase(), n = re(t);
356
+ let l = [];
357
+ return i.value.forEach((b) => {
358
+ const w = b.name.toLowerCase();
359
+ (b.id === Number(t) || w.includes(t) || w.includes(n)) && (w === t || w === n ? l.unshift(b) : l.push(b));
360
+ }), l.push(...p.items.value), d.appendSearchToResult && a.value && (!l.length || l[0].name.toLowerCase() !== t) && l.push({
348
361
  id: null,
349
- name: o.value
350
- }), a.multiselect && (s = s.filter((g) => !t(g))), s;
351
- }), r = async (l) => {
352
- var i, s;
353
- if (a.multiselect) {
354
- if (!Array.isArray(e.value) || t(l))
362
+ name: a.value
363
+ }), d.multiselect && (l = l.filter((b) => !y(b))), l;
364
+ }), u = async (t) => {
365
+ var n, l;
366
+ if (d.multiselect) {
367
+ if (!Array.isArray(e.value) || y(t))
355
368
  return;
356
- const g = [...e.value];
357
- g.push({ ...l }), e.value = g, Q.state.isMobile ? (i = p()) == null || i.close() : setTimeout(() => {
358
- var B, J;
359
- (B = p()) == null || B.recalcPosition(), (J = p()) == null || J.elPopupWidget.querySelector("input").focus(), o.value && (u.value.length || (o.value = "", c.items.value = []));
369
+ const b = [...e.value];
370
+ b.push({ ...t }), e.value = b, ae.state.isMobile ? (n = r()) == null || n.close() : setTimeout(() => {
371
+ var w, U, W, J;
372
+ (w = r()) == null || w.recalcPosition(), (J = (W = (U = r()) == null ? void 0 : U.elPopupWidget) == null ? void 0 : W.querySelector("input")) == null || J.focus(), a.value && (A.value.length || (a.value = "", p.items.value = []));
360
373
  });
361
374
  } else
362
- o.value && (o.value = "", c.items.value = []), JSON.stringify(l) !== JSON.stringify(e.value) && (e.value = { ...l }), (s = p()) == null || s.close();
363
- }, d = () => {
375
+ a.value && (a.value = "", p.items.value = []), JSON.stringify(t) !== JSON.stringify(e.value) && (e.value = { ...t }), (l = r()) == null || l.close();
376
+ }, o = () => {
364
377
  if (!Array.isArray(e.value)) {
365
- const i = (m.value.findIndex((s) => s.id === e.value.id) + 1) % m.value.length;
366
- e.value = { ...m.value[i] };
378
+ const n = (i.value.findIndex((l) => l.id === e.value.id) + 1) % i.value.length;
379
+ e.value = { ...i.value[n] };
367
380
  }
368
- }, A = async (l) => {
369
- Array.isArray(e.value) && (e.value = e.value.filter((i) => i.id !== l), setTimeout(() => {
370
- var i;
371
- (i = p()) == null || i.recalcPosition();
381
+ }, g = async (t) => {
382
+ Array.isArray(e.value) && (e.value = e.value.filter((n) => n.id !== t), setTimeout(() => {
383
+ var n;
384
+ (n = r()) == null || n.recalcPosition();
372
385
  }));
373
- }, _ = b(!1);
374
- a.apiRequest && (S(_, () => {
375
- _.value && c.setSearchTextAndLoad(o.value, !1);
376
- }), S(o, () => c.setSearchTextAndLoad(o.value)));
377
- const C = (l) => {
378
- const i = l.target;
379
- i.scrollTop / (i.scrollHeight - i.offsetHeight) > 0.8 && c.loadAppend();
386
+ }, h = V(!1);
387
+ d.apiRequest && (S(h, () => {
388
+ h.value && p.setSearchTextAndLoad(a.value, !1);
389
+ }), S(a, () => p.setSearchTextAndLoad(a.value)));
390
+ const G = (t) => {
391
+ const n = t.target;
392
+ n.scrollTop / (n.scrollHeight - n.offsetHeight) > 0.8 && p.loadAppend();
380
393
  };
381
- return (l, i) => (f(), I(T(ne), {
394
+ return (t, n) => (c(), I(k(se), {
382
395
  ref_key: "popupRef",
383
- ref: v,
384
- onOpen: i[1] || (i[1] = (s) => _.value = !0),
385
- onClose: i[2] || (i[2] = (s) => _.value = !1),
386
- onScrollContentList: i[3] || (i[3] = (s) => l.apiRequest ? C(s) : void 0),
396
+ ref: f,
397
+ onOpen: n[1] || (n[1] = (l) => h.value = !0),
398
+ onClose: n[2] || (n[2] = (l) => h.value = !1),
399
+ onScrollContentList: n[3] || (n[3] = (l) => t.apiRequest ? G(l) : void 0),
387
400
  notch: !1,
388
401
  transitionDuration: 0
389
402
  }, {
390
- opener: V(() => [
391
- G("div", {
392
- class: w({
403
+ opener: $(() => [
404
+ E("div", {
405
+ class: T({
393
406
  "top-selector2": !0,
394
- "top-selector2-multiselect": l.multiselect,
395
- ["top-size_" + l.size]: !0,
396
- "top-disabled": l.disabled,
397
- "top-forms-focusable": !l.disabled,
398
- "top-error": l.isError
407
+ "top-selector2-multiselect": t.multiselect,
408
+ ["top-size_" + t.size]: !0,
409
+ "top-disabled": t.disabled,
410
+ "top-forms-focusable": !t.disabled,
411
+ "top-error": t.isError
399
412
  })
400
413
  }, [
401
- l.multiselect ? (f(), h("div", Se, [
402
- (f(!0), h(P, null, z(e.value, (s) => (f(), I(Ce, {
403
- id: s.id,
404
- name: s.name,
405
- onDelete: A
414
+ t.multiselect ? (c(), v("div", Me, [
415
+ (c(!0), v(P, null, H(e.value, (l) => (c(), I(Be, {
416
+ id: l.id,
417
+ name: l.name,
418
+ onDelete: g
406
419
  }, null, 8, ["id", "name"]))), 256))
407
- ])) : M("", !0),
408
- l.multiselect ? M("", !0) : (f(), h("span", Le, $(Array.isArray(e.value) ? "" : e.value.name), 1)),
409
- l.addChanger && !l.multiselect && m.value.length > 1 && !l.disabled ? (f(), h("span", {
420
+ ])) : _("", !0),
421
+ t.multiselect ? _("", !0) : (c(), v("span", ke, C(Array.isArray(e.value) ? "" : e.value.name), 1)),
422
+ t.addChanger && !t.multiselect && i.value.length > 1 && !t.disabled ? (c(), v("span", {
410
423
  key: 2,
411
424
  class: "top-changer top-changer-selector",
412
- onClick: L(d, ["stop"])
413
- })) : M("", !0)
425
+ onClick: B(o, ["stop"])
426
+ })) : _("", !0)
414
427
  ], 2)
415
428
  ]),
416
- widget: V(() => [
417
- O(T(ie), {
429
+ widget: $(() => [
430
+ F(k(ne), {
418
431
  title: "Поиск",
419
432
  icon: "",
420
- modelValue: o.value,
421
- "onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s),
422
- isLoading: T(c).isLoading.value,
423
- placeholder: !Array.isArray(e.value) && !l.multiselect && l.showSelectedInInput ? e.value.name : l.placeholder
433
+ modelValue: a.value,
434
+ "onUpdate:modelValue": n[0] || (n[0] = (l) => a.value = l),
435
+ isLoading: k(p).isLoading.value,
436
+ placeholder: !Array.isArray(e.value) && !t.multiselect && t.showSelectedInInput ? e.value.name : t.placeholder
424
437
  }, null, 8, ["modelValue", "isLoading", "placeholder"])
425
438
  ]),
426
- contentList: V(() => [
427
- (f(!0), h(P, null, z(u.value, (s) => (f(), I(T(Y), {
428
- class: w({
429
- "top-active": !Array.isArray(e.value) && !l.multiselect && e.value.name === s.name
439
+ contentList: $(() => [
440
+ (c(!0), v(P, null, H(A.value, (l) => (c(), I(k(R), {
441
+ class: T({
442
+ "top-active": !Array.isArray(e.value) && !t.multiselect && e.value.name === l.name
430
443
  }),
431
- key: s.id ?? void 0,
432
- onClick: L((g) => r(s), ["stop"])
444
+ key: l.id ?? void 0,
445
+ onClick: B((b) => u(l), ["stop"])
433
446
  }, {
434
- default: V(() => [
435
- l.$slots.item ? j(l.$slots, "item", {
447
+ default: $(() => [
448
+ t.$slots.item ? j(t.$slots, "item", {
436
449
  key: 0,
437
- item: s
438
- }) : (f(), h(P, { key: 1 }, [
439
- k($(s.name), 1)
450
+ item: l
451
+ }) : (c(), v(P, { key: 1 }, [
452
+ M(C(l.name), 1)
440
453
  ], 64))
441
454
  ]),
442
455
  _: 2
443
456
  }, 1032, ["class", "onClick"]))), 128)),
444
- u.value.length ? M("", !0) : (f(), I(T(Y), {
457
+ A.value.length ? _("", !0) : (c(), I(k(R), {
445
458
  key: 0,
446
459
  type: "regular"
447
460
  }, {
448
- default: V(() => [
449
- k(" Нет результатов ")
461
+ default: $(() => [
462
+ M(" Нет результатов ")
450
463
  ]),
451
464
  _: 1
452
465
  }))
@@ -454,127 +467,21 @@ const de = {
454
467
  _: 3
455
468
  }, 512));
456
469
  }
457
- }), Ke = {
470
+ }), Ee = {
458
471
  "top-selector2": "top-selector2",
459
472
  "top-selector2-multiselect": "top-selector2-multiselect",
460
473
  "top-active": "top-active",
461
474
  "top-selector2_activeItems": "top-selector2_activeItems",
462
475
  "top-selector2_activeName": "top-selector2_activeName",
463
476
  "top-changer-selector": "top-changer-selector"
464
- }, Pe = {
465
- $style: Ke
466
- }, je = /* @__PURE__ */ K(Ee, [["__cssModules", Pe]]), Ge = /* @__PURE__ */ E({
467
- __name: "menu",
468
- props: /* @__PURE__ */ H({
469
- modelValue: {},
470
- items: {},
471
- isMultiple: { type: Boolean },
472
- canBeEmptyMultiple: { type: Boolean },
473
- styling: { default: "default" },
474
- selectAllItem: {}
475
- }, {
476
- modelValue: {
477
- required: !0
478
- },
479
- modelModifiers: {}
480
- }),
481
- emits: ["update:modelValue"],
482
- setup(n) {
483
- const a = n, e = F(n, "modelValue"), o = b();
484
- !a.isMultiple && !(typeof e.value == "string" || e.value instanceof String) && console.warn('Type check failed for prop "modelValue". Expected String: ' + typeof e.value), a.isMultiple && !Array.isArray(e.value) && console.warn('Type check failed for prop "modelValue". Expected Array: ' + typeof e.value), a.isMultiple && !a.canBeEmptyMultiple && Array.isArray(e.value) && !e.value.length && (e.value = [a.items[0].href ?? a.items[0].value]);
485
- const y = (t) => Array.isArray(e.value) ? e.value.includes(t.value) : t.value === e.value, v = (t, u = !1) => {
486
- if (Array.isArray(e.value)) {
487
- let r = e.value.slice();
488
- if (u) {
489
- r.length || (r = a.items.map((A) => A.value));
490
- const d = r.indexOf(t.value);
491
- d === -1 ? r.push(t.value) : r.splice(d, 1);
492
- } else
493
- r.length === 1 && r[0] === t.value ? r = [] : r = [t.value];
494
- !a.canBeEmptyMultiple && !r.length && (r = [t.value]), e.value = r;
495
- return;
496
- }
497
- e.value = t.value;
498
- }, p = (t) => {
499
- if (o.value.scrollWidth <= o.value.offsetWidth || t.shiftKey || Math.abs(t.deltaY) < 50)
500
- return;
501
- t.preventDefault();
502
- const u = t.deltaY > 0 ? 30 : -30;
503
- o.value.scrollLeft = o.value.scrollLeft + u;
504
- }, c = (t = !0) => {
505
- var i, s;
506
- const u = o.value.querySelector(".top-active");
507
- if (!u)
508
- return;
509
- const r = 24, d = u.offsetLeft - o.value.offsetLeft - r, A = u.offsetLeft - o.value.offsetLeft + u.clientWidth + r, _ = o.value.scrollLeft, C = o.value.clientWidth + o.value.scrollLeft;
510
- let l = null;
511
- d < _ && (l = d), A > C && (l = A - o.value.clientWidth), l !== null && (se() ? (s = (i = Q).$) == null || s.call(i, o.value).animate({ scrollLeft: l }, t ? 200 : 0) : o.value.scrollTo({ left: l, behavior: t ? "smooth" : "auto" }));
512
- }, m = () => {
513
- if (Array.isArray(e.value)) {
514
- if (e.value.length === a.items.length) {
515
- e.value = [a.items[0].href ?? a.items[0].value];
516
- return;
517
- }
518
- e.value = a.items.map((t) => t.href ?? t.value);
519
- }
520
- };
521
- return te(() => c(!1)), le(() => c(!0)), (t, u) => (f(), h("div", {
522
- ref_key: "el",
523
- ref: o,
524
- class: w({
525
- "top-menu": !0,
526
- ["top-style_" + t.styling]: !0,
527
- "top-unwrap-x": t.styling === "default"
528
- }),
529
- onWheel: p
530
- }, [
531
- (f(!0), h(P, null, z(t.items, (r) => (f(), I(T(N), D({ ref_for: !0 }, r, {
532
- class: "top-menu_item",
533
- color: "theme",
534
- styling: "",
535
- onClick: (d) => v(r, d.ctrlKey),
536
- isActive: y(r)
537
- }), X({ _: 2 }, [
538
- r.content ? {
539
- name: "default",
540
- fn: V(() => [
541
- k($(r.content), 1)
542
- ]),
543
- key: "0"
544
- } : void 0
545
- ]), 1040, ["onClick", "isActive"]))), 256)),
546
- Array.isArray(e.value) && t.selectAllItem ? (f(), I(T(N), D({ key: 0 }, t.selectAllItem, {
547
- class: "top-menu_item",
548
- color: "theme",
549
- styling: "",
550
- onClick: u[0] || (u[0] = (r) => m()),
551
- isActive: e.value.length === t.items.length
552
- }), X({ _: 2 }, [
553
- t.selectAllItem.content ? {
554
- name: "default",
555
- fn: V(() => [
556
- k($(t.selectAllItem.content), 1)
557
- ]),
558
- key: "0"
559
- } : void 0
560
- ]), 1040, ["isActive"])) : M("", !0)
561
- ], 34));
562
- }
563
- }), Ne = {
564
- "top-menu": "top-menu",
565
- "top-menu_item": "top-menu_item",
566
- "top-style_default": "top-style_default",
567
- "top-active": "top-active",
568
- "top-style_bar": "top-style_bar",
569
- "top-unwrap-x": "top-unwrap-x"
570
- }, Oe = {
571
- $style: Ne
572
- }, Qe = /* @__PURE__ */ K(Ge, [["__cssModules", Oe]]);
477
+ }, Ke = {
478
+ $style: Ee
479
+ }, We = /* @__PURE__ */ L(Se, [["__cssModules", Ke]]);
573
480
  export {
574
- Xe as EditArea,
575
- Ye as EditInput,
576
- Qe as Menu,
577
- Re as RadioGroup,
578
- je as Selector2
481
+ ze as EditArea,
482
+ Fe as EditInput,
483
+ Re as Menu,
484
+ Ue as RadioGroup,
485
+ We as Selector2
579
486
  };
580
487
  //# sourceMappingURL=formsExt.js.map