@topvisor/ui 0.0.35 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (267) hide show
  1. package/.chunks/datepicker-6d57a408.es.js +275 -0
  2. package/.chunks/datepicker-6d57a408.es.js.map +1 -0
  3. package/.chunks/datepicker-a0840577.amd.js +234 -0
  4. package/.chunks/datepicker-a0840577.amd.js.map +1 -0
  5. package/.chunks/forms-1aa30229.amd.js +3 -0
  6. package/.chunks/forms-1aa30229.amd.js.map +1 -0
  7. package/.chunks/forms-7be951a7.es.js +962 -0
  8. package/.chunks/forms-7be951a7.es.js.map +1 -0
  9. package/.chunks/popup-604c0a49.amd.js +341 -0
  10. package/.chunks/popup-604c0a49.amd.js.map +1 -0
  11. package/.chunks/popup-b9517276.es.js +700 -0
  12. package/.chunks/popup-b9517276.es.js.map +1 -0
  13. package/README.md +52 -19
  14. package/common/common.amd.js +2 -0
  15. package/common/common.amd.js.map +1 -0
  16. package/common/common.js +2 -0
  17. package/common/common.js.map +1 -0
  18. package/core/core.amd.js +2 -0
  19. package/core/core.amd.js.map +1 -0
  20. package/core/core.js +6 -0
  21. package/core/core.js.map +1 -0
  22. package/core.css +1 -0
  23. package/dark.css +1 -0
  24. package/forms/forms.amd.js +2 -0
  25. package/forms/forms.amd.js.map +1 -0
  26. package/forms/forms.js +16 -0
  27. package/forms/forms.js.map +1 -0
  28. package/forms/helpers.amd.js +2 -0
  29. package/forms/helpers.amd.js.map +1 -0
  30. package/forms/helpers.js +9 -0
  31. package/forms/helpers.js.map +1 -0
  32. package/forms.css +1 -0
  33. package/formsExt/formsExt.amd.js +3 -0
  34. package/formsExt/formsExt.amd.js.map +1 -0
  35. package/formsExt/formsExt.js +220 -0
  36. package/formsExt/formsExt.js.map +1 -0
  37. package/formsExt.css +1 -0
  38. package/{src/resources/icomoon → icomoon}/demo-files/demo.css +161 -161
  39. package/{src/resources/icomoon → icomoon}/demo-files/demo.js +30 -30
  40. package/{src/resources/icomoon → icomoon}/demo.html +2945 -2945
  41. package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.svg +232 -232
  42. package/{src/resources/icomoon → icomoon}/style.css +647 -647
  43. package/light.css +1 -0
  44. package/package.json +19 -68
  45. package/popup/popup.amd.js +3 -0
  46. package/popup/popup.amd.js.map +1 -0
  47. package/popup/popup.js +144 -0
  48. package/popup/popup.js.map +1 -0
  49. package/popup/worker.amd.js +2 -0
  50. package/popup/worker.amd.js.map +1 -0
  51. package/popup/worker.js +154 -0
  52. package/popup/worker.js.map +1 -0
  53. package/popup.css +1 -0
  54. package/tabs/tabs.amd.js +3 -0
  55. package/tabs/tabs.amd.js.map +1 -0
  56. package/tabs/tabs.js +97 -0
  57. package/tabs/tabs.js.map +1 -0
  58. package/tabs.css +1 -0
  59. package/utils/date.amd.js +2 -0
  60. package/utils/date.amd.js.map +1 -0
  61. package/utils/date.js +6 -0
  62. package/utils/date.js.map +1 -0
  63. package/utils/device.amd.js +2 -0
  64. package/utils/device.amd.js.map +1 -0
  65. package/utils/device.js +6 -0
  66. package/utils/device.js.map +1 -0
  67. package/utils/dom.amd.js +2 -0
  68. package/utils/dom.amd.js.map +1 -0
  69. package/utils/dom.js +64 -0
  70. package/utils/dom.js.map +1 -0
  71. package/.storybook/TopTheme.js +0 -82
  72. package/.storybook/TopThemeManager.js +0 -44
  73. package/.storybook/main.ts +0 -43
  74. package/.storybook/manager.ts +0 -28
  75. package/.storybook/preview-head.html +0 -16
  76. package/.storybook/preview.ts +0 -48
  77. package/.storybook/vue/coreDecorator.ts +0 -19
  78. package/.storybook/vue/vModelDecorator.ts +0 -27
  79. package/.vscode/extensions.json +0 -11
  80. package/.vscode/keybindings.example.json +0 -121
  81. package/.vscode/settings.json +0 -46
  82. package/Dockerfile +0 -3
  83. package/NPM.md +0 -25
  84. package/PUBLISH.md +0 -18
  85. package/STORYBOOK.md +0 -27
  86. package/USE_IN_PROJECT.md +0 -29
  87. package/build/afterBuild.sh +0 -12
  88. package/build/cssModules.ts +0 -39
  89. package/build/plugin/amdFix.ts +0 -46
  90. package/build/rollup.config.ts +0 -18
  91. package/nbproject/project.properties +0 -11
  92. package/nbproject/project.xml +0 -9
  93. package/public/README.md +0 -63
  94. package/src/components/common/common.ts +0 -1
  95. package/src/components/common/icon/icon.ts +0 -4
  96. package/src/components/common/icon/icon.vue +0 -15
  97. package/src/components/component.ts +0 -133
  98. package/src/components/forms/button/button.stories.ts +0 -112
  99. package/src/components/forms/button/button.ts +0 -51
  100. package/src/components/forms/button/button.vue +0 -75
  101. package/src/components/forms/button/stories/README.md +0 -35
  102. package/src/components/forms/button/stories/overview.vue +0 -33
  103. package/src/components/forms/button/style/button.css +0 -124
  104. package/src/components/forms/button/style/style-outline.css +0 -42
  105. package/src/components/forms/button/style/style-soft.css +0 -31
  106. package/src/components/forms/button/style/style-transparent.css +0 -35
  107. package/src/components/forms/checkbox/checkbox.stories.ts +0 -33
  108. package/src/components/forms/checkbox/checkbox.ts +0 -23
  109. package/src/components/forms/checkbox/checkbox.vue +0 -135
  110. package/src/components/forms/checkbox/stories/overview.vue +0 -171
  111. package/src/components/forms/controlLabel/controlLabel.stories.ts +0 -38
  112. package/src/components/forms/controlLabel/controlLabel.ts +0 -4
  113. package/src/components/forms/controlLabel/controlLabel.vue +0 -48
  114. package/src/components/forms/forms.ts +0 -10
  115. package/src/components/forms/helpers.ts +0 -10
  116. package/src/components/forms/hint/hint.stories.ts +0 -46
  117. package/src/components/forms/hint/hint.ts +0 -8
  118. package/src/components/forms/hint/hint.vue +0 -32
  119. package/src/components/forms/input/input.stories.ts +0 -31
  120. package/src/components/forms/input/input.ts +0 -34
  121. package/src/components/forms/input/input.vue +0 -170
  122. package/src/components/forms/input/stories/overview.vue +0 -61
  123. package/src/components/forms/inputDate/datepicker.css +0 -233
  124. package/src/components/forms/inputDate/datepicker.ts +0 -101
  125. package/src/components/forms/inputDate/inputDate.stories.ts +0 -41
  126. package/src/components/forms/inputDate/inputDate.ts +0 -4
  127. package/src/components/forms/inputDate/inputDate.vue +0 -127
  128. package/src/components/forms/inputDate/stories/overview.vue +0 -35
  129. package/src/components/forms/radio/radio.stories.ts +0 -34
  130. package/src/components/forms/radio/radio.ts +0 -15
  131. package/src/components/forms/radio/radio.vue +0 -107
  132. package/src/components/forms/radio/stories/overview.vue +0 -79
  133. package/src/components/forms/select/select.stories.ts +0 -34
  134. package/src/components/forms/select/select.ts +0 -36
  135. package/src/components/forms/select/select.vue +0 -253
  136. package/src/components/forms/select/stories/exampleOptions.ts +0 -71
  137. package/src/components/forms/select/stories/overview.vue +0 -60
  138. package/src/components/forms/switcher/stories/overview.vue +0 -139
  139. package/src/components/forms/switcher/switcher.stories.ts +0 -33
  140. package/src/components/forms/switcher/switcher.ts +0 -22
  141. package/src/components/forms/switcher/switcher.vue +0 -113
  142. package/src/components/forms/textarea/stories/overview.vue +0 -62
  143. package/src/components/forms/textarea/textarea.stories.ts +0 -33
  144. package/src/components/forms/textarea/textarea.ts +0 -38
  145. package/src/components/forms/textarea/textarea.vue +0 -119
  146. package/src/components/formsExt/editArea/editArea.stories.ts +0 -72
  147. package/src/components/formsExt/editArea/editArea.ts +0 -25
  148. package/src/components/formsExt/editArea/editArea.vue +0 -172
  149. package/src/components/formsExt/editArea/stories/README.md +0 -17
  150. package/src/components/formsExt/editArea/stories/overview.vue +0 -66
  151. package/src/components/formsExt/editInput/editInput.stories.ts +0 -36
  152. package/src/components/formsExt/editInput/editInput.ts +0 -20
  153. package/src/components/formsExt/editInput/editInput.vue +0 -57
  154. package/src/components/formsExt/editInput/stories/overview.vue +0 -54
  155. package/src/components/formsExt/formsExt.ts +0 -3
  156. package/src/components/formsExt/radioGroup/radioGroup.stories.ts +0 -51
  157. package/src/components/formsExt/radioGroup/radioGroup.ts +0 -28
  158. package/src/components/formsExt/radioGroup/radioGroup.vue +0 -143
  159. package/src/components/formsExt/radioGroup/stories/overview.vue +0 -78
  160. package/src/components/formsExt/radioGroup/styles/top-scrollBar.css +0 -52
  161. package/src/components/helper.js +0 -10
  162. package/src/components/helpersStories.ts +0 -151
  163. package/src/components/popup/lib/popup.globalEvents.js +0 -205
  164. package/src/components/popup/lib/popup.js +0 -702
  165. package/src/components/popup/lib/worker.globalEvents.js +0 -78
  166. package/src/components/popup/lib/worker.js +0 -232
  167. package/src/components/popup/popup/listItem.vue +0 -42
  168. package/src/components/popup/popup/opener.vue +0 -74
  169. package/src/components/popup/popup/popup.stories.ts +0 -68
  170. package/src/components/popup/popup/popup.ts +0 -93
  171. package/src/components/popup/popup/popup.vue +0 -95
  172. package/src/components/popup/popup/stories/README.md +0 -34
  173. package/src/components/popup/popup/stories/listItems.vue +0 -44
  174. package/src/components/popup/popup/stories/listSubItems.vue +0 -52
  175. package/src/components/popup/popup/stories/overview.vue +0 -208
  176. package/src/components/popup/popup/style/popup.css +0 -243
  177. package/src/components/popup/popup/style/popup.m.css +0 -71
  178. package/src/components/popup/popup/style/popup.pc.css +0 -28
  179. package/src/components/popup/popup.ts +0 -3
  180. package/src/components/popup/worker.ts +0 -1
  181. package/src/components/tabs/tabs/content.vue +0 -24
  182. package/src/components/tabs/tabs/stories/README.md +0 -10
  183. package/src/components/tabs/tabs/tab.vue +0 -52
  184. package/src/components/tabs/tabs/tabs.stories.ts +0 -171
  185. package/src/components/tabs/tabs/tabs.ts +0 -22
  186. package/src/components/tabs/tabs/tabs.vue +0 -64
  187. package/src/components/tabs/tabs.ts +0 -3
  188. package/src/core/base/Colors.stories.ts +0 -15
  189. package/src/core/base/Layout.stories.ts +0 -15
  190. package/src/core/base/Properties.stories.ts +0 -15
  191. package/src/core/base/base.mdx +0 -21
  192. package/src/core/core/core.ts +0 -144
  193. package/src/core/core/events.ts +0 -54
  194. package/src/core/core/options.ts +0 -15
  195. package/src/core/core/state.ts +0 -44
  196. package/src/core/directives/tooltip.ts +0 -55
  197. package/src/core/theme/Colors.stories.ts +0 -15
  198. package/src/core/theme/Properties.stories.ts +0 -15
  199. package/src/core/theme/theme.mdx +0 -15
  200. package/src/core/utils/date.ts +0 -164
  201. package/src/core/utils/device.ts +0 -48
  202. package/src/core/utils/dom.ts +0 -185
  203. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272/gallery.vue" +0 -72
  204. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.mdx" +0 -31
  205. package/src/core//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272//320/235/320/260/320/261/320/276/321/200 /320/270/320/272/320/276/320/275/320/276/320/272.stories.ts" +0 -14
  206. package/src/docs/CSS/FAQ.mdx +0 -43
  207. package/src/docs/CSS//320/236/320/261/321/211/320/270/320/265 /320/274/320/276/320/264/320/270/321/204/320/270/320/272/320/260/321/202/320/276/321/200/321/213.mdx" +0 -156
  208. package/src/docs/CSS//320/237/320/265/321/200/320/265/320/274/320/265/320/275/320/275/321/213/320/265.mdx +0 -47
  209. package/src/docs/CSS//320/237/321/200/320/265/320/264/320/277/321/200/320/276/321/206/320/265/321/201/321/201/320/276/321/200/321/213.mdx +0 -15
  210. package/src/docs/CSS//320/240/320/265/320/272/320/276/320/274/320/265/320/275/320/264/320/260/321/206/320/270/320/270 /320/221/320/255/320/234.mdx" +0 -49
  211. package/src/docs/CSS//320/241/321/202/320/270/320/273/320/270.md +0 -53
  212. package/src/docs/CSS//320/241/321/202/320/270/320/273/320/270.mdx +0 -4
  213. package/src/docs/CSS//320/247/321/202/320/276 /321/202/320/260/320/272/320/276/320/265 css /320/274/320/276/320/264/321/203/320/273/321/214.mdx" +0 -53
  214. package/src/docs/ROADMAP.md +0 -17
  215. package/src/docs/Roadmap.mdx +0 -4
  216. package/src/docs//320/222/320/262/320/265/320/264/320/265/320/275/320/270/320/265 /320/262 Storybook.mdx" +0 -323
  217. package/src/docs//320/232/320/276/320/274/320/277/320/276/320/275/320/265/320/275/321/202/321/213.mdx +0 -20
  218. package/src/docs//320/237/320/276/320/273/320/265/320/267/320/275/320/260/321/217 /320/270/320/275/321/204/320/276/321/200/320/274/320/260/321/206/320/270/321/217.mdx" +0 -8
  219. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260/IDE.mdx" +0 -42
  220. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/233/320/270/320/275/321/202/320/265/321/200.mdx" +0 -72
  221. package/src/docs//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260//320/241/321/202/320/260/320/275/320/264/320/260/321/200/321/202/321/213 /320/272/320/276/320/264/320/260.mdx" +0 -29
  222. package/src/globals.d.ts +0 -1
  223. package/src/resources/styles/core/colors.css +0 -204
  224. package/src/resources/styles/core/components.css +0 -70
  225. package/src/resources/styles/core/core.ts +0 -10
  226. package/src/resources/styles/core/forms/clear.css +0 -19
  227. package/src/resources/styles/core/forms/controls.css +0 -20
  228. package/src/resources/styles/core/forms/focusable.css +0 -26
  229. package/src/resources/styles/core/forms/forms.css +0 -100
  230. package/src/resources/styles/core/icon.css +0 -58
  231. package/src/resources/styles/core/layout.css +0 -40
  232. package/src/resources/styles/core/modifiers/as.css +0 -9
  233. package/src/resources/styles/core/modifiers/ellipsis.css +0 -18
  234. package/src/resources/styles/core/modifiers/modifiers.css +0 -81
  235. package/src/resources/styles/core/modifiers/only.css +0 -19
  236. package/src/resources/styles/core/select.css +0 -16
  237. package/src/resources/styles/jquery-ui.min.css +0 -6
  238. package/src/resources/styles/storybook.css +0 -11
  239. package/src/resources/styles/themes/dark/theme.css +0 -139
  240. package/src/resources/styles/themes/dark.ts +0 -1
  241. package/src/resources/styles/themes/light/theme.css +0 -139
  242. package/src/resources/styles/themes/light.ts +0 -1
  243. package/src/storybook/components/color.vue +0 -45
  244. package/src/storybook/components/colors.vue +0 -34
  245. package/src/storybook/components/icomoon.ts +0 -38
  246. package/src/storybook/components/properties.vue +0 -82
  247. package/src/storybook/resources/accessibility.png +0 -0
  248. package/src/storybook/resources/accessibility.svg +0 -5
  249. package/src/storybook/resources/addon-library.png +0 -0
  250. package/src/storybook/resources/assets.png +0 -0
  251. package/src/storybook/resources/context.png +0 -0
  252. package/src/storybook/resources/discord.svg +0 -15
  253. package/src/storybook/resources/docs.png +0 -0
  254. package/src/storybook/resources/figma-plugin.png +0 -0
  255. package/src/storybook/resources/github.svg +0 -3
  256. package/src/storybook/resources/share.png +0 -0
  257. package/src/storybook/resources/styling.png +0 -0
  258. package/src/storybook/resources/testing.png +0 -0
  259. package/src/storybook/resources/theming.png +0 -0
  260. package/src/storybook/resources/tutorials.svg +0 -12
  261. package/src/storybook/resources/youtube.svg +0 -4
  262. package/src//320/224/320/276/320/261/321/200/320/276 /320/277/320/276/320/266/320/260/320/273/320/276/320/262/320/260/321/202/321/214.mdx" +0 -3
  263. package/tsconfig.json +0 -62
  264. package/vite.config.ts +0 -91
  265. /package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.ttf +0 -0
  266. /package/{src/resources/icomoon → icomoon}/fonts/Topvisor-2.woff +0 -0
  267. /package/{src/resources/icomoon → icomoon}/selection.json +0 -0
@@ -1,233 +0,0 @@
1
- /* ui-datepicker */
2
- .ui-datepicker {
3
- --datepicker-day-color: #FFF;
4
- --datepicker-day-color-hover: var(--color-blue-150);
5
- --datepicker-selected-color: var(--color-blue-500);
6
- --datepicker-selected-color-hover: var(--color-blue-550);
7
- --datepicker-range-color: var(--color-blue-100);
8
- --datepicker-range-color-hover: var(--color-blue-150);
9
-
10
- user-select: none;
11
- width: auto;
12
- padding: 0;
13
- }
14
-
15
- .ui-datepicker:before,
16
- .ui-datepicker:after {
17
- display: none;
18
- }
19
-
20
- /* на странице */
21
- .ui-datepicker-inline {
22
- display: inline-block !important;
23
- }
24
-
25
- /* в popup */
26
- .ui-datepicker:not(.ui-datepicker-inline) {
27
- border-radius: 8px;
28
- background: var(--content-background-color);
29
- box-shadow: var(--top-shadow);
30
- z-index: 10000000 !important;
31
- padding: 8px;
32
- }
33
-
34
- .ui-datepicker a {
35
- text-decoration: none !important;
36
- }
37
-
38
- .ui-datepicker option {
39
- color: var(--color-text);
40
- font-size: 14px;
41
- }
42
-
43
- .ui-datepicker-header {
44
- padding: 0 !important;
45
- margin: 0 0 18px 0;
46
- display: flex;
47
- align-items: center;
48
- }
49
-
50
- .ui-datepicker-header > * {
51
- display: flex;
52
- align-items: center;
53
- justify-content: center;
54
- }
55
-
56
- .ui-datepicker-title {
57
- width: 100% !important;
58
- height: 24px;
59
- margin: 0 !important;
60
- }
61
-
62
- .ui-datepicker-month,
63
- .ui-datepicker-year {
64
- outline: none !important;
65
- width: auto !important;
66
- border: none;
67
- padding: 0;
68
- margin: 0 6px !important;
69
- text-align: center;
70
- font-size: 16px !important;
71
- }
72
-
73
- .ui-datepicker-month {
74
- color: var(--color-text);
75
- }
76
-
77
- .ui-datepicker-year {
78
- color: var(--color-gray-300);
79
- }
80
-
81
- /* select.ui-datepicker-month,
82
- select.ui-datepicker-year{ cursor: pointer; color: var(--color-blue-500); }*/
83
- select.ui-datepicker-month,
84
- select.ui-datepicker-year {
85
- cursor: pointer;
86
- }
87
-
88
- .ui-datepicker-prev,
89
- .ui-datepicker-next {
90
- cursor: pointer;
91
- width: 24px !important;
92
- height: 24px !important;
93
- font-size: 24px;
94
- font-family: 'Topvisor-2';
95
- position: static !important;
96
- }
97
-
98
- .ui-datepicker-prev:before {
99
- content: '';
100
- }
101
-
102
- .ui-datepicker-next {
103
- order: 1;
104
- }
105
-
106
- .ui-datepicker-next:before {
107
- content: '';
108
- }
109
-
110
- .ui-datepicker-prev > *,
111
- .ui-datepicker-next > * {
112
- display: none !important;
113
- }
114
-
115
- .ui-datepicker thead th {
116
- width: auto !important;
117
- padding: 0 !important;
118
- color: #B3BEBF;
119
- font-size: 14px;
120
- font-weight: 400 !important;
121
- }
122
-
123
- .ui-datepicker table {
124
- margin: 0 !important;
125
- font-size: 14px;
126
- }
127
-
128
- .ui-datepicker td {
129
- background: none;
130
- padding: 0 !important;
131
- }
132
-
133
- .ui-datepicker td span,
134
- .ui-datepicker td a {
135
- border-radius: 8px;
136
- border: none;
137
- min-width: 32px;
138
- height: 32px;
139
- padding: 0;
140
- margin: 1px;
141
- color: var(--color-text) !important;
142
- line-height: 32px;
143
- text-align: center;
144
- position: relative;
145
- display: block;
146
- }
147
-
148
- /* обычные даты */
149
- .ui-datepicker td a {
150
- background: var(--datepicker-day-color);
151
- }
152
-
153
- .ui-datepicker td a:hover {
154
- background: var(--datepicker-day-color-hover);
155
- }
156
-
157
- /* текущий день */
158
- td.ui-datepicker-today span,
159
- td.ui-datepicker-today a {
160
- background: none;
161
- position: relative;
162
- }
163
-
164
- /* выбранные даты */
165
- .ui-datepicker td.selected a {
166
- background: var(--datepicker-range-color);
167
- padding-right: 0;
168
- padding-left: 1px;
169
- margin-right: 1px;
170
- margin-left: 0;
171
- }
172
-
173
- .ui-datepicker td.selected a:hover {
174
- background: var(--datepicker-range-color-hover);
175
- }
176
-
177
- .ui-datepicker td.selected:not(.selected-start):not(:first-child):not(.first-of-month) a {
178
- border-top-left-radius: 0;
179
- border-bottom-left-radius: 0;
180
- padding-left: 1px;
181
- margin-left: 0;
182
- }
183
-
184
- .ui-datepicker td.selected:not(.selected-end):not(:last-child):not(.last-of-month) a {
185
- border-top-right-radius: 0;
186
- border-bottom-right-radius: 0;
187
- padding-right: 1px;
188
- margin-right: 0;
189
- }
190
-
191
- .ui-datepicker td.selected-start a,
192
- .ui-datepicker td.selected-end a,
193
- .ui-datepicker td.ui-datepicker-current-day a {
194
- background: var(--datepicker-selected-color);
195
- color: #FFF !important;
196
- }
197
-
198
- .ui-datepicker td.selected-start a:hover,
199
- .ui-datepicker td.selected-end a:hover,
200
- .ui-datepicker td.ui-datepicker-current-day a:hover {
201
- background: var(--datepicker-selected-color-hover);
202
- }
203
-
204
- .ui-datepicker-day-marks {
205
- line-height: normal;
206
- position: absolute;
207
- right: 0;
208
- bottom: 3px;
209
- left: 0;
210
- display: flex;
211
- align-items: center;
212
- justify-content: center;
213
- }
214
-
215
- .ui-datepicker-day-marks > i {
216
- border-radius: 50%;
217
- border: 1px solid #FFF;
218
- width: 4px;
219
- height: 4px;
220
- margin: 0 2px;
221
- }
222
-
223
- .ui-datepicker-day-marks-exists {
224
- background: var(--color-blue-500);
225
- }
226
-
227
- .ui-datepicker-day-marks-update {
228
- background: var(--color-red-500);
229
- }
230
-
231
- .ui-datepicker-row-break {
232
- display: none;
233
- }
@@ -1,101 +0,0 @@
1
- import { toRef, watch } from 'vue';
2
- import Core from '@/core/core/core';
3
- import UtilsDate from '@/core/utils/date';
4
-
5
- import css from '@/components/forms/inputDate/datepicker.css?raw';
6
-
7
- Core.appendStyle(css);
8
-
9
- const _window: any = window;
10
-
11
- const $ = (el: HTMLInputElement) => {
12
- if (!_window?.jQuery?.ui?.datepicker) {
13
- console.info('Для работы datepicker требуется глобальная загрузка jQuery UI Datepicker');
14
-
15
- return;
16
- }
17
-
18
- _window.jQuery.datepicker._defaults.dateFormat = Core.state.dateFormat.toLowerCase().replace('m', 'mm').replace('y', 'yy').replace('d', 'dd');
19
-
20
- return _window.jQuery(el);
21
- };
22
-
23
- export function connectDatepicker(el: HTMLInputElement, options: any) {
24
- return $(el)?.datepicker(options);
25
- }
26
-
27
- let dateFormatted;
28
- let delimiter: string;
29
- let dateNumbersCount: number;
30
- let delimitersIndexes: number[];
31
-
32
- watch(toRef(Core.state.dateFormat), () => {
33
- // генерация отформатированной даты, извлечение из нее разделителей и их индексов
34
- dateFormatted = UtilsDate.dateFormat('2000-01-01');
35
- delimiter = dateFormatted.match(/\D/)?.[0] ?? '-';
36
- dateNumbersCount = dateFormatted.replace(/\D+/g, '').length;
37
- delimitersIndexes = [];
38
-
39
- for (let i = 0; i < dateFormatted.length; i++) {
40
- if (dateFormatted[i] === delimiter) {
41
- delimitersIndexes.push(i);
42
- }
43
- }
44
- }, { immediate: true });
45
-
46
- /**
47
- * Автоформат при вводе в поле с датой
48
- */
49
- export function oninput(e: any) {
50
- let selectionPos = e.target.selectionEnd;
51
- let value = e.target.value;
52
-
53
- // разбить занчение на две половины - до и после каретки
54
- // удалить все символы, кроме цифр
55
- let valueChunkLeft = value.substring(0, selectionPos).replace(/\D+/g, '');
56
- let valueChunkRight = value.substring(selectionPos).replace(/\D+/g, '');
57
-
58
- let extraNumbersCount = valueChunkLeft.length + valueChunkRight.length - dateNumbersCount;
59
- if (extraNumbersCount > 0) {
60
- // // количество цифр больше требуемого - удалить лишние
61
- valueChunkLeft = valueChunkLeft.substring(0, dateNumbersCount);
62
-
63
- const valueChunkRightMaxLength = dateNumbersCount - valueChunkLeft.length;
64
- valueChunkRight = valueChunkRight.substring(valueChunkRight.length - valueChunkRightMaxLength);
65
- } else if (extraNumbersCount < 0) {
66
- // количество цифр меньше требуемого - добавить 0
67
- if (e.inputType === 'deleteContentForward') {
68
- // нажатие на delete - добавить к левой части для правильного позиционирования каретки
69
- valueChunkLeft += '0'.repeat(-extraNumbersCount);
70
- } else {
71
- valueChunkRight = '0'.repeat(-extraNumbersCount) + valueChunkRight;
72
- }
73
- }
74
-
75
- selectionPos = valueChunkLeft.length;
76
- value = valueChunkLeft + valueChunkRight;
77
-
78
- // вставить разделители
79
- for (let i = 0; i < delimitersIndexes.length; i++) {
80
- const delimiterIndex = delimitersIndexes[i];
81
-
82
- value = value.substring(0, delimiterIndex) + delimiter + value.substring(delimiterIndex);
83
-
84
- // сдвинуть каретку, если разделитель вставлен левее ее
85
- if (selectionPos >= delimiterIndex) {
86
- selectionPos++;
87
- }
88
- }
89
-
90
- // нажатие на backspace - если слева символ разделителя, перенести каретку за него
91
- if (e.inputType === 'deleteContentBackward' && value[selectionPos - 1] === delimiter) {
92
- selectionPos--;
93
- }
94
-
95
- // если значение изменилось - вставить его и переместить каретку
96
- if (value !== e.target.value) {
97
- e.target.value = value;
98
- e.target.selectionStart = selectionPos;
99
- e.target.selectionEnd = selectionPos;
100
- }
101
- }
@@ -1,41 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes, genOverviewStory } from '@/components/helpersStories';
4
- import Component from './inputDate.vue';
5
- import * as ComponentsConst from './inputDate';
6
- import OverviewComponent from './stories/overview.vue';
7
-
8
- const argTypes = genArgsTypes(Component, ComponentsConst, true);
9
-
10
- /**
11
- * Поле ввода с выбором даты.
12
- *
13
- * В современных браузерах для тач устройств выводится нативный выбор даты, в остальных устройствах подклчюается jQuery Datepicker
14
- * с автоформатом вводимой даты.
15
- *
16
- * Для формата дат используются функции utils/date.
17
- *
18
- * Формат определяется настройкой dateFormat, которую можно указать при подклчюении UI к приложению Vue или через Core.defineOptions().
19
- */
20
- const meta = {
21
- component: Component,
22
- tags: ['autodocs'],
23
- argTypes,
24
- args: {
25
- modelValue: '2000-01-01',
26
- },
27
- } satisfies Meta<typeof Component>;
28
-
29
- type Story = StoryObj<typeof meta>;
30
-
31
- export const Playground = {} satisfies Story;
32
-
33
- export const Overview: Story = genOverviewStory({
34
- args: {
35
- title: 'Заголовок поля',
36
- captionType: '',
37
- isError: false,
38
- },
39
- }, OverviewComponent);
40
-
41
- export default meta;
@@ -1,4 +0,0 @@
1
- import type { Props, Emits } from '@/components/forms/input/input';
2
- export * from '@/components/forms/input/input';
3
-
4
- export type{ Props, Emits };
@@ -1,127 +0,0 @@
1
- <script lang="ts">
2
- const useNativeDatepicker = !!document.documentElement.ontouchstart && !!document.createElement('input').showPicker;
3
-
4
- let onInputLazy = (_e: any) => { };
5
- </script>
6
-
7
- <script setup lang="ts">
8
- import { ref, computed, onUnmounted } from 'vue';
9
- import UtilsDate from '@/core/utils/date';
10
- import type { Props, Emits } from './inputDate';
11
- import { Input } from '@/components/forms/forms';
12
- import Core from '@/core/core/core';
13
-
14
- const props = withDefaults(defineProps<Props>(), {
15
- icon2: '',
16
- });
17
-
18
- const emit = defineEmits<Emits>();
19
-
20
- const el = ref();
21
-
22
- const localValue = computed({
23
- get() {
24
- return UtilsDate.dateFormat(props.modelValue, 2, '0000-00-00');
25
- },
26
-
27
- set(value) {
28
- value = UtilsDate.dateUnformat(value, '0000-00-00');
29
-
30
- emit('update:modelValue', value);
31
- },
32
- });
33
-
34
- let oninput = (e: any) => {
35
- onInputLazy(e);
36
- };
37
-
38
- let onchange = (e: any) => {
39
- const dateUnformat = UtilsDate.dateUnformat(e.target.value);
40
- const dateFormat = UtilsDate.dateFormat(dateUnformat);
41
-
42
- if (!dateFormat || dateFormat === Core.L.Not_date || e.target.value !== dateFormat) {
43
- e.target.value = localValue.value;
44
-
45
- return;
46
- }
47
-
48
- localValue.value = e.target.value;
49
- };
50
-
51
- /**
52
- * Инициализпация функций выбора дат
53
- *
54
- * Для не нативного datepicker
55
- */
56
- async function init(e: any) {
57
- const datepicker = await import('./datepicker');
58
-
59
- // формат ввода
60
- onInputLazy = datepicker.oninput;
61
-
62
- // datepicker
63
- const $el = datepicker.connectDatepicker(e.target, {
64
- onSelect: () => onchange(e),
65
- });
66
-
67
- if ($el) {
68
- $el.datepicker('show');
69
-
70
- onUnmounted(() => $el.datepicker('destroy'));
71
- }
72
- }
73
- </script>
74
-
75
- <template>
76
- <Input
77
- v-if="useNativeDatepicker"
78
- :="$props"
79
- :modelValue="localValue"
80
- readonly
81
- @click="el.showPicker()"
82
- >
83
- <input
84
- ref="el"
85
- type="date"
86
- class="top-input_input-date"
87
- :modelValue="modelValue"
88
- @change="(e: any) => localValue = e.target.value"
89
- tabindex="-1"
90
- />
91
- </Input>
92
-
93
- <Input
94
- v-else
95
- :="$props"
96
- :modelValue="localValue"
97
- @update:modelValue="(newValue) => (newValue === '') ? localValue = '' : ''"
98
- @input.date="oninput"
99
- @focus.once.date="init"
100
- @change.date="onchange"
101
- modificator="datepicker"
102
- />
103
- </template>
104
-
105
- <style module>
106
- .top-input-datepicker {
107
- width: calc(105px + var(--top-icon-width) + var(--top-icon2-width));
108
- }
109
-
110
- .top-input_input-date {
111
- opacity: 0;
112
- position: absolute;
113
- top: 0;
114
- right: 0;
115
- bottom: 0;
116
- left: 0;
117
- z-index: -1;
118
- }
119
-
120
- .top-input_input-date::-webkit-inner-spin-button {
121
- display: none;
122
- }
123
-
124
- .top-input_input-date::-webkit-calendar-picker-indicator {
125
- opacity: 0;
126
- }
127
- </style>
@@ -1,35 +0,0 @@
1
- <script setup lang="ts">
2
- import type { Props } from '../inputDate';
3
- import InputDate from '../inputDate.vue';
4
- import { reactive } from 'vue';
5
-
6
- defineProps<Props>();
7
-
8
- const modelValues = reactive([
9
- '2000-01-01',
10
- '2000-01-01',
11
- ]);
12
- </script>
13
-
14
- <template>
15
- <div>
16
- <h2>Выбор даты</h2>
17
-
18
- <InputDate
19
- :="$props"
20
- v-model="modelValues[0]"
21
- />
22
-
23
- Выбранная дата: {{ modelValues[0] }}
24
-
25
- <h2>Выбор даты с очисткой</h2>
26
-
27
- <InputDate
28
- :="$props"
29
- v-model="modelValues[1]"
30
- :addCleaner="true"
31
- />
32
-
33
- Выбранная дата: {{ modelValues[1] }}
34
- </div>
35
- </template>
@@ -1,34 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/vue3';
2
-
3
- import { genArgsTypes, genOverviewStory } from '@/components/helpersStories';
4
- import Component from './radio.vue';
5
- import * as ComponentsConst from './radio';
6
- import OverviewComponent from './stories/overview.vue';
7
-
8
- const argTypes = genArgsTypes(Component, ComponentsConst, true);
9
-
10
- const meta = {
11
- component: Component,
12
- tags: ['autodocs'],
13
- argTypes,
14
- args: {
15
- value: 'default value',
16
- modelValue: '',
17
- },
18
- } satisfies Meta<typeof Component>;
19
-
20
- type Story = StoryObj<typeof meta>;
21
-
22
- export const Playground = {
23
- args: {
24
- default: 'radio',
25
- },
26
- } satisfies Story;
27
-
28
- export const Overview: Story = genOverviewStory({
29
- args: {
30
- isError: false,
31
- },
32
- }, OverviewComponent);
33
-
34
- export default meta;
@@ -1,15 +0,0 @@
1
- export interface Props {
2
- /**
3
- * [подробнее](https://vuejs.org/guide/essentials/forms.html#radio)
4
- */
5
- modelValue: string | object;
6
- value: Props['modelValue'];
7
- name?: string;
8
- description?: string;
9
- disabled?: boolean;
10
- isError?: boolean;
11
- }
12
-
13
- export interface Emits {
14
- (e: 'update:modelValue', value: Props['modelValue']): void;
15
- }
@@ -1,107 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue';
3
- import type { Props, Emits } from './radio';
4
- import ControlLabel from '../controlLabel/controlLabel.vue';
5
-
6
- const props = defineProps<Props>();
7
- const emit = defineEmits<Emits>();
8
-
9
- const localValue = computed({
10
- get() {
11
- return props.modelValue;
12
- },
13
- set(value) {
14
- emit('update:modelValue', value);
15
- },
16
- });
17
-
18
- </script>
19
-
20
- <template>
21
- <label
22
- :class="{
23
- ['top-forms-optionWrapper']: true,
24
- ['top-radio']: true,
25
- ['top-radio_' + name]: name !== '',
26
- ['top-disabled']: disabled,
27
- ['top-error']: isError && !disabled,
28
- }"
29
- >
30
- <input
31
- type="radio"
32
- :class="{
33
- ['top-forms-focusable']: !disabled,
34
- ['top-forms-option']: true,
35
- ['top-radio_input']: true,
36
- ['top-error']: isError && !disabled,
37
- }"
38
- v-model="localValue"
39
- :name="name"
40
- :value="value"
41
- :disabled="disabled"
42
- >
43
-
44
- <ControlLabel
45
- v-if="$slots.default"
46
- :description="description"
47
- :disabled="disabled"
48
- >
49
- <!-- @slot Слот с заголовком -->
50
- <slot></slot>
51
- </ControlLabel>
52
- </label>
53
- </template>
54
-
55
- <style module>
56
- :root {
57
- --top-radio-background-color: var(--content-background-color);
58
- --top-radio-background-color-hover: var(--top-radio-background-color);
59
- --top-radio-background-color-active: var(--top-radio-background-color);
60
- }
61
-
62
- .top-radio {
63
- cursor: pointer;
64
- }
65
-
66
- .top-radio_input {
67
- border-radius: 50%;
68
- background: var(--content-background-color);
69
- border: 1px solid var(--top-forms-border-color);
70
- width: calc(var(--top-forms-option-height) - 3px * 2);
71
- height: calc(var(--top-forms-option-height) - 3px * 2);
72
- }
73
-
74
- .top-radio_input:hover {
75
- border-color: var(--top-forms-option-color);
76
- background: var(--color-theme-50)
77
- }
78
-
79
- .top-radio_input:checked {
80
- border-color: var(--top-forms-option-color);
81
- border-width: 5px;
82
- }
83
-
84
- .top-radio_input:checked:hover {
85
- border-color: var(--top-forms-option-color-hover);
86
- }
87
-
88
- /* disabled */
89
- .top-radio_input:disabled {
90
- border-color: var(--color-line-1-opacity);
91
- background: var(--color-theme-50);
92
- }
93
-
94
- /* disabled selected */
95
- .top-radio_input:checked:disabled {
96
- border-color: var(--color-theme-400);
97
- }
98
-
99
- /* isError */
100
- .top-radio_input.top-error {
101
- border-color: var(--color-negative);
102
- }
103
-
104
- .top-radio_input.top-error:hover {
105
- border-color: var(--color-negative-2);
106
- }
107
- </style>