mediacube-ui-v2 0.0.38 → 0.0.39

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 (487) hide show
  1. package/dist/assets/iconsSprite.svg +1 -0
  2. package/dist/assets/img/no_table_data.png +0 -0
  3. package/dist/assets/img/no_user.png +0 -0
  4. package/dist/mediacube-ui-v2.js +2479 -2339
  5. package/dist/mediacube-ui-v2.umd.cjs +4 -4
  6. package/dist/types/App.vue.d.ts +2 -0
  7. package/dist/types/assets/tokens/json/animations.json.d.ts +8 -0
  8. package/dist/types/assets/tokens/json/border-radius.json.d.ts +26 -0
  9. package/dist/types/assets/tokens/json/box-shadows.json.d.ts +26 -0
  10. package/dist/types/assets/tokens/json/colors.json.d.ts +73 -0
  11. package/dist/types/assets/tokens/json/durations.json.d.ts +12 -0
  12. package/dist/types/assets/tokens/json/easings.json.d.ts +5 -0
  13. package/dist/types/assets/tokens/json/font-families.json.d.ts +6 -0
  14. package/dist/types/assets/tokens/json/font-sizes.json.d.ts +20 -0
  15. package/dist/types/assets/tokens/json/font-weights.json.d.ts +14 -0
  16. package/dist/types/assets/tokens/json/gradients.json.d.ts +15 -0
  17. package/dist/types/assets/tokens/json/index.d.ts +18 -0
  18. package/dist/types/assets/tokens/json/letter-spacings.json.d.ts +6 -0
  19. package/dist/types/assets/tokens/json/line-heights.json.d.ts +20 -0
  20. package/dist/types/assets/tokens/json/media-queries.json.d.ts +28 -0
  21. package/dist/types/assets/tokens/json/opacities.json.d.ts +7 -0
  22. package/dist/types/assets/tokens/json/sizes.json.d.ts +44 -0
  23. package/dist/types/assets/tokens/json/spacings.json.d.ts +36 -0
  24. package/dist/types/assets/tokens/json/z-indexes.json.d.ts +14 -0
  25. package/dist/{src → types}/components/elements/McAvatar/McAvatar.vue.d.ts +5 -6
  26. package/dist/{src → types}/components/elements/McBadge/McBadge.vue.d.ts +3 -4
  27. package/dist/types/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +14 -0
  28. package/dist/{src → types}/components/elements/McButton/McButton.vue.d.ts +9 -11
  29. package/dist/{src → types}/components/elements/McChip/McChip.vue.d.ts +6 -8
  30. package/dist/{src → types}/components/elements/McDatepicker/McDatepicker.vue.d.ts +1 -3
  31. package/dist/{src → types}/components/elements/McDraggable/McDraggable.vue.d.ts +4 -5
  32. package/dist/{src → types}/components/elements/McFieldCheckbox/McFieldCheckbox.vue.d.ts +1 -2
  33. package/dist/{src → types}/components/elements/McFieldRadio/McFieldRadio.vue.d.ts +8 -9
  34. package/dist/{src → types}/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.d.ts +1 -2
  35. package/dist/{src → types}/components/elements/McFieldRange/McFieldRange.vue.d.ts +6 -7
  36. package/dist/{src → types}/components/elements/McFieldSelect/McFieldSelect.vue.d.ts +8 -10
  37. package/dist/{src → types}/components/elements/McFieldText/McFieldText.vue.d.ts +9 -10
  38. package/dist/{src → types}/components/elements/McFieldToggle/McFieldToggle.vue.d.ts +6 -7
  39. package/dist/{src → types}/components/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.d.ts +4 -5
  40. package/dist/{src → types}/components/elements/McNodata/McNoData.vue.d.ts +5 -6
  41. package/dist/{src → types}/components/elements/McNotification/McNotification.vue.d.ts +5 -6
  42. package/dist/{src → types}/components/elements/McProgress/McProgress.vue.d.ts +5 -6
  43. package/dist/{src → types}/components/elements/McSeparator/McSeparator.vue.d.ts +4 -5
  44. package/dist/{src → types}/components/elements/McSlideUpDown/McSlideUpDown.vue.d.ts +5 -6
  45. package/dist/{src → types}/components/elements/McStack/McStack.vue.d.ts +4 -5
  46. package/dist/{src → types}/components/elements/McSvgIcon/McSvgIcon.vue.d.ts +9 -10
  47. package/dist/{src → types}/components/elements/McTitle/McTitle.vue.d.ts +7 -8
  48. package/dist/{src → types}/components/elements/McTooltip/McTooltip.vue.d.ts +6 -7
  49. package/dist/{src → types}/components/patterns/McAccordion/McAccordion.vue.d.ts +4 -5
  50. package/dist/{src → types}/components/patterns/McCell/McCell.vue.d.ts +6 -7
  51. package/dist/{src → types}/components/patterns/McCollapse/McCollapse.vue.d.ts +6 -7
  52. package/dist/{src → types}/components/patterns/McDropdown/McDropdown.vue.d.ts +7 -8
  53. package/dist/types/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +22 -0
  54. package/dist/{src → types}/components/patterns/McFilter/McFilter.vue.d.ts +6 -7
  55. package/dist/{src → types}/components/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts +6 -7
  56. package/dist/{src → types}/components/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts +6 -7
  57. package/dist/{src → types}/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.d.ts +6 -7
  58. package/dist/{src → types}/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.d.ts +6 -7
  59. package/dist/{src → types}/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.d.ts +6 -7
  60. package/dist/{src → types}/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.d.ts +6 -7
  61. package/dist/{src → types}/components/patterns/McGridCol/McGridCol.vue.d.ts +4 -5
  62. package/dist/{src → types}/components/patterns/McGridRow/McGridRow.vue.d.ts +5 -6
  63. package/dist/{src → types}/components/patterns/McOverlay/McOverlay.vue.d.ts +4 -5
  64. package/dist/{src → types}/components/patterns/McPreview/McPreview.vue.d.ts +4 -5
  65. package/dist/{src → types}/components/patterns/McSideBar/McSideBar.vue.d.ts +7 -8
  66. package/dist/{src → types}/components/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.d.ts +5 -6
  67. package/dist/{src → types}/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts +5 -6
  68. package/dist/{src → types}/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.d.ts +6 -7
  69. package/dist/{src → types}/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts +6 -7
  70. package/dist/{src → types}/components/patterns/McTab/McTab.vue.d.ts +5 -6
  71. package/dist/{src → types}/components/patterns/McTabs/McTabs.vue.d.ts +7 -9
  72. package/dist/{src → types}/components/patterns/McWrapScroll/McWrapScroll.vue.d.ts +7 -8
  73. package/dist/{src → types}/components/templates/McDrawer/McDrawer.vue.d.ts +7 -8
  74. package/dist/{src → types}/components/templates/McDrawer/McDrawerContainer.vue.d.ts +5 -6
  75. package/dist/{src → types}/components/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.d.ts +4 -5
  76. package/dist/{src → types}/components/templates/McModal/McModal.vue.d.ts +7 -8
  77. package/dist/{src → types}/components/templates/McModal/McModalContainer.vue.d.ts +5 -6
  78. package/dist/{src → types}/components/templates/McTable/McTable/McTable.vue.d.ts +7 -8
  79. package/dist/{src → types}/components/templates/McTable/McTableCard/McTableCard.vue.d.ts +6 -7
  80. package/dist/{src → types}/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.d.ts +4 -5
  81. package/dist/types/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +18 -0
  82. package/dist/{src → types}/components/templates/McTable/McTableSort/McTableSort.vue.d.ts +6 -7
  83. package/dist/{src → types}/components/templates/McTopBar/McTopBar.vue.d.ts +4 -5
  84. package/dist/{src → types}/components/templates/McVirtualScroll/McVirtualScroll.vue.d.ts +4 -5
  85. package/dist/{src/composables/index.js → types/composables/index.d.ts} +1 -1
  86. package/dist/{src → types}/composables/useDrawer.d.ts +1 -2
  87. package/dist/{src → types}/composables/useEncodeDecode.d.ts +0 -1
  88. package/dist/types/composables/useFieldErrors.d.ts +5 -0
  89. package/dist/{src → types}/composables/useHelper.d.ts +0 -1
  90. package/dist/{src → types}/composables/useModal.d.ts +0 -1
  91. package/dist/{src → types}/composables/useRandomNumber.d.ts +0 -1
  92. package/dist/{src → types}/composables/useTooltip.d.ts +1 -2
  93. package/dist/{src → types}/consts/table.d.ts +0 -1
  94. package/dist/{src → types}/enums/Cell.d.ts +0 -1
  95. package/dist/{src → types}/enums/Chip.d.ts +0 -1
  96. package/dist/{src → types}/enums/Datepicker.d.ts +0 -1
  97. package/dist/{src → types}/enums/Drawer.d.ts +0 -1
  98. package/dist/{src → types}/enums/Dropdown.d.ts +0 -1
  99. package/dist/{src → types}/enums/Filter.d.ts +0 -1
  100. package/dist/{src → types}/enums/Grid.d.ts +0 -1
  101. package/dist/{src → types}/enums/Input.d.ts +0 -1
  102. package/dist/{src → types}/enums/Modal.d.ts +0 -1
  103. package/dist/{src → types}/enums/Preview.d.ts +0 -1
  104. package/dist/{src → types}/enums/Radio.d.ts +0 -1
  105. package/dist/{src → types}/enums/RadioGroup.d.ts +0 -1
  106. package/dist/{src → types}/enums/Select.d.ts +0 -1
  107. package/dist/{src → types}/enums/Sidebar.d.ts +0 -1
  108. package/dist/{src → types}/enums/Tab.d.ts +0 -1
  109. package/dist/{src → types}/enums/Title.d.ts +0 -1
  110. package/dist/{src → types}/enums/Tooltip.d.ts +0 -1
  111. package/dist/{src/enums/index.js → types/enums/index.d.ts} +0 -1
  112. package/dist/{src → types}/enums/ui/Alignment.d.ts +0 -1
  113. package/dist/{src → types}/enums/ui/Button.d.ts +0 -1
  114. package/dist/{src → types}/enums/ui/Directions.d.ts +0 -1
  115. package/dist/{src → types}/enums/ui/Weights.d.ts +0 -1
  116. package/dist/{src → types}/index.d.ts +0 -2
  117. package/dist/types/main.d.ts +0 -0
  118. package/dist/{src → types}/mocks/authUser.d.ts +0 -1
  119. package/dist/{src → types}/mocks/categories.d.ts +0 -1
  120. package/dist/{src → types}/mocks/filterMocks.d.ts +1 -2
  121. package/dist/types/mocks/icons.json.d.ts +3 -0
  122. package/dist/{src → types}/mocks/menuLangs.d.ts +0 -1
  123. package/dist/{src → types}/mocks/sidebar.d.ts +1 -2
  124. package/dist/{src → types}/mocks/tableData.d.ts +1 -2
  125. package/dist/{src → types}/types/IButton.d.ts +5 -6
  126. package/dist/{src → types}/types/ICell.d.ts +1 -2
  127. package/dist/{src → types}/types/IChip.d.ts +2 -3
  128. package/dist/{src → types}/types/ICollapse.d.ts +0 -1
  129. package/dist/{src → types}/types/IDatepicker.d.ts +1 -2
  130. package/dist/{src → types}/types/IDirections.d.ts +1 -2
  131. package/dist/{src → types}/types/IDrawer.d.ts +2 -3
  132. package/dist/{src → types}/types/IDropdown.d.ts +1 -2
  133. package/dist/{src → types}/types/IFilter.d.ts +1 -2
  134. package/dist/{src → types}/types/IGrid.d.ts +0 -1
  135. package/dist/{src → types}/types/IInput.d.ts +1 -2
  136. package/dist/{src → types}/types/IModal.d.ts +2 -3
  137. package/dist/{src → types}/types/IPreview.d.ts +1 -2
  138. package/dist/{src → types}/types/IRadio.d.ts +1 -2
  139. package/dist/{src → types}/types/IRadioGroup.d.ts +1 -2
  140. package/dist/{src → types}/types/IRoute.d.ts +0 -1
  141. package/dist/{src → types}/types/ISelect.d.ts +1 -2
  142. package/dist/{src → types}/types/ISideBar.d.ts +5 -6
  143. package/dist/{src → types}/types/ITable.d.ts +2 -3
  144. package/dist/{src → types}/types/ITabs.d.ts +4 -5
  145. package/dist/{src → types}/types/ITitle.d.ts +1 -2
  146. package/dist/{src → types}/types/ITooltip.d.ts +1 -2
  147. package/dist/{src/types/index.js → types/types/index.d.ts} +0 -2
  148. package/dist/{src → types}/types/styles/Alignment.d.ts +1 -2
  149. package/dist/{src → types}/types/styles/AvatarSizes.d.ts +0 -1
  150. package/dist/{src → types}/types/styles/Colors.d.ts +0 -1
  151. package/dist/{src → types}/types/styles/Durations.d.ts +0 -1
  152. package/dist/{src → types}/types/styles/FontSizes.d.ts +0 -1
  153. package/dist/{src → types}/types/styles/FontWeights.d.ts +0 -1
  154. package/dist/{src → types}/types/styles/Grid.d.ts +1 -2
  155. package/dist/{src → types}/types/styles/Icons.d.ts +0 -1
  156. package/dist/{src → types}/types/styles/LineHeights.d.ts +0 -1
  157. package/dist/{src → types}/types/styles/MediaQueries.d.ts +0 -1
  158. package/dist/{src → types}/types/styles/Radiuses.d.ts +0 -1
  159. package/dist/{src → types}/types/styles/Sizes.d.ts +0 -1
  160. package/dist/{src → types}/types/styles/Spaces.d.ts +0 -1
  161. package/dist/types/types/styles/Weights.d.ts +2 -0
  162. package/dist/{src → types}/utils/dayjs.d.ts +0 -1
  163. package/dist/{src → types}/utils/mcGridColAdaptiveProps.d.ts +1 -2
  164. package/dist/{src → types}/utils/mcTitleAdaptiveProps.d.ts +1 -2
  165. package/package.json +12 -13
  166. package/dist/src/App.vue.d.ts +0 -3
  167. package/dist/src/App.vue.d.ts.map +0 -1
  168. package/dist/src/App.vue.js +0 -54
  169. package/dist/src/assets/tokens/json/animations.json +0 -6
  170. package/dist/src/assets/tokens/json/border-radius.json +0 -24
  171. package/dist/src/assets/tokens/json/box-shadows.json +0 -24
  172. package/dist/src/assets/tokens/json/colors.json +0 -71
  173. package/dist/src/assets/tokens/json/durations.json +0 -10
  174. package/dist/src/assets/tokens/json/easings.json +0 -3
  175. package/dist/src/assets/tokens/json/font-families.json +0 -4
  176. package/dist/src/assets/tokens/json/font-sizes.json +0 -18
  177. package/dist/src/assets/tokens/json/font-weights.json +0 -12
  178. package/dist/src/assets/tokens/json/gradients.json +0 -13
  179. package/dist/src/assets/tokens/json/index.d.ts +0 -19
  180. package/dist/src/assets/tokens/json/index.d.ts.map +0 -1
  181. package/dist/src/assets/tokens/json/index.js +0 -18
  182. package/dist/src/assets/tokens/json/letter-spacings.json +0 -4
  183. package/dist/src/assets/tokens/json/line-heights.json +0 -18
  184. package/dist/src/assets/tokens/json/media-queries.json +0 -26
  185. package/dist/src/assets/tokens/json/opacities.json +0 -5
  186. package/dist/src/assets/tokens/json/sizes.json +0 -42
  187. package/dist/src/assets/tokens/json/spacings.json +0 -34
  188. package/dist/src/assets/tokens/json/z-indexes.json +0 -12
  189. package/dist/src/components/elements/McAvatar/McAvatar.vue.d.ts.map +0 -1
  190. package/dist/src/components/elements/McAvatar/McAvatar.vue.js +0 -412
  191. package/dist/src/components/elements/McBadge/McBadge.vue.d.ts.map +0 -1
  192. package/dist/src/components/elements/McBadge/McBadge.vue.js +0 -188
  193. package/dist/src/components/elements/McBottomLoader/McBottomLoader.vue.d.ts +0 -15
  194. package/dist/src/components/elements/McBottomLoader/McBottomLoader.vue.d.ts.map +0 -1
  195. package/dist/src/components/elements/McBottomLoader/McBottomLoader.vue.js +0 -83
  196. package/dist/src/components/elements/McButton/McButton.vue.d.ts.map +0 -1
  197. package/dist/src/components/elements/McButton/McButton.vue.js +0 -1037
  198. package/dist/src/components/elements/McChip/McChip.vue.d.ts.map +0 -1
  199. package/dist/src/components/elements/McChip/McChip.vue.js +0 -326
  200. package/dist/src/components/elements/McCropper/McCropper.vue.d.ts +0 -30
  201. package/dist/src/components/elements/McCropper/McCropper.vue.d.ts.map +0 -1
  202. package/dist/src/components/elements/McCropper/McCropper.vue.js +0 -155
  203. package/dist/src/components/elements/McDatepicker/McDatepicker.vue.d.ts.map +0 -1
  204. package/dist/src/components/elements/McDatepicker/McDatepicker.vue.js +0 -1251
  205. package/dist/src/components/elements/McDraggable/McDraggable.vue.d.ts.map +0 -1
  206. package/dist/src/components/elements/McDraggable/McDraggable.vue.js +0 -280
  207. package/dist/src/components/elements/McFieldCheckbox/McFieldCheckbox.vue.d.ts.map +0 -1
  208. package/dist/src/components/elements/McFieldCheckbox/McFieldCheckbox.vue.js +0 -541
  209. package/dist/src/components/elements/McFieldRadio/McFieldRadio.vue.d.ts.map +0 -1
  210. package/dist/src/components/elements/McFieldRadio/McFieldRadio.vue.js +0 -488
  211. package/dist/src/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.d.ts.map +0 -1
  212. package/dist/src/components/elements/McFieldRadioGroup/McFieldRadioGroup.vue.js +0 -470
  213. package/dist/src/components/elements/McFieldRange/McFieldRange.vue.d.ts.map +0 -1
  214. package/dist/src/components/elements/McFieldRange/McFieldRange.vue.js +0 -547
  215. package/dist/src/components/elements/McFieldSelect/McFieldSelect.vue.d.ts.map +0 -1
  216. package/dist/src/components/elements/McFieldSelect/McFieldSelect.vue.js +0 -1436
  217. package/dist/src/components/elements/McFieldText/McFieldText.vue.d.ts.map +0 -1
  218. package/dist/src/components/elements/McFieldText/McFieldText.vue.js +0 -1401
  219. package/dist/src/components/elements/McFieldToggle/McFieldToggle.vue.d.ts.map +0 -1
  220. package/dist/src/components/elements/McFieldToggle/McFieldToggle.vue.js +0 -408
  221. package/dist/src/components/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.d.ts.map +0 -1
  222. package/dist/src/components/elements/McInfinityLoadingTrigger/McInfinityLoadingTrigger.vue.js +0 -192
  223. package/dist/src/components/elements/McNodata/McNoData.vue.d.ts.map +0 -1
  224. package/dist/src/components/elements/McNodata/McNoData.vue.js +0 -316
  225. package/dist/src/components/elements/McNotification/McNotification.vue.d.ts.map +0 -1
  226. package/dist/src/components/elements/McNotification/McNotification.vue.js +0 -364
  227. package/dist/src/components/elements/McProgress/McProgress.vue.d.ts.map +0 -1
  228. package/dist/src/components/elements/McProgress/McProgress.vue.js +0 -361
  229. package/dist/src/components/elements/McSeparator/McSeparator.vue.d.ts.map +0 -1
  230. package/dist/src/components/elements/McSeparator/McSeparator.vue.js +0 -325
  231. package/dist/src/components/elements/McSlideUpDown/McSlideUpDown.vue.d.ts.map +0 -1
  232. package/dist/src/components/elements/McSlideUpDown/McSlideUpDown.vue.js +0 -271
  233. package/dist/src/components/elements/McStack/McStack.vue.d.ts.map +0 -1
  234. package/dist/src/components/elements/McStack/McStack.vue.js +0 -180
  235. package/dist/src/components/elements/McSvgIcon/McSvgIcon.vue.d.ts.map +0 -1
  236. package/dist/src/components/elements/McSvgIcon/McSvgIcon.vue.js +0 -286
  237. package/dist/src/components/elements/McTitle/McTitle.vue.d.ts.map +0 -1
  238. package/dist/src/components/elements/McTitle/McTitle.vue.js +0 -466
  239. package/dist/src/components/elements/McTooltip/McTooltip.vue.d.ts.map +0 -1
  240. package/dist/src/components/elements/McTooltip/McTooltip.vue.js +0 -246
  241. package/dist/src/components/index.d.ts +0 -70
  242. package/dist/src/components/index.d.ts.map +0 -1
  243. package/dist/src/components/patterns/McAccordion/McAccordion.vue.d.ts.map +0 -1
  244. package/dist/src/components/patterns/McAccordion/McAccordion.vue.js +0 -120
  245. package/dist/src/components/patterns/McCell/McCell.vue.d.ts.map +0 -1
  246. package/dist/src/components/patterns/McCell/McCell.vue.js +0 -197
  247. package/dist/src/components/patterns/McCollapse/McCollapse.vue.d.ts.map +0 -1
  248. package/dist/src/components/patterns/McCollapse/McCollapse.vue.js +0 -314
  249. package/dist/src/components/patterns/McDropdown/McDropdown.vue.d.ts.map +0 -1
  250. package/dist/src/components/patterns/McDropdown/McDropdown.vue.js +0 -366
  251. package/dist/src/components/patterns/McDropdown/McDropdownPanel.vue.d.ts +0 -23
  252. package/dist/src/components/patterns/McDropdown/McDropdownPanel.vue.d.ts.map +0 -1
  253. package/dist/src/components/patterns/McDropdown/McDropdownPanel.vue.js +0 -83
  254. package/dist/src/components/patterns/McFilter/McFilter.vue.d.ts.map +0 -1
  255. package/dist/src/components/patterns/McFilter/McFilter.vue.js +0 -1056
  256. package/dist/src/components/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts.map +0 -1
  257. package/dist/src/components/patterns/McFilter/McFilterChip/McFilterChip.vue.js +0 -210
  258. package/dist/src/components/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts.map +0 -1
  259. package/dist/src/components/patterns/McFilter/McFilterTags/McFilterTags.vue.js +0 -546
  260. package/dist/src/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.d.ts.map +0 -1
  261. package/dist/src/components/patterns/McFilter/McFilterTypeDate/McFilterTypeDate.vue.js +0 -188
  262. package/dist/src/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.d.ts.map +0 -1
  263. package/dist/src/components/patterns/McFilter/McFilterTypeRange/McFilterTypeRange.vue.js +0 -238
  264. package/dist/src/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.d.ts.map +0 -1
  265. package/dist/src/components/patterns/McFilter/McFilterTypeRelation/McFilterTypeRelation.vue.js +0 -356
  266. package/dist/src/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.d.ts.map +0 -1
  267. package/dist/src/components/patterns/McFilter/McFilterTypeText/McFilterTypeText.vue.js +0 -171
  268. package/dist/src/components/patterns/McGridCol/McGridCol.vue.d.ts.map +0 -1
  269. package/dist/src/components/patterns/McGridCol/McGridCol.vue.js +0 -246
  270. package/dist/src/components/patterns/McGridRow/McGridRow.vue.d.ts.map +0 -1
  271. package/dist/src/components/patterns/McGridRow/McGridRow.vue.js +0 -292
  272. package/dist/src/components/patterns/McOverlay/McOverlay.vue.d.ts.map +0 -1
  273. package/dist/src/components/patterns/McOverlay/McOverlay.vue.js +0 -107
  274. package/dist/src/components/patterns/McPreview/McPreview.vue.d.ts.map +0 -1
  275. package/dist/src/components/patterns/McPreview/McPreview.vue.js +0 -118
  276. package/dist/src/components/patterns/McSideBar/McSideBar.vue.d.ts.map +0 -1
  277. package/dist/src/components/patterns/McSideBar/McSideBar.vue.js +0 -738
  278. package/dist/src/components/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.d.ts.map +0 -1
  279. package/dist/src/components/patterns/McSideBar/McSideBarBottom/McSideBarBottom.vue.js +0 -204
  280. package/dist/src/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts.map +0 -1
  281. package/dist/src/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.js +0 -508
  282. package/dist/src/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.d.ts.map +0 -1
  283. package/dist/src/components/patterns/McSideBar/McSideBarCenter/McSideBarCenter.vue.js +0 -409
  284. package/dist/src/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.d.ts.map +0 -1
  285. package/dist/src/components/patterns/McSideBar/McSideBarTop/McSideBarTop.vue.js +0 -415
  286. package/dist/src/components/patterns/McTab/McTab.vue.d.ts.map +0 -1
  287. package/dist/src/components/patterns/McTab/McTab.vue.js +0 -518
  288. package/dist/src/components/patterns/McTabs/McTabs.vue.d.ts.map +0 -1
  289. package/dist/src/components/patterns/McTabs/McTabs.vue.js +0 -427
  290. package/dist/src/components/patterns/McWrapScroll/McWrapScroll.vue.d.ts.map +0 -1
  291. package/dist/src/components/patterns/McWrapScroll/McWrapScroll.vue.js +0 -422
  292. package/dist/src/components/templates/McDrawer/McDrawer.vue.d.ts.map +0 -1
  293. package/dist/src/components/templates/McDrawer/McDrawer.vue.js +0 -304
  294. package/dist/src/components/templates/McDrawer/McDrawerContainer.vue.d.ts.map +0 -1
  295. package/dist/src/components/templates/McDrawer/McDrawerContainer.vue.js +0 -133
  296. package/dist/src/components/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.d.ts.map +0 -1
  297. package/dist/src/components/templates/McDrawer/McDrawerContentTemplate/McDrawerContentTemplate.vue.js +0 -134
  298. package/dist/src/components/templates/McModal/McModal.vue.d.ts.map +0 -1
  299. package/dist/src/components/templates/McModal/McModal.vue.js +0 -664
  300. package/dist/src/components/templates/McModal/McModalContainer.vue.d.ts.map +0 -1
  301. package/dist/src/components/templates/McModal/McModalContainer.vue.js +0 -119
  302. package/dist/src/components/templates/McTable/McTable/McTable.vue.d.ts.map +0 -1
  303. package/dist/src/components/templates/McTable/McTable/McTable.vue.js +0 -854
  304. package/dist/src/components/templates/McTable/McTableCard/McTableCard.vue.d.ts.map +0 -1
  305. package/dist/src/components/templates/McTable/McTableCard/McTableCard.vue.js +0 -339
  306. package/dist/src/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.d.ts.map +0 -1
  307. package/dist/src/components/templates/McTable/McTableCard/McTableCardHeader/McTableCardHeader.vue.js +0 -118
  308. package/dist/src/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts +0 -19
  309. package/dist/src/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.d.ts.map +0 -1
  310. package/dist/src/components/templates/McTable/McTableSkeletonLoading/McTableSkeletonLoading.vue.js +0 -118
  311. package/dist/src/components/templates/McTable/McTableSort/McTableSort.vue.d.ts.map +0 -1
  312. package/dist/src/components/templates/McTable/McTableSort/McTableSort.vue.js +0 -136
  313. package/dist/src/components/templates/McTopBar/McTopBar.vue.d.ts.map +0 -1
  314. package/dist/src/components/templates/McTopBar/McTopBar.vue.js +0 -305
  315. package/dist/src/components/templates/McVirtualScroll/McVirtualScroll.vue.d.ts.map +0 -1
  316. package/dist/src/components/templates/McVirtualScroll/McVirtualScroll.vue.js +0 -239
  317. package/dist/src/composables/index.d.ts +0 -8
  318. package/dist/src/composables/index.d.ts.map +0 -1
  319. package/dist/src/composables/useDrawer.d.ts.map +0 -1
  320. package/dist/src/composables/useDrawer.js +0 -72
  321. package/dist/src/composables/useEncodeDecode.d.ts.map +0 -1
  322. package/dist/src/composables/useEncodeDecode.js +0 -25
  323. package/dist/src/composables/useFieldErrors.d.ts +0 -6
  324. package/dist/src/composables/useFieldErrors.d.ts.map +0 -1
  325. package/dist/src/composables/useFieldErrors.js +0 -20
  326. package/dist/src/composables/useHelper.d.ts.map +0 -1
  327. package/dist/src/composables/useHelper.js +0 -79
  328. package/dist/src/composables/useModal.d.ts.map +0 -1
  329. package/dist/src/composables/useModal.js +0 -71
  330. package/dist/src/composables/useRandomNumber.d.ts.map +0 -1
  331. package/dist/src/composables/useRandomNumber.js +0 -10
  332. package/dist/src/composables/useTooltip.d.ts.map +0 -1
  333. package/dist/src/composables/useTooltip.js +0 -154
  334. package/dist/src/consts/index.d.ts +0 -2
  335. package/dist/src/consts/index.d.ts.map +0 -1
  336. package/dist/src/consts/table.d.ts.map +0 -1
  337. package/dist/src/consts/table.js +0 -6
  338. package/dist/src/enums/Cell.d.ts.map +0 -1
  339. package/dist/src/enums/Cell.js +0 -6
  340. package/dist/src/enums/Chip.d.ts.map +0 -1
  341. package/dist/src/enums/Chip.js +0 -11
  342. package/dist/src/enums/Datepicker.d.ts.map +0 -1
  343. package/dist/src/enums/Datepicker.js +0 -42
  344. package/dist/src/enums/Drawer.d.ts.map +0 -1
  345. package/dist/src/enums/Drawer.js +0 -5
  346. package/dist/src/enums/Dropdown.d.ts.map +0 -1
  347. package/dist/src/enums/Dropdown.js +0 -12
  348. package/dist/src/enums/Filter.d.ts.map +0 -1
  349. package/dist/src/enums/Filter.js +0 -14
  350. package/dist/src/enums/Grid.d.ts.map +0 -1
  351. package/dist/src/enums/Grid.js +0 -24
  352. package/dist/src/enums/Input.d.ts.map +0 -1
  353. package/dist/src/enums/Input.js +0 -20
  354. package/dist/src/enums/Modal.d.ts.map +0 -1
  355. package/dist/src/enums/Modal.js +0 -5
  356. package/dist/src/enums/Preview.d.ts.map +0 -1
  357. package/dist/src/enums/Preview.js +0 -6
  358. package/dist/src/enums/Radio.d.ts.map +0 -1
  359. package/dist/src/enums/Radio.js +0 -5
  360. package/dist/src/enums/RadioGroup.d.ts.map +0 -1
  361. package/dist/src/enums/RadioGroup.js +0 -5
  362. package/dist/src/enums/Select.d.ts.map +0 -1
  363. package/dist/src/enums/Select.js +0 -11
  364. package/dist/src/enums/Sidebar.d.ts.map +0 -1
  365. package/dist/src/enums/Sidebar.js +0 -5
  366. package/dist/src/enums/Tab.d.ts.map +0 -1
  367. package/dist/src/enums/Tab.js +0 -6
  368. package/dist/src/enums/Title.d.ts.map +0 -1
  369. package/dist/src/enums/Title.js +0 -21
  370. package/dist/src/enums/Tooltip.d.ts.map +0 -1
  371. package/dist/src/enums/Tooltip.js +0 -15
  372. package/dist/src/enums/index.d.ts +0 -22
  373. package/dist/src/enums/index.d.ts.map +0 -1
  374. package/dist/src/enums/ui/Alignment.d.ts.map +0 -1
  375. package/dist/src/enums/ui/Alignment.js +0 -6
  376. package/dist/src/enums/ui/Button.d.ts.map +0 -1
  377. package/dist/src/enums/ui/Button.js +0 -24
  378. package/dist/src/enums/ui/Directions.d.ts.map +0 -1
  379. package/dist/src/enums/ui/Directions.js +0 -5
  380. package/dist/src/enums/ui/Weights.d.ts.map +0 -1
  381. package/dist/src/enums/ui/Weights.js +0 -7
  382. package/dist/src/index.d.ts.map +0 -1
  383. package/dist/src/index.js +0 -17
  384. package/dist/src/main.d.ts +0 -3
  385. package/dist/src/main.d.ts.map +0 -1
  386. package/dist/src/main.js +0 -8
  387. package/dist/src/mocks/authUser.d.ts.map +0 -1
  388. package/dist/src/mocks/authUser.js +0 -162
  389. package/dist/src/mocks/categories.d.ts.map +0 -1
  390. package/dist/src/mocks/categories.js +0 -108
  391. package/dist/src/mocks/filterMocks.d.ts.map +0 -1
  392. package/dist/src/mocks/filterMocks.js +0 -128
  393. package/dist/src/mocks/icons.json +0 -1
  394. package/dist/src/mocks/menuLangs.d.ts.map +0 -1
  395. package/dist/src/mocks/menuLangs.js +0 -19
  396. package/dist/src/mocks/selectOptions.json +0 -111
  397. package/dist/src/mocks/sidebar.d.ts.map +0 -1
  398. package/dist/src/mocks/sidebar.js +0 -125
  399. package/dist/src/mocks/tableData.d.ts.map +0 -1
  400. package/dist/src/mocks/tableData.js +0 -8180
  401. package/dist/src/types/IButton.d.ts.map +0 -1
  402. package/dist/src/types/IButton.js +0 -1
  403. package/dist/src/types/ICell.d.ts.map +0 -1
  404. package/dist/src/types/ICell.js +0 -1
  405. package/dist/src/types/IChip.d.ts.map +0 -1
  406. package/dist/src/types/IChip.js +0 -1
  407. package/dist/src/types/ICollapse.d.ts.map +0 -1
  408. package/dist/src/types/ICollapse.js +0 -1
  409. package/dist/src/types/IDatepicker.d.ts.map +0 -1
  410. package/dist/src/types/IDatepicker.js +0 -1
  411. package/dist/src/types/IDirections.d.ts.map +0 -1
  412. package/dist/src/types/IDirections.js +0 -1
  413. package/dist/src/types/IDrawer.d.ts.map +0 -1
  414. package/dist/src/types/IDrawer.js +0 -1
  415. package/dist/src/types/IDropdown.d.ts.map +0 -1
  416. package/dist/src/types/IDropdown.js +0 -1
  417. package/dist/src/types/IFilter.d.ts.map +0 -1
  418. package/dist/src/types/IFilter.js +0 -1
  419. package/dist/src/types/IGrid.d.ts.map +0 -1
  420. package/dist/src/types/IGrid.js +0 -1
  421. package/dist/src/types/IInput.d.ts.map +0 -1
  422. package/dist/src/types/IInput.js +0 -1
  423. package/dist/src/types/IModal.d.ts.map +0 -1
  424. package/dist/src/types/IModal.js +0 -1
  425. package/dist/src/types/IPreview.d.ts.map +0 -1
  426. package/dist/src/types/IPreview.js +0 -1
  427. package/dist/src/types/IRadio.d.ts.map +0 -1
  428. package/dist/src/types/IRadio.js +0 -1
  429. package/dist/src/types/IRadioGroup.d.ts.map +0 -1
  430. package/dist/src/types/IRadioGroup.js +0 -1
  431. package/dist/src/types/IRoute.d.ts.map +0 -1
  432. package/dist/src/types/IRoute.js +0 -1
  433. package/dist/src/types/ISelect.d.ts.map +0 -1
  434. package/dist/src/types/ISelect.js +0 -1
  435. package/dist/src/types/ISideBar.d.ts.map +0 -1
  436. package/dist/src/types/ISideBar.js +0 -1
  437. package/dist/src/types/ITable.d.ts.map +0 -1
  438. package/dist/src/types/ITable.js +0 -1
  439. package/dist/src/types/ITabs.d.ts.map +0 -1
  440. package/dist/src/types/ITabs.js +0 -1
  441. package/dist/src/types/ITitle.d.ts.map +0 -1
  442. package/dist/src/types/ITitle.js +0 -1
  443. package/dist/src/types/ITooltip.d.ts.map +0 -1
  444. package/dist/src/types/ITooltip.js +0 -1
  445. package/dist/src/types/index.d.ts +0 -37
  446. package/dist/src/types/index.d.ts.map +0 -1
  447. package/dist/src/types/styles/Alignment.d.ts.map +0 -1
  448. package/dist/src/types/styles/Alignment.js +0 -1
  449. package/dist/src/types/styles/AvatarSizes.d.ts.map +0 -1
  450. package/dist/src/types/styles/AvatarSizes.js +0 -3
  451. package/dist/src/types/styles/Colors.d.ts.map +0 -1
  452. package/dist/src/types/styles/Colors.js +0 -3
  453. package/dist/src/types/styles/Durations.d.ts.map +0 -1
  454. package/dist/src/types/styles/Durations.js +0 -3
  455. package/dist/src/types/styles/FontSizes.d.ts.map +0 -1
  456. package/dist/src/types/styles/FontSizes.js +0 -3
  457. package/dist/src/types/styles/FontWeights.d.ts.map +0 -1
  458. package/dist/src/types/styles/FontWeights.js +0 -3
  459. package/dist/src/types/styles/Grid.d.ts.map +0 -1
  460. package/dist/src/types/styles/Grid.js +0 -1
  461. package/dist/src/types/styles/Icons.d.ts.map +0 -1
  462. package/dist/src/types/styles/Icons.js +0 -2
  463. package/dist/src/types/styles/LineHeights.d.ts.map +0 -1
  464. package/dist/src/types/styles/LineHeights.js +0 -3
  465. package/dist/src/types/styles/MediaQueries.d.ts.map +0 -1
  466. package/dist/src/types/styles/MediaQueries.js +0 -3
  467. package/dist/src/types/styles/Radiuses.d.ts.map +0 -1
  468. package/dist/src/types/styles/Radiuses.js +0 -3
  469. package/dist/src/types/styles/Sizes.d.ts.map +0 -1
  470. package/dist/src/types/styles/Sizes.js +0 -3
  471. package/dist/src/types/styles/Spaces.d.ts.map +0 -1
  472. package/dist/src/types/styles/Spaces.js +0 -3
  473. package/dist/src/types/styles/Weights.d.ts +0 -3
  474. package/dist/src/types/styles/Weights.d.ts.map +0 -1
  475. package/dist/src/types/styles/Weights.js +0 -1
  476. package/dist/src/utils/dayjs.d.ts.map +0 -1
  477. package/dist/src/utils/dayjs.js +0 -22
  478. package/dist/src/utils/index.d.ts +0 -3
  479. package/dist/src/utils/index.d.ts.map +0 -1
  480. package/dist/src/utils/mcGridColAdaptiveProps.d.ts.map +0 -1
  481. package/dist/src/utils/mcGridColAdaptiveProps.js +0 -10
  482. package/dist/src/utils/mcTitleAdaptiveProps.d.ts.map +0 -1
  483. package/dist/src/utils/mcTitleAdaptiveProps.js +0 -10
  484. package/dist/tsconfig.tsbuildinfo +0 -1
  485. /package/dist/{src/components/index.js → types/components/index.d.ts} +0 -0
  486. /package/dist/{src/consts/index.js → types/consts/index.d.ts} +0 -0
  487. /package/dist/{src/utils/index.js → types/utils/index.d.ts} +0 -0
@@ -1,1401 +0,0 @@
1
- import { IMaskComponent, IMask } from 'vue-imask';
2
- import { McTitle, McButton, McSvgIcon, McTooltip } from '@/components';
3
- import { Spaces } from '@/types/styles/Spaces';
4
- import { computed, onMounted, ref, useAttrs, useSlots } from 'vue';
5
- import { Directions } from '@/enums/ui/Directions';
6
- import { useFieldErrors } from '@/composables';
7
- import { InputTypes, Autocomplete } from '@/enums/Input';
8
- import { useTextareaAutosize } from '@vueuse/core';
9
- import { ButtonSize, ButtonType, HorizontalAlignment, TitleVariations, Weights } from '@/enums';
10
- const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
11
- const { textarea } = useTextareaAutosize();
12
- const emit = defineEmits();
13
- const slots = useSlots();
14
- const attrs = useAttrs();
15
- const props = defineProps({
16
- /**
17
- * Значение
18
- *
19
- */
20
- modelValue: {
21
- type: [String, Number],
22
- default: null
23
- },
24
- /**
25
- * Тип:
26
- * `textarea, textarea-autosize и
27
- * нативные как text, password, email и т.д.`
28
- *
29
- * кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
30
- * кастомный int - разрешает ввод только целочисленных значений
31
- * кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
32
- * date - добавляет placeholder, маску и ограничения ввода
33
- * uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
34
- * phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
35
- */
36
- type: {
37
- type: String,
38
- default: InputTypes.Text
39
- },
40
- /**
41
- * Заголовок поля:
42
- *
43
- */
44
- title: {
45
- type: String,
46
- default: null
47
- },
48
- /**
49
- * Маска поля:
50
- *
51
- * tokens - https://imask.js.org/guide.html
52
- *
53
- */
54
- mask: {
55
- type: String,
56
- default: null
57
- },
58
- /**
59
- * Вспомогательный текст под инпутом:
60
- *
61
- */
62
- helpText: {
63
- type: String,
64
- default: null
65
- },
66
- /**
67
- * Отключенное состояние
68
- *
69
- */
70
- disabled: {
71
- type: Boolean,
72
- default: false
73
- },
74
- /**
75
- * Ошибки
76
- *
77
- */
78
- errors: {
79
- type: Array,
80
- default: null
81
- },
82
- /**
83
- * Placeholder
84
- *
85
- */
86
- placeholder: {
87
- type: String,
88
- default: null
89
- },
90
- /**
91
- * Name
92
- *
93
- */
94
- name: {
95
- type: String,
96
- required: true
97
- },
98
- /**
99
- * плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
100
- * {
101
- * date: 'd',
102
- * month: 'm',
103
- * year: 'y',
104
- * }
105
- *
106
- */
107
- dateMaskPlaceholder: {
108
- type: Object,
109
- default: () => ({})
110
- },
111
- /**
112
- * Максимальная длина строки в инпуте
113
- *
114
- */
115
- maxLength: {
116
- type: Number,
117
- default: null
118
- },
119
- /**
120
- * Состояние копирования
121
- *
122
- */
123
- copy: {
124
- type: Boolean,
125
- default: false
126
- },
127
- /**
128
- * Автокомплит введённого ранее текста: on, off
129
- *
130
- */
131
- autocomplete: {
132
- type: String,
133
- default: Autocomplete.On
134
- },
135
- /**
136
- * только чтение текста
137
- *
138
- */
139
- readOnly: {
140
- type: Boolean,
141
- default: false
142
- },
143
- /**
144
- * Атрибут tabindex для главного элемента
145
- *
146
- */
147
- tabindex: {
148
- type: [String, Number]
149
- },
150
- /**
151
- * Tooltip для кнопка "показать пароль"
152
- *
153
- */
154
- passwordTooltip: {
155
- type: String,
156
- default: 'Show/Hide'
157
- },
158
- /**
159
- * Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
160
- *
161
- */
162
- passwordHideTooltip: {
163
- type: String,
164
- default: null
165
- },
166
- /**
167
- * Очищаем данные от маски на выходе
168
- */
169
- clearOutput: {
170
- type: Boolean,
171
- default: false
172
- },
173
- /**
174
- * Кастомные настройки для маски
175
- * См. https://imask.js.org/guide.html
176
- *
177
- * Например:
178
- * {
179
- * autofix: true,
180
- * blocks: {
181
- * d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
182
- * m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
183
- * Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
184
- * }
185
- * }
186
- */
187
- maskOptions: {
188
- type: Object,
189
- default: null
190
- },
191
- required: {
192
- type: Boolean,
193
- default: false
194
- },
195
- /**
196
- * Для какого языка поле ввода
197
- */
198
- locale: {
199
- type: String,
200
- default: null
201
- },
202
- /**
203
- * Мобильное ли разрешение
204
- * (Используется для триггера тултипа в кнопке с паролем)
205
- */
206
- isMobile: {
207
- type: Boolean,
208
- default: false
209
- },
210
- /**
211
- * Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
212
- */
213
- maxDecimals: {
214
- type: Number,
215
- default: 2
216
- },
217
- dir: {
218
- type: String,
219
- default: Directions.Ltr
220
- }
221
- });
222
- const prependWidth = ref(0);
223
- const appendWidth = ref(0);
224
- const prettyType = ref(props.type);
225
- const fieldErrors = useFieldErrors(props.errors);
226
- const isRtl = computed(() => {
227
- return props.dir === Directions.Rtl;
228
- });
229
- const classes = computed(() => {
230
- return {
231
- 'mc-field-text': true,
232
- 'mc-field-text--error': !!fieldErrors.errorText.value,
233
- 'mc-field-text--textarea': isTextarea.value,
234
- 'mc-field-text--textarea-autosize': isTextareaAutosize.value,
235
- 'mc-field-text--disabled': props.disabled,
236
- 'mc-field-text--copy': props.copy,
237
- 'mc-field-text--rtl': isRtl.value
238
- };
239
- });
240
- const computedTitle = computed(() => {
241
- return `${props.title}${props.required ? ' *' : ''}`;
242
- });
243
- const isDate = computed(() => {
244
- return prettyType.value === InputTypes.Date;
245
- });
246
- const isMaskVisible = computed(() => {
247
- return !!props.mask || !!props.maskOptions || isDate.value;
248
- });
249
- const isTextarea = computed(() => {
250
- return props.type === InputTypes.Textarea;
251
- });
252
- const isTextareaAutosize = computed(() => {
253
- return props.type === InputTypes.TextareaAutosize;
254
- });
255
- const isPassword = computed(() => {
256
- return props.type === InputTypes.Password;
257
- });
258
- const isAmountFormat = computed(() => {
259
- return props.type === InputTypes.AmountFormat;
260
- });
261
- const hasCharCounter = computed(() => {
262
- return !!props.maxLength && (isTextarea.value || isTextareaAutosize.value);
263
- });
264
- const isPasswordType = computed(() => {
265
- return prettyType.value === InputTypes.Password;
266
- });
267
- const passwordIcon = computed(() => {
268
- return isPasswordType.value ? 'visibility' : 'visibility_off';
269
- });
270
- const charCounter = computed(() => {
271
- return props.modelValue ? String(props.modelValue).length : 0;
272
- });
273
- const charCounterTitle = computed(() => {
274
- return `${charCounter.value}/${props.maxLength}`;
275
- });
276
- const charCounterColor = computed(() => {
277
- return props.maxLength < +charCounter.value ? 'red' : 'dark-gray';
278
- });
279
- const dateMask = computed(() => {
280
- return {
281
- mask: Date,
282
- autofix: true,
283
- blocks: {
284
- d: {
285
- mask: IMask.MaskedRange,
286
- placeholderChar: props.dateMaskPlaceholder.date || 'd',
287
- from: 1,
288
- to: 31,
289
- maxLength: 2
290
- },
291
- m: {
292
- mask: IMask.MaskedRange,
293
- placeholderChar: props.dateMaskPlaceholder.month || 'm',
294
- from: 1,
295
- to: 12,
296
- maxLength: 2
297
- },
298
- Y: {
299
- mask: IMask.MaskedRange,
300
- placeholderChar: props.dateMaskPlaceholder.year || 'y',
301
- from: 1900,
302
- to: 2999,
303
- maxLength: 4
304
- }
305
- }
306
- };
307
- });
308
- const maskInputAttrs = computed(() => {
309
- return {
310
- ...inputAttrs.value,
311
- mask: props.mask,
312
- lazy: false,
313
- overwrite: false,
314
- unmask: props.clearOutput,
315
- definitions: {
316
- '#': /./
317
- },
318
- readonly: props.readOnly,
319
- maxlength: props.maxLength,
320
- type: 'tel',
321
- ...attrs,
322
- ...(props.maskOptions ?? {}),
323
- ...(isDate.value ? dateMask.value : {})
324
- };
325
- });
326
- const computedValue = computed({
327
- get() {
328
- if (isAmountFormat.value && !isRtl.value) {
329
- return getAmountFormat(String(props.modelValue));
330
- }
331
- else
332
- return props.modelValue;
333
- },
334
- set(value) {
335
- fieldErrors.toggleErrorVisible();
336
- emit('update:modelValue', value);
337
- }
338
- });
339
- const handleInput = (e) => {
340
- computedValue.value = getPreparedInputValue(e);
341
- };
342
- const inputAttrs = computed(() => {
343
- return {
344
- style: inputStyles.value,
345
- placeholder: props.placeholder,
346
- disabled: props.disabled,
347
- name: props.name,
348
- id: props.name,
349
- autocomplete: props.autocomplete,
350
- tabindex: props.tabindex,
351
- ...attrs,
352
- class: ['mc-field-text__input', attrs.class || ''].join(' ')
353
- };
354
- });
355
- const inputStyles = computed(() => {
356
- const space = parseInt(Spaces['150']);
357
- let bottomStyle = {};
358
- if (isTextarea.value || isTextareaAutosize.value) {
359
- const spaceBottomToken = hasCharCounter.value ? '400' : '150';
360
- const spaceBottomValue = Spaces[spaceBottomToken];
361
- bottomStyle = { paddingBottom: `${+spaceBottomValue.replace('px', '') - 1}px` };
362
- }
363
- return {
364
- paddingInlineStart: prependWidth.value && `${prependWidth.value + space}px`,
365
- paddingInlineEnd: appendWidth.value && `${appendWidth.value + space}px`,
366
- ...(!isTextarea.value && !isTextareaAutosize.value ? { boxSizing: 'border-box' } : {}),
367
- ...bottomStyle
368
- };
369
- });
370
- onMounted(() => {
371
- calculatePadding();
372
- });
373
- const setDecimalsLimit = (val) => {
374
- if (val && props.maxDecimals) {
375
- const [integerPart, decimalPart] = val.split('.');
376
- if (decimalPart?.length > props.maxDecimals) {
377
- return `${integerPart}.${decimalPart.slice(0, props.maxDecimals)}`;
378
- }
379
- }
380
- return val;
381
- };
382
- /**
383
- * Remove leading zero from input if length > 1 && number isn't decimal
384
- * */
385
- const removeLeadingZero = (val) => {
386
- let result = val;
387
- const [first_char] = val || [];
388
- if (val.length > 1 && +first_char === 0 && val.indexOf('.') === -1)
389
- result = val.slice(1);
390
- return result;
391
- };
392
- const getPreparedInputValue = (e) => {
393
- const target = e.target;
394
- let value = isDate.value && target && target.value ? target.value?.substring(0, 10) : target.value;
395
- let cursor_position = getCaretPos(target)?.start;
396
- let prepared_value = formattedToNumber(value);
397
- switch (props.type) {
398
- case InputTypes.Num: {
399
- //eslint-disable-next-line
400
- let [num] = /-?\d*[\.]?\d*/.exec(String(value)) || [];
401
- num = setDecimalsLimit(num);
402
- num = removeLeadingZero(num);
403
- value = num;
404
- target.value = num;
405
- break;
406
- }
407
- case InputTypes.Int: {
408
- let [int] = /-?\d*/.exec(String(target.value)) || [];
409
- int = removeLeadingZero(int);
410
- value = int;
411
- target.value = int;
412
- break;
413
- }
414
- case InputTypes.AmountFormat: {
415
- value = setDecimalsLimit(value);
416
- value = removeLeadingZero(value);
417
- prepared_value = formattedToNumber(value);
418
- const float_value = parseFloat(prepared_value);
419
- const without_spaces_value = prepared_value.replace(/ /gm, '');
420
- value = prepared_value
421
- ? String(float_value) === without_spaces_value
422
- ? float_value
423
- : without_spaces_value || float_value || prepared_value
424
- : null;
425
- const formatted_value = getAmountFormat(prepared_value);
426
- target.value = isRtl.value ? formatted_value.replace(/ /gm, '') : formatted_value;
427
- const space_length = target.value?.slice(0, cursor_position).replace(/[^ ]/gm, '')?.length || 0;
428
- setCaretPos(target, cursor_position + space_length, cursor_position + space_length);
429
- break;
430
- }
431
- case InputTypes.Uppercase: {
432
- value = value?.toUpperCase();
433
- target.value = value;
434
- setCaretPos(target, cursor_position, cursor_position);
435
- break;
436
- }
437
- case InputTypes.Lowercase: {
438
- value = value?.toLowerCase();
439
- target.value = value;
440
- setCaretPos(target, cursor_position, cursor_position);
441
- break;
442
- }
443
- case InputTypes.Password:
444
- value = value?.replace(/ /gm, '');
445
- target.value = value;
446
- setCaretPos(target, cursor_position, cursor_position);
447
- break;
448
- case InputTypes.PhoneNumber:
449
- if (value.length === 0)
450
- value = '+';
451
- if (value.charAt(0) !== '+')
452
- value = '+' + value;
453
- value = value.replace(/(?!^)\D/g, '');
454
- target.value = value;
455
- break;
456
- }
457
- return value;
458
- };
459
- const prepareHandleKeyDown = (e) => {
460
- switch (props.type) {
461
- case InputTypes.AmountFormat:
462
- case InputTypes.Num: {
463
- if (e.key === '.' && typeof props.modelValue === 'string' && props.modelValue?.includes('.')) {
464
- e.preventDefault();
465
- }
466
- break;
467
- }
468
- }
469
- emit('keydown', e);
470
- };
471
- const formattedToNumber = (value) => {
472
- if (!value)
473
- return value;
474
- //eslint-disable-next-line
475
- const [first] = /-?\d*[\.]?\d*/.exec(String(value)?.replace(/ /gm, '')?.trim()) || [];
476
- return first;
477
- };
478
- const setCaretPos = (ctrl, start, end) => {
479
- if (ctrl.setSelectionRange) {
480
- ctrl.focus();
481
- ctrl.setSelectionRange(start, end);
482
- }
483
- };
484
- const getCaretPos = (ctrl) => {
485
- if (ctrl.selectionStart || ctrl.selectionStart === 0) {
486
- return { start: ctrl.selectionStart, end: ctrl.selectionEnd };
487
- }
488
- else {
489
- return { start: 0, end: 0 };
490
- }
491
- };
492
- const getAmountFormat = (value) => {
493
- const formatted_number = formattedToNumber(value);
494
- const has_fraction = !!String(formatted_number)?.match(/\./);
495
- const [int, fraction] = String(formatted_number)
496
- //eslint-disable-next-line
497
- .replace(/[^\d\.-]/g, '')
498
- .replace(/\B(?=(?:\d{3})+(?!\d))/g, ' ')
499
- .split('.');
500
- const formatted_values = [int, fraction?.replace(/ /gm, '') || ''];
501
- if (has_fraction) {
502
- return formatted_values.join('.');
503
- }
504
- return formatted_values.filter((v) => !!v).join('.');
505
- };
506
- const calculatePadding = () => {
507
- prependWidth.value = +calculateSlotPadding('prepend');
508
- appendWidth.value = +calculateSlotPadding('append');
509
- };
510
- const calculateSlotPadding = (name) => {
511
- const tokenSpace = parseInt(Spaces['50']);
512
- let result = slots[name]
513
- ? //@ts-ignore
514
- (slots[name] || []).reduce((acc) => {
515
- return acc + tokenSpace;
516
- }, 0) + tokenSpace
517
- : tokenSpace;
518
- if (name === 'prepend')
519
- return result;
520
- /**
521
- * Также увеличиваем padding при наличии кнопки копирования и если тип password
522
- */
523
- const iconSpace = parseInt(Spaces['300']);
524
- result = result ? result + tokenSpace : tokenSpace;
525
- props.copy && (result += iconSpace);
526
- isPassword.value && (result += iconSpace);
527
- return result;
528
- };
529
- const handlerCopy = () => {
530
- /**
531
- * Событие по кнопке копирования
532
- */
533
- emit('copy', props.modelValue);
534
- };
535
- const togglePasswordVisibility = () => {
536
- prettyType.value = isPasswordType.value ? InputTypes.Text : InputTypes.Password;
537
- }; /* PartiallyEnd: #3632/scriptSetup.vue */
538
- const __VLS_fnComponent = (await import('vue')).defineComponent({
539
- props: {
540
- /**
541
- * Значение
542
- *
543
- */
544
- modelValue: {
545
- type: [String, Number],
546
- default: null
547
- },
548
- /**
549
- * Тип:
550
- * `textarea, textarea-autosize и
551
- * нативные как text, password, email и т.д.`
552
- *
553
- * кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
554
- * кастомный int - разрешает ввод только целочисленных значений
555
- * кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
556
- * date - добавляет placeholder, маску и ограничения ввода
557
- * uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
558
- * phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
559
- */
560
- type: {
561
- type: String,
562
- default: InputTypes.Text
563
- },
564
- /**
565
- * Заголовок поля:
566
- *
567
- */
568
- title: {
569
- type: String,
570
- default: null
571
- },
572
- /**
573
- * Маска поля:
574
- *
575
- * tokens - https://imask.js.org/guide.html
576
- *
577
- */
578
- mask: {
579
- type: String,
580
- default: null
581
- },
582
- /**
583
- * Вспомогательный текст под инпутом:
584
- *
585
- */
586
- helpText: {
587
- type: String,
588
- default: null
589
- },
590
- /**
591
- * Отключенное состояние
592
- *
593
- */
594
- disabled: {
595
- type: Boolean,
596
- default: false
597
- },
598
- /**
599
- * Ошибки
600
- *
601
- */
602
- errors: {
603
- type: Array,
604
- default: null
605
- },
606
- /**
607
- * Placeholder
608
- *
609
- */
610
- placeholder: {
611
- type: String,
612
- default: null
613
- },
614
- /**
615
- * Name
616
- *
617
- */
618
- name: {
619
- type: String,
620
- required: true
621
- },
622
- /**
623
- * плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
624
- * {
625
- * date: 'd',
626
- * month: 'm',
627
- * year: 'y',
628
- * }
629
- *
630
- */
631
- dateMaskPlaceholder: {
632
- type: Object,
633
- default: () => ({})
634
- },
635
- /**
636
- * Максимальная длина строки в инпуте
637
- *
638
- */
639
- maxLength: {
640
- type: Number,
641
- default: null
642
- },
643
- /**
644
- * Состояние копирования
645
- *
646
- */
647
- copy: {
648
- type: Boolean,
649
- default: false
650
- },
651
- /**
652
- * Автокомплит введённого ранее текста: on, off
653
- *
654
- */
655
- autocomplete: {
656
- type: String,
657
- default: Autocomplete.On
658
- },
659
- /**
660
- * только чтение текста
661
- *
662
- */
663
- readOnly: {
664
- type: Boolean,
665
- default: false
666
- },
667
- /**
668
- * Атрибут tabindex для главного элемента
669
- *
670
- */
671
- tabindex: {
672
- type: [String, Number]
673
- },
674
- /**
675
- * Tooltip для кнопка "показать пароль"
676
- *
677
- */
678
- passwordTooltip: {
679
- type: String,
680
- default: 'Show/Hide'
681
- },
682
- /**
683
- * Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
684
- *
685
- */
686
- passwordHideTooltip: {
687
- type: String,
688
- default: null
689
- },
690
- /**
691
- * Очищаем данные от маски на выходе
692
- */
693
- clearOutput: {
694
- type: Boolean,
695
- default: false
696
- },
697
- /**
698
- * Кастомные настройки для маски
699
- * См. https://imask.js.org/guide.html
700
- *
701
- * Например:
702
- * {
703
- * autofix: true,
704
- * blocks: {
705
- * d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
706
- * m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
707
- * Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
708
- * }
709
- * }
710
- */
711
- maskOptions: {
712
- type: Object,
713
- default: null
714
- },
715
- required: {
716
- type: Boolean,
717
- default: false
718
- },
719
- /**
720
- * Для какого языка поле ввода
721
- */
722
- locale: {
723
- type: String,
724
- default: null
725
- },
726
- /**
727
- * Мобильное ли разрешение
728
- * (Используется для триггера тултипа в кнопке с паролем)
729
- */
730
- isMobile: {
731
- type: Boolean,
732
- default: false
733
- },
734
- /**
735
- * Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
736
- */
737
- maxDecimals: {
738
- type: Number,
739
- default: 2
740
- },
741
- dir: {
742
- type: String,
743
- default: Directions.Ltr
744
- }
745
- },
746
- __typeEmits: {},
747
- });
748
- ;
749
- let __VLS_functionalComponentProps;
750
- function __VLS_template() {
751
- const __VLS_ctx = {};
752
- const __VLS_localComponents = {
753
- ...{},
754
- ...{},
755
- ...__VLS_ctx,
756
- };
757
- let __VLS_components;
758
- const __VLS_localDirectives = {
759
- ...{},
760
- ...__VLS_ctx,
761
- };
762
- let __VLS_directives;
763
- let __VLS_styleScopedClasses;
764
- // CSS variable injection
765
- // CSS variable injection end
766
- let __VLS_resolvedLocalAndGlobalComponents;
767
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ref: ("field"), dir: ((props.dir)), ...{ class: ((__VLS_ctx.classes)) }, });
768
- // @ts-ignore navigation for `const field = ref()`
769
- __VLS_ctx.field;
770
- __VLS_elementAsFunction(__VLS_intrinsicElements.label, __VLS_intrinsicElements.label)({ for: ((__VLS_ctx.name)), ...{ class: ("mc-field-text__header") }, });
771
- var __VLS_0 = {};
772
- if (__VLS_ctx.title) {
773
- const __VLS_1 = __VLS_resolvedLocalAndGlobalComponents.McTitle;
774
- /** @type { [typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, ] } */
775
- // @ts-ignore
776
- const __VLS_2 = __VLS_asFunctionalComponent(__VLS_1, new __VLS_1({ maxWidth: ("100%"), weight: ((__VLS_ctx.Weights.Medium)), }));
777
- const __VLS_3 = __VLS_2({ maxWidth: ("100%"), weight: ((__VLS_ctx.Weights.Medium)), }, ...__VLS_functionalComponentArgsRest(__VLS_2));
778
- (__VLS_ctx.computedTitle);
779
- __VLS_nonNullable(__VLS_6.slots).default;
780
- var __VLS_6;
781
- }
782
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__inner") }, });
783
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__main") }, });
784
- if (__VLS_ctx.$slots.prepend) {
785
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__prepend") }, });
786
- var __VLS_7 = {};
787
- }
788
- __VLS_elementAsFunction(__VLS_intrinsicElements.label, __VLS_intrinsicElements.label)({ ...{ class: ("mc-field-text__input-wrapper") }, });
789
- if (__VLS_ctx.isTextarea) {
790
- __VLS_elementAsFunction(__VLS_intrinsicElements.textarea)({ ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.inputAttrs), maxlength: ((__VLS_ctx.maxLength)), rows: ("1"), });
791
- }
792
- else if (__VLS_ctx.isTextareaAutosize) {
793
- __VLS_elementAsFunction(__VLS_intrinsicElements.textarea)({ ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ref: ("textarea"), ...(__VLS_ctx.inputAttrs), });
794
- // @ts-ignore navigation for `const textarea = ref()`
795
- __VLS_ctx.textarea;
796
- }
797
- else {
798
- if (__VLS_ctx.isMaskVisible) {
799
- const __VLS_8 = __VLS_resolvedLocalAndGlobalComponents.IMaskComponent;
800
- /** @type { [typeof __VLS_components.IMaskComponent, typeof __VLS_components.iMaskComponent, ] } */
801
- // @ts-ignore
802
- const __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({ ...{ 'onInput': {} }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.maskInputAttrs), }));
803
- const __VLS_10 = __VLS_9({ ...{ 'onInput': {} }, value: ((__VLS_ctx.computedValue)), ...(__VLS_ctx.maskInputAttrs), }, ...__VLS_functionalComponentArgsRest(__VLS_9));
804
- let __VLS_14;
805
- const __VLS_15 = {
806
- onInput: (__VLS_ctx.handleInput)
807
- };
808
- let __VLS_11;
809
- let __VLS_12;
810
- var __VLS_13;
811
- }
812
- else {
813
- __VLS_elementAsFunction(__VLS_intrinsicElements.input)({ ...{ onKeydown: (__VLS_ctx.prepareHandleKeyDown) }, ...{ onInput: (__VLS_ctx.handleInput) }, value: ((__VLS_ctx.computedValue)), ref: ("input"), ...(__VLS_ctx.inputAttrs), type: ((__VLS_ctx.prettyType)), readonly: ((props.readOnly)), maxlength: ((__VLS_ctx.maxLength)), });
814
- // @ts-ignore navigation for `const input = ref()`
815
- __VLS_ctx.input;
816
- }
817
- }
818
- if (__VLS_ctx.$slots.append || __VLS_ctx.copy || __VLS_ctx.isPassword) {
819
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__append") }, ...{ class: (({ 'mc-field-text__append--indent-bottom': __VLS_ctx.hasCharCounter })) }, });
820
- var __VLS_16 = {};
821
- if (__VLS_ctx.copy) {
822
- const __VLS_17 = __VLS_resolvedLocalAndGlobalComponents.McButton;
823
- /** @type { [typeof __VLS_components.McButton, typeof __VLS_components.mcButton, typeof __VLS_components.McButton, typeof __VLS_components.mcButton, ] } */
824
- // @ts-ignore
825
- const __VLS_18 = __VLS_asFunctionalComponent(__VLS_17, new __VLS_17({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), }));
826
- const __VLS_19 = __VLS_18({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), }, ...__VLS_functionalComponentArgsRest(__VLS_18));
827
- let __VLS_23;
828
- const __VLS_24 = {
829
- onClick: (__VLS_ctx.handlerCopy)
830
- };
831
- let __VLS_20;
832
- let __VLS_21;
833
- __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
834
- {
835
- const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_22.slots);
836
- const __VLS_25 = __VLS_resolvedLocalAndGlobalComponents.McSvgIcon;
837
- /** @type { [typeof __VLS_components.McSvgIcon, typeof __VLS_components.mcSvgIcon, ] } */
838
- // @ts-ignore
839
- const __VLS_26 = __VLS_asFunctionalComponent(__VLS_25, new __VLS_25({ name: ("copy"), }));
840
- const __VLS_27 = __VLS_26({ name: ("copy"), }, ...__VLS_functionalComponentArgsRest(__VLS_26));
841
- }
842
- var __VLS_22;
843
- }
844
- if (__VLS_ctx.isPassword) {
845
- const __VLS_31 = __VLS_resolvedLocalAndGlobalComponents.McTooltip;
846
- /** @type { [typeof __VLS_components.McTooltip, typeof __VLS_components.mcTooltip, typeof __VLS_components.McTooltip, typeof __VLS_components.mcTooltip, ] } */
847
- // @ts-ignore
848
- const __VLS_32 = __VLS_asFunctionalComponent(__VLS_31, new __VLS_31({ content: ((__VLS_ctx.isPasswordType ? props.passwordTooltip : props.passwordHideTooltip || props.passwordTooltip)), }));
849
- const __VLS_33 = __VLS_32({ content: ((__VLS_ctx.isPasswordType ? props.passwordTooltip : props.passwordHideTooltip || props.passwordTooltip)), }, ...__VLS_functionalComponentArgsRest(__VLS_32));
850
- const __VLS_37 = __VLS_resolvedLocalAndGlobalComponents.McButton;
851
- /** @type { [typeof __VLS_components.McButton, typeof __VLS_components.mcButton, typeof __VLS_components.McButton, typeof __VLS_components.mcButton, ] } */
852
- // @ts-ignore
853
- const __VLS_38 = __VLS_asFunctionalComponent(__VLS_37, new __VLS_37({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), tabindex: ("-1"), type: ((__VLS_ctx.ButtonType.Button)), }));
854
- const __VLS_39 = __VLS_38({ ...{ 'onClick': {} }, variation: ("black-link"), size: ((__VLS_ctx.ButtonSize.MCompact)), tabindex: ("-1"), type: ((__VLS_ctx.ButtonType.Button)), }, ...__VLS_functionalComponentArgsRest(__VLS_38));
855
- let __VLS_43;
856
- const __VLS_44 = {
857
- onClick: (__VLS_ctx.togglePasswordVisibility)
858
- };
859
- let __VLS_40;
860
- let __VLS_41;
861
- __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
862
- {
863
- const { "icon-append": __VLS_thisSlot } = __VLS_nonNullable(__VLS_42.slots);
864
- const __VLS_45 = __VLS_resolvedLocalAndGlobalComponents.McSvgIcon;
865
- /** @type { [typeof __VLS_components.McSvgIcon, typeof __VLS_components.mcSvgIcon, ] } */
866
- // @ts-ignore
867
- const __VLS_46 = __VLS_asFunctionalComponent(__VLS_45, new __VLS_45({ name: ((__VLS_ctx.passwordIcon)), }));
868
- const __VLS_47 = __VLS_46({ name: ((__VLS_ctx.passwordIcon)), }, ...__VLS_functionalComponentArgsRest(__VLS_46));
869
- }
870
- var __VLS_42;
871
- __VLS_nonNullable(__VLS_36.slots).default;
872
- var __VLS_36;
873
- }
874
- }
875
- if (__VLS_ctx.hasCharCounter) {
876
- const __VLS_51 = __VLS_resolvedLocalAndGlobalComponents.McTitle;
877
- /** @type { [typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, ] } */
878
- // @ts-ignore
879
- const __VLS_52 = __VLS_asFunctionalComponent(__VLS_51, new __VLS_51({ ...{ class: ("mc-field-text__char-counter") }, variation: ((__VLS_ctx.TitleVariations.Overline)), textAlign: ((__VLS_ctx.HorizontalAlignment.Right)), color: ((__VLS_ctx.charCounterColor)), }));
880
- const __VLS_53 = __VLS_52({ ...{ class: ("mc-field-text__char-counter") }, variation: ((__VLS_ctx.TitleVariations.Overline)), textAlign: ((__VLS_ctx.HorizontalAlignment.Right)), color: ((__VLS_ctx.charCounterColor)), }, ...__VLS_functionalComponentArgsRest(__VLS_52));
881
- (__VLS_ctx.charCounterTitle);
882
- __VLS_nonNullable(__VLS_56.slots).default;
883
- var __VLS_56;
884
- }
885
- if (__VLS_ctx.$slots.right) {
886
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__right") }, });
887
- var __VLS_57 = {};
888
- }
889
- if (__VLS_ctx.fieldErrors.errorText.value || props.helpText || __VLS_ctx.$slots.footer) {
890
- __VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("mc-field-text__footer") }, });
891
- if (__VLS_ctx.fieldErrors.errorText.value) {
892
- const __VLS_58 = __VLS_resolvedLocalAndGlobalComponents.McTitle;
893
- /** @type { [typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, ] } */
894
- // @ts-ignore
895
- const __VLS_59 = __VLS_asFunctionalComponent(__VLS_58, new __VLS_58({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), ...{ class: ("mc-field-text__error-text") }, htmlData: ((__VLS_ctx.fieldErrors.errorText.value)), }));
896
- const __VLS_60 = __VLS_59({ tagName: ("div"), color: ("red"), variation: ((__VLS_ctx.TitleVariations.Overline)), ...{ class: ("mc-field-text__error-text") }, htmlData: ((__VLS_ctx.fieldErrors.errorText.value)), }, ...__VLS_functionalComponentArgsRest(__VLS_59));
897
- }
898
- if (__VLS_ctx.fieldErrors.errorText.value) {
899
- __VLS_elementAsFunction(__VLS_intrinsicElements.br)({});
900
- }
901
- var __VLS_64 = {};
902
- if (props.helpText) {
903
- const __VLS_65 = __VLS_resolvedLocalAndGlobalComponents.McTitle;
904
- /** @type { [typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, typeof __VLS_components.McTitle, typeof __VLS_components.mcTitle, ] } */
905
- // @ts-ignore
906
- const __VLS_66 = __VLS_asFunctionalComponent(__VLS_65, new __VLS_65({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), color: ("gray"), maxWidth: ("100%"), }));
907
- const __VLS_67 = __VLS_66({ tagName: ("div"), variation: ((__VLS_ctx.TitleVariations.Overline)), color: ("gray"), maxWidth: ("100%"), }, ...__VLS_functionalComponentArgsRest(__VLS_66));
908
- (props.helpText);
909
- __VLS_nonNullable(__VLS_70.slots).default;
910
- var __VLS_70;
911
- }
912
- }
913
- __VLS_styleScopedClasses['mc-field-text__header'];
914
- __VLS_styleScopedClasses['mc-field-text__inner'];
915
- __VLS_styleScopedClasses['mc-field-text__main'];
916
- __VLS_styleScopedClasses['mc-field-text__prepend'];
917
- __VLS_styleScopedClasses['mc-field-text__input-wrapper'];
918
- __VLS_styleScopedClasses['mc-field-text__append'];
919
- __VLS_styleScopedClasses['mc-field-text__append--indent-bottom'];
920
- __VLS_styleScopedClasses['mc-field-text__char-counter'];
921
- __VLS_styleScopedClasses['mc-field-text__right'];
922
- __VLS_styleScopedClasses['mc-field-text__footer'];
923
- __VLS_styleScopedClasses['mc-field-text__error-text'];
924
- var __VLS_slots;
925
- var __VLS_inheritedAttrs;
926
- const __VLS_refs = {
927
- "field": __VLS_nativeElements['div'],
928
- "textarea": __VLS_nativeElements['textarea'],
929
- "input": __VLS_nativeElements['input'],
930
- };
931
- var $refs;
932
- var $el;
933
- return {
934
- attrs: {},
935
- slots: __VLS_slots,
936
- refs: $refs,
937
- rootEl: $el,
938
- };
939
- }
940
- ;
941
- const __VLS_self = (await import('vue')).defineComponent({
942
- setup() {
943
- return {
944
- IMaskComponent: IMaskComponent,
945
- McTitle: McTitle,
946
- McButton: McButton,
947
- McSvgIcon: McSvgIcon,
948
- McTooltip: McTooltip,
949
- ButtonSize: ButtonSize,
950
- ButtonType: ButtonType,
951
- HorizontalAlignment: HorizontalAlignment,
952
- TitleVariations: TitleVariations,
953
- Weights: Weights,
954
- textarea: textarea,
955
- prettyType: prettyType,
956
- fieldErrors: fieldErrors,
957
- classes: classes,
958
- computedTitle: computedTitle,
959
- isMaskVisible: isMaskVisible,
960
- isTextarea: isTextarea,
961
- isTextareaAutosize: isTextareaAutosize,
962
- isPassword: isPassword,
963
- hasCharCounter: hasCharCounter,
964
- isPasswordType: isPasswordType,
965
- passwordIcon: passwordIcon,
966
- charCounterTitle: charCounterTitle,
967
- charCounterColor: charCounterColor,
968
- maskInputAttrs: maskInputAttrs,
969
- computedValue: computedValue,
970
- handleInput: handleInput,
971
- inputAttrs: inputAttrs,
972
- prepareHandleKeyDown: prepareHandleKeyDown,
973
- handlerCopy: handlerCopy,
974
- togglePasswordVisibility: togglePasswordVisibility,
975
- };
976
- },
977
- __typeEmits: {},
978
- props: {
979
- /**
980
- * Значение
981
- *
982
- */
983
- modelValue: {
984
- type: [String, Number],
985
- default: null
986
- },
987
- /**
988
- * Тип:
989
- * `textarea, textarea-autosize и
990
- * нативные как text, password, email и т.д.`
991
- *
992
- * кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
993
- * кастомный int - разрешает ввод только целочисленных значений
994
- * кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
995
- * date - добавляет placeholder, маску и ограничения ввода
996
- * uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
997
- * phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
998
- */
999
- type: {
1000
- type: String,
1001
- default: InputTypes.Text
1002
- },
1003
- /**
1004
- * Заголовок поля:
1005
- *
1006
- */
1007
- title: {
1008
- type: String,
1009
- default: null
1010
- },
1011
- /**
1012
- * Маска поля:
1013
- *
1014
- * tokens - https://imask.js.org/guide.html
1015
- *
1016
- */
1017
- mask: {
1018
- type: String,
1019
- default: null
1020
- },
1021
- /**
1022
- * Вспомогательный текст под инпутом:
1023
- *
1024
- */
1025
- helpText: {
1026
- type: String,
1027
- default: null
1028
- },
1029
- /**
1030
- * Отключенное состояние
1031
- *
1032
- */
1033
- disabled: {
1034
- type: Boolean,
1035
- default: false
1036
- },
1037
- /**
1038
- * Ошибки
1039
- *
1040
- */
1041
- errors: {
1042
- type: Array,
1043
- default: null
1044
- },
1045
- /**
1046
- * Placeholder
1047
- *
1048
- */
1049
- placeholder: {
1050
- type: String,
1051
- default: null
1052
- },
1053
- /**
1054
- * Name
1055
- *
1056
- */
1057
- name: {
1058
- type: String,
1059
- required: true
1060
- },
1061
- /**
1062
- * плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
1063
- * {
1064
- * date: 'd',
1065
- * month: 'm',
1066
- * year: 'y',
1067
- * }
1068
- *
1069
- */
1070
- dateMaskPlaceholder: {
1071
- type: Object,
1072
- default: () => ({})
1073
- },
1074
- /**
1075
- * Максимальная длина строки в инпуте
1076
- *
1077
- */
1078
- maxLength: {
1079
- type: Number,
1080
- default: null
1081
- },
1082
- /**
1083
- * Состояние копирования
1084
- *
1085
- */
1086
- copy: {
1087
- type: Boolean,
1088
- default: false
1089
- },
1090
- /**
1091
- * Автокомплит введённого ранее текста: on, off
1092
- *
1093
- */
1094
- autocomplete: {
1095
- type: String,
1096
- default: Autocomplete.On
1097
- },
1098
- /**
1099
- * только чтение текста
1100
- *
1101
- */
1102
- readOnly: {
1103
- type: Boolean,
1104
- default: false
1105
- },
1106
- /**
1107
- * Атрибут tabindex для главного элемента
1108
- *
1109
- */
1110
- tabindex: {
1111
- type: [String, Number]
1112
- },
1113
- /**
1114
- * Tooltip для кнопка "показать пароль"
1115
- *
1116
- */
1117
- passwordTooltip: {
1118
- type: String,
1119
- default: 'Show/Hide'
1120
- },
1121
- /**
1122
- * Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
1123
- *
1124
- */
1125
- passwordHideTooltip: {
1126
- type: String,
1127
- default: null
1128
- },
1129
- /**
1130
- * Очищаем данные от маски на выходе
1131
- */
1132
- clearOutput: {
1133
- type: Boolean,
1134
- default: false
1135
- },
1136
- /**
1137
- * Кастомные настройки для маски
1138
- * См. https://imask.js.org/guide.html
1139
- *
1140
- * Например:
1141
- * {
1142
- * autofix: true,
1143
- * blocks: {
1144
- * d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
1145
- * m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
1146
- * Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
1147
- * }
1148
- * }
1149
- */
1150
- maskOptions: {
1151
- type: Object,
1152
- default: null
1153
- },
1154
- required: {
1155
- type: Boolean,
1156
- default: false
1157
- },
1158
- /**
1159
- * Для какого языка поле ввода
1160
- */
1161
- locale: {
1162
- type: String,
1163
- default: null
1164
- },
1165
- /**
1166
- * Мобильное ли разрешение
1167
- * (Используется для триггера тултипа в кнопке с паролем)
1168
- */
1169
- isMobile: {
1170
- type: Boolean,
1171
- default: false
1172
- },
1173
- /**
1174
- * Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
1175
- */
1176
- maxDecimals: {
1177
- type: Number,
1178
- default: 2
1179
- },
1180
- dir: {
1181
- type: String,
1182
- default: Directions.Ltr
1183
- }
1184
- },
1185
- });
1186
- const __VLS_component = (await import('vue')).defineComponent({
1187
- setup() {
1188
- return {};
1189
- },
1190
- __typeEmits: {},
1191
- props: {
1192
- /**
1193
- * Значение
1194
- *
1195
- */
1196
- modelValue: {
1197
- type: [String, Number],
1198
- default: null
1199
- },
1200
- /**
1201
- * Тип:
1202
- * `textarea, textarea-autosize и
1203
- * нативные как text, password, email и т.д.`
1204
- *
1205
- * кастомный num - разрешает ввод только цифр и дробных чисел, без ислчений ввиде буквы 'E'
1206
- * кастомный int - разрешает ввод только целочисленных значений
1207
- * кастомный amount_format - форматирует ввод числовых данных разделяя на разряды(1 000 000)
1208
- * date - добавляет placeholder, маску и ограничения ввода
1209
- * uppercase\lowercase - форматирует текст согласну значению (верхний\нижний регистр)
1210
- * phone_number - добавляет '+' к номеру телефона при фокусе без возможности удалить его
1211
- */
1212
- type: {
1213
- type: String,
1214
- default: InputTypes.Text
1215
- },
1216
- /**
1217
- * Заголовок поля:
1218
- *
1219
- */
1220
- title: {
1221
- type: String,
1222
- default: null
1223
- },
1224
- /**
1225
- * Маска поля:
1226
- *
1227
- * tokens - https://imask.js.org/guide.html
1228
- *
1229
- */
1230
- mask: {
1231
- type: String,
1232
- default: null
1233
- },
1234
- /**
1235
- * Вспомогательный текст под инпутом:
1236
- *
1237
- */
1238
- helpText: {
1239
- type: String,
1240
- default: null
1241
- },
1242
- /**
1243
- * Отключенное состояние
1244
- *
1245
- */
1246
- disabled: {
1247
- type: Boolean,
1248
- default: false
1249
- },
1250
- /**
1251
- * Ошибки
1252
- *
1253
- */
1254
- errors: {
1255
- type: Array,
1256
- default: null
1257
- },
1258
- /**
1259
- * Placeholder
1260
- *
1261
- */
1262
- placeholder: {
1263
- type: String,
1264
- default: null
1265
- },
1266
- /**
1267
- * Name
1268
- *
1269
- */
1270
- name: {
1271
- type: String,
1272
- required: true
1273
- },
1274
- /**
1275
- * плейсхолдеры для короткого обозначения даты (для маски dd.mm.yyyy)
1276
- * {
1277
- * date: 'd',
1278
- * month: 'm',
1279
- * year: 'y',
1280
- * }
1281
- *
1282
- */
1283
- dateMaskPlaceholder: {
1284
- type: Object,
1285
- default: () => ({})
1286
- },
1287
- /**
1288
- * Максимальная длина строки в инпуте
1289
- *
1290
- */
1291
- maxLength: {
1292
- type: Number,
1293
- default: null
1294
- },
1295
- /**
1296
- * Состояние копирования
1297
- *
1298
- */
1299
- copy: {
1300
- type: Boolean,
1301
- default: false
1302
- },
1303
- /**
1304
- * Автокомплит введённого ранее текста: on, off
1305
- *
1306
- */
1307
- autocomplete: {
1308
- type: String,
1309
- default: Autocomplete.On
1310
- },
1311
- /**
1312
- * только чтение текста
1313
- *
1314
- */
1315
- readOnly: {
1316
- type: Boolean,
1317
- default: false
1318
- },
1319
- /**
1320
- * Атрибут tabindex для главного элемента
1321
- *
1322
- */
1323
- tabindex: {
1324
- type: [String, Number]
1325
- },
1326
- /**
1327
- * Tooltip для кнопка "показать пароль"
1328
- *
1329
- */
1330
- passwordTooltip: {
1331
- type: String,
1332
- default: 'Show/Hide'
1333
- },
1334
- /**
1335
- * Tooltip для кнопка "Скрыть пароль", если не указывать, то будет аналогичен "показать"
1336
- *
1337
- */
1338
- passwordHideTooltip: {
1339
- type: String,
1340
- default: null
1341
- },
1342
- /**
1343
- * Очищаем данные от маски на выходе
1344
- */
1345
- clearOutput: {
1346
- type: Boolean,
1347
- default: false
1348
- },
1349
- /**
1350
- * Кастомные настройки для маски
1351
- * См. https://imask.js.org/guide.html
1352
- *
1353
- * Например:
1354
- * {
1355
- * autofix: true,
1356
- * blocks: {
1357
- * d: {mask: IMask.MaskedRange, placeholderChar: 'd', from: 1, to: 31, maxLength: 2},
1358
- * m: {mask: IMask.MaskedRange, placeholderChar: 'm', from: 1, to: 12, maxLength: 2},
1359
- * Y: {mask: IMask.MaskedRange, placeholderChar: 'y', from: 1900, to: 2999, maxLength: 4}
1360
- * }
1361
- * }
1362
- */
1363
- maskOptions: {
1364
- type: Object,
1365
- default: null
1366
- },
1367
- required: {
1368
- type: Boolean,
1369
- default: false
1370
- },
1371
- /**
1372
- * Для какого языка поле ввода
1373
- */
1374
- locale: {
1375
- type: String,
1376
- default: null
1377
- },
1378
- /**
1379
- * Мобильное ли разрешение
1380
- * (Используется для триггера тултипа в кнопке с паролем)
1381
- */
1382
- isMobile: {
1383
- type: Boolean,
1384
- default: false
1385
- },
1386
- /**
1387
- * Свойство на ограничение количества символов после точки для числовых типов (num || amount_format)
1388
- */
1389
- maxDecimals: {
1390
- type: Number,
1391
- default: 2
1392
- },
1393
- dir: {
1394
- type: String,
1395
- default: Directions.Ltr
1396
- }
1397
- },
1398
- __typeEl: {},
1399
- });
1400
- export default {};
1401
- ; /* PartiallyEnd: #4569/main.vue */