@expressms/smartapp-ui 3.0.0-alpha.22 → 3.0.0-alpha.220

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 (541) hide show
  1. package/build/main/assets/icons/accepted-invite-status.svg +4 -0
  2. package/build/main/assets/icons/arrow-back.svg +3 -0
  3. package/build/main/assets/icons/arrow-down.svg +3 -0
  4. package/build/main/assets/icons/arrow-up.svg +3 -0
  5. package/build/main/assets/icons/attachment-loader.svg +3 -0
  6. package/build/main/assets/icons/avatar-loader.svg +3 -0
  7. package/build/main/assets/icons/button-loader.svg +3 -0
  8. package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
  9. package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
  10. package/build/main/assets/icons/check-mark-square.svg +4 -0
  11. package/build/main/assets/icons/check-mark.svg +4 -0
  12. package/build/main/assets/icons/chevron.svg +3 -0
  13. package/build/main/assets/icons/chip-info.svg +5 -0
  14. package/build/main/assets/icons/clear.svg +3 -0
  15. package/build/main/assets/icons/close-modal.svg +3 -0
  16. package/build/main/assets/icons/close-stories.svg +4 -0
  17. package/build/main/assets/icons/close.svg +3 -0
  18. package/build/main/assets/icons/contact-info.svg +5 -0
  19. package/build/main/assets/icons/copy.svg +3 -0
  20. package/build/main/assets/icons/corporate-user.svg +3 -0
  21. package/build/main/assets/icons/crown.svg +5 -0
  22. package/build/main/assets/icons/declined-invite-status.svg +4 -0
  23. package/build/main/assets/icons/delete-chip.svg +3 -0
  24. package/build/main/assets/icons/department.svg +3 -0
  25. package/build/main/assets/icons/distribution.svg +12 -0
  26. package/build/main/assets/icons/doc-small.svg +11 -0
  27. package/build/main/assets/icons/doc.svg +11 -0
  28. package/build/main/assets/icons/download.svg +3 -0
  29. package/build/main/assets/icons/error.svg +5 -0
  30. package/build/main/assets/icons/external-link.svg +3 -0
  31. package/build/main/assets/icons/eye-off.svg +5 -0
  32. package/build/main/assets/icons/eye-on.svg +4 -0
  33. package/build/main/assets/icons/file-small.svg +11 -0
  34. package/build/main/assets/icons/file.svg +11 -0
  35. package/build/main/assets/icons/global-address-book-user.svg +4 -0
  36. package/build/main/assets/icons/group.svg +3 -0
  37. package/build/main/assets/icons/image-no-preview-small.svg +11 -0
  38. package/build/main/assets/icons/image-no-preview.svg +11 -0
  39. package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -0
  40. package/build/main/assets/icons/info.svg +5 -0
  41. package/build/main/assets/icons/input-arrow-down.svg +3 -0
  42. package/build/main/assets/icons/input-arrow-up.svg +3 -0
  43. package/build/main/assets/icons/job-position.svg +3 -0
  44. package/build/main/assets/icons/loader.svg +3 -0
  45. package/build/main/assets/icons/logout.svg +4 -0
  46. package/build/main/assets/icons/magnifying-glass.svg +3 -0
  47. package/build/main/assets/icons/mail.svg +3 -0
  48. package/build/main/assets/icons/meeting-room.svg +3 -0
  49. package/build/main/assets/icons/more.svg +3 -0
  50. package/build/main/assets/icons/my-contacts-user.svg +3 -0
  51. package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
  52. package/build/main/assets/icons/notification-close.svg +3 -0
  53. package/build/main/assets/icons/notification-error.svg +5 -0
  54. package/build/main/assets/icons/notification-failure-filled.svg +3 -0
  55. package/build/main/assets/icons/notification-failure.svg +3 -0
  56. package/build/main/assets/icons/notification-info-filled.svg +5 -0
  57. package/build/main/assets/icons/notification-info.svg +5 -0
  58. package/build/main/assets/icons/notification-success-filled.svg +4 -0
  59. package/build/main/assets/icons/notification-success.svg +4 -0
  60. package/build/main/assets/icons/office.svg +3 -0
  61. package/build/main/assets/icons/order.svg +6 -0
  62. package/build/main/assets/icons/pdf-small.svg +11 -0
  63. package/build/main/assets/icons/pdf.svg +11 -0
  64. package/build/main/assets/icons/play-small.svg +3 -0
  65. package/build/main/assets/icons/play.svg +3 -0
  66. package/build/main/assets/icons/plus.svg +4 -0
  67. package/build/main/assets/icons/ppt-small.svg +11 -0
  68. package/build/main/assets/icons/ppt.svg +11 -0
  69. package/build/main/assets/icons/private.svg +5 -0
  70. package/build/main/assets/icons/refresh.svg +3 -0
  71. package/build/main/assets/icons/remove.svg +3 -0
  72. package/build/main/assets/icons/search.svg +3 -0
  73. package/build/main/assets/icons/select-arrow-down.svg +3 -0
  74. package/build/main/assets/icons/select-arrow-up.svg +3 -0
  75. package/build/main/assets/icons/server.svg +3 -0
  76. package/build/main/assets/icons/story-loader.svg +3 -0
  77. package/build/main/assets/icons/tick.svg +10 -0
  78. package/build/main/assets/icons/trash.svg +3 -0
  79. package/build/main/assets/icons/txt-small.svg +11 -0
  80. package/build/main/assets/icons/txt.svg +11 -0
  81. package/build/main/assets/icons/video-no-preview-small.svg +11 -0
  82. package/build/main/assets/icons/video-no-preview.svg +11 -0
  83. package/build/main/assets/icons/warning-avatar.svg +4 -0
  84. package/build/main/assets/icons/xls-small.svg +11 -0
  85. package/build/main/assets/icons/xls.svg +11 -0
  86. package/build/main/assets/storybook/index.d.ts +27 -0
  87. package/build/main/assets/storybook/index.js +28 -0
  88. package/build/main/assets/storybook/index.js.map +1 -0
  89. package/build/main/constants/constants.d.ts +245 -0
  90. package/build/main/constants/constants.js +303 -0
  91. package/build/main/constants/constants.js.map +1 -0
  92. package/build/main/constants/index.d.ts +2 -0
  93. package/build/main/constants/index.js +3 -0
  94. package/build/main/constants/index.js.map +1 -0
  95. package/build/main/constants/types.d.ts +69 -0
  96. package/build/main/constants/types.js +2 -0
  97. package/build/main/constants/types.js.map +1 -0
  98. package/build/main/helpers/fontScale.d.ts +3 -0
  99. package/build/main/helpers/fontScale.js +17 -0
  100. package/build/main/helpers/fontScale.js.map +1 -0
  101. package/build/main/helpers/index.d.ts +34 -0
  102. package/build/main/helpers/index.js +205 -0
  103. package/build/main/helpers/index.js.map +1 -0
  104. package/build/main/hooks/useCharHintDisplay.d.ts +10 -0
  105. package/build/main/hooks/useCharHintDisplay.js +57 -0
  106. package/build/main/hooks/useCharHintDisplay.js.map +1 -0
  107. package/build/main/hooks/useFontScale.d.ts +1 -0
  108. package/build/main/hooks/useFontScale.js +19 -0
  109. package/build/main/hooks/useFontScale.js.map +1 -0
  110. package/build/main/hooks/useMobileLongTap.d.ts +16 -0
  111. package/build/main/hooks/useMobileLongTap.js +65 -0
  112. package/build/main/hooks/useMobileLongTap.js.map +1 -0
  113. package/build/main/hooks/useModal.d.ts +30 -0
  114. package/build/main/hooks/useModal.js +275 -0
  115. package/build/main/hooks/useModal.js.map +1 -0
  116. package/build/main/index.d.ts +40 -0
  117. package/build/main/index.js +41 -0
  118. package/build/main/index.js.map +1 -0
  119. package/build/main/styles/index.d.ts +1 -0
  120. package/build/main/styles/index.js +2 -0
  121. package/build/main/styles/index.js.map +1 -0
  122. package/build/main/styles/main.js +0 -0
  123. package/build/main/styles/styles.scss +14 -0
  124. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
  125. package/build/main//321/201omponents/ActionModal/ActionModal.js +53 -0
  126. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
  127. package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
  128. package/build/main//321/201omponents/ActionModal/index.js +2 -0
  129. package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
  130. package/build/main//321/201omponents/ActionModal/types.d.ts +23 -0
  131. package/build/main//321/201omponents/ActionModal/types.js +2 -0
  132. package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
  133. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
  134. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +201 -0
  135. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
  136. package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
  137. package/build/main//321/201omponents/AttachedFile/index.js +2 -0
  138. package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
  139. package/build/main//321/201omponents/AttachedFile/types.d.ts +23 -0
  140. package/build/main//321/201omponents/AttachedFile/types.js +2 -0
  141. package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
  142. package/build/main//321/201omponents/Avatar/Avatar.d.ts +5 -0
  143. package/build/main//321/201omponents/Avatar/Avatar.js +257 -0
  144. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
  145. package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
  146. package/build/main//321/201omponents/Avatar/index.js +2 -0
  147. package/build/main//321/201omponents/Avatar/index.js.map +1 -0
  148. package/build/main//321/201omponents/Avatar/types.d.ts +64 -0
  149. package/build/main//321/201omponents/Avatar/types.js +32 -0
  150. package/build/main//321/201omponents/Avatar/types.js.map +1 -0
  151. package/build/main//321/201omponents/Button/Button.d.ts +4 -0
  152. package/build/main//321/201omponents/Button/Button.js +68 -0
  153. package/build/main//321/201omponents/Button/Button.js.map +1 -0
  154. package/build/main//321/201omponents/Button/index.d.ts +1 -0
  155. package/build/main//321/201omponents/Button/index.js +2 -0
  156. package/build/main//321/201omponents/Button/index.js.map +1 -0
  157. package/build/main//321/201omponents/Button/types.d.ts +31 -0
  158. package/build/main//321/201omponents/Button/types.js +15 -0
  159. package/build/main//321/201omponents/Button/types.js.map +1 -0
  160. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
  161. package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
  162. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
  163. package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
  164. package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
  165. package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
  166. package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
  167. package/build/main//321/201omponents/CachedImage/index.js +2 -0
  168. package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
  169. package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
  170. package/build/main//321/201omponents/CachedImage/types.js +2 -0
  171. package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
  172. package/build/main//321/201omponents/Calendar/Calendar.d.ts +16 -0
  173. package/build/main//321/201omponents/Calendar/Calendar.js +294 -0
  174. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
  175. package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
  176. package/build/main//321/201omponents/Calendar/index.js +2 -0
  177. package/build/main//321/201omponents/Calendar/index.js.map +1 -0
  178. package/build/main//321/201omponents/Calendar/types.d.ts +28 -0
  179. package/build/main//321/201omponents/Calendar/types.js +2 -0
  180. package/build/main//321/201omponents/Calendar/types.js.map +1 -0
  181. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
  182. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +49 -0
  183. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
  184. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
  185. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
  186. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
  187. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
  188. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +45 -0
  189. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
  190. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
  191. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +66 -0
  192. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
  193. package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
  194. package/build/main//321/201omponents/Charts/colors.js +4 -0
  195. package/build/main//321/201omponents/Charts/colors.js.map +1 -0
  196. package/build/main//321/201omponents/Charts/constants.d.ts +42 -0
  197. package/build/main//321/201omponents/Charts/constants.js +43 -0
  198. package/build/main//321/201omponents/Charts/constants.js.map +1 -0
  199. package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
  200. package/build/main//321/201omponents/Charts/helpers.js +74 -0
  201. package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
  202. package/build/main//321/201omponents/Charts/index.d.ts +3 -0
  203. package/build/main//321/201omponents/Charts/index.js +4 -0
  204. package/build/main//321/201omponents/Charts/index.js.map +1 -0
  205. package/build/main//321/201omponents/Charts/types.d.ts +89 -0
  206. package/build/main//321/201omponents/Charts/types.js +2 -0
  207. package/build/main//321/201omponents/Charts/types.js.map +1 -0
  208. package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
  209. package/build/main//321/201omponents/Charts/useEvents.js +45 -0
  210. package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
  211. package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
  212. package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
  213. package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
  214. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +8 -0
  215. package/build/main//321/201omponents/Checkbox/Checkbox.js +48 -0
  216. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
  217. package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
  218. package/build/main//321/201omponents/Checkbox/index.js +2 -0
  219. package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
  220. package/build/main//321/201omponents/Checkbox/types.d.ts +14 -0
  221. package/build/main//321/201omponents/Checkbox/types.js +2 -0
  222. package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
  223. package/build/main//321/201omponents/Chip/Chip.d.ts +5 -0
  224. package/build/main//321/201omponents/Chip/Chip.js +288 -0
  225. package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
  226. package/build/main//321/201omponents/Chip/index.d.ts +1 -0
  227. package/build/main//321/201omponents/Chip/index.js +2 -0
  228. package/build/main//321/201omponents/Chip/index.js.map +1 -0
  229. package/build/main//321/201omponents/Chip/types.d.ts +39 -0
  230. package/build/main//321/201omponents/Chip/types.js +2 -0
  231. package/build/main//321/201omponents/Chip/types.js.map +1 -0
  232. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.d.ts +13 -0
  233. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js +76 -0
  234. package/build/main//321/201omponents/ChipDndContext/ChipDndContext.js.map +1 -0
  235. package/build/main//321/201omponents/ChipDndContext/index.d.ts +1 -0
  236. package/build/main//321/201omponents/ChipDndContext/index.js +2 -0
  237. package/build/main//321/201omponents/ChipDndContext/index.js.map +1 -0
  238. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
  239. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +64 -0
  240. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
  241. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
  242. package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
  243. package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
  244. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +31 -0
  245. package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
  246. package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
  247. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
  248. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +122 -0
  249. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
  250. package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
  251. package/build/main//321/201omponents/ContextMenu/index.js +2 -0
  252. package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
  253. package/build/main//321/201omponents/ContextMenu/types.d.ts +41 -0
  254. package/build/main//321/201omponents/ContextMenu/types.js +2 -0
  255. package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
  256. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.d.ts +4 -0
  257. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js +49 -0
  258. package/build/main//321/201omponents/ContextMenuItem/ContextMenuItem.js.map +1 -0
  259. package/build/main//321/201omponents/ContextMenuItem/index.d.ts +1 -0
  260. package/build/main//321/201omponents/ContextMenuItem/index.js +2 -0
  261. package/build/main//321/201omponents/ContextMenuItem/index.js.map +1 -0
  262. package/build/main//321/201omponents/ContextMenuItem/types.d.ts +28 -0
  263. package/build/main//321/201omponents/ContextMenuItem/types.js +6 -0
  264. package/build/main//321/201omponents/ContextMenuItem/types.js.map +1 -0
  265. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
  266. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +281 -0
  267. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
  268. package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
  269. package/build/main//321/201omponents/CustomSelect/index.js +2 -0
  270. package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
  271. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
  272. package/build/main//321/201omponents/CustomSelect/selectStyles.js +78 -0
  273. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
  274. package/build/main//321/201omponents/CustomSelect/types.d.ts +86 -0
  275. package/build/main//321/201omponents/CustomSelect/types.js +2 -0
  276. package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
  277. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
  278. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +67 -0
  279. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
  280. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
  281. package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
  282. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
  283. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.d.ts +12 -0
  284. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js +42 -0
  285. package/build/main//321/201omponents/CustomSelectProfiles/selectStyles.js.map +1 -0
  286. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +13 -0
  287. package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
  288. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
  289. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
  290. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
  291. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
  292. package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
  293. package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
  294. package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
  295. package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
  296. package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
  297. package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
  298. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
  299. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +228 -0
  300. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
  301. package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
  302. package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
  303. package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
  304. package/build/main//321/201omponents/DraggablePopup/types.d.ts +90 -0
  305. package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
  306. package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
  307. package/build/main//321/201omponents/Error/Error.d.ts +4 -0
  308. package/build/main//321/201omponents/Error/Error.js +23 -0
  309. package/build/main//321/201omponents/Error/Error.js.map +1 -0
  310. package/build/main//321/201omponents/Error/index.d.ts +1 -0
  311. package/build/main//321/201omponents/Error/index.js +2 -0
  312. package/build/main//321/201omponents/Error/index.js.map +1 -0
  313. package/build/main//321/201omponents/Error/types.d.ts +10 -0
  314. package/build/main//321/201omponents/Error/types.js +2 -0
  315. package/build/main//321/201omponents/Error/types.js.map +1 -0
  316. package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
  317. package/build/main//321/201omponents/Flex/Flex.js +35 -0
  318. package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
  319. package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
  320. package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
  321. package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
  322. package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
  323. package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
  324. package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
  325. package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
  326. package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
  327. package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
  328. package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
  329. package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
  330. package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
  331. package/build/main//321/201omponents/Flex/index.d.ts +3 -0
  332. package/build/main//321/201omponents/Flex/index.js +4 -0
  333. package/build/main//321/201omponents/Flex/index.js.map +1 -0
  334. package/build/main//321/201omponents/Flex/types.d.ts +21 -0
  335. package/build/main//321/201omponents/Flex/types.js +2 -0
  336. package/build/main//321/201omponents/Flex/types.js.map +1 -0
  337. package/build/main//321/201omponents/Header/Header.d.ts +5 -0
  338. package/build/main//321/201omponents/Header/Header.js +125 -0
  339. package/build/main//321/201omponents/Header/Header.js.map +1 -0
  340. package/build/main//321/201omponents/Header/index.d.ts +1 -0
  341. package/build/main//321/201omponents/Header/index.js +2 -0
  342. package/build/main//321/201omponents/Header/index.js.map +1 -0
  343. package/build/main//321/201omponents/Header/types.d.ts +47 -0
  344. package/build/main//321/201omponents/Header/types.js +2 -0
  345. package/build/main//321/201omponents/Header/types.js.map +1 -0
  346. package/build/main//321/201omponents/Input/Input.d.ts +4 -0
  347. package/build/main//321/201omponents/Input/Input.js +256 -0
  348. package/build/main//321/201omponents/Input/Input.js.map +1 -0
  349. package/build/main//321/201omponents/Input/index.d.ts +1 -0
  350. package/build/main//321/201omponents/Input/index.js +2 -0
  351. package/build/main//321/201omponents/Input/index.js.map +1 -0
  352. package/build/main//321/201omponents/Input/types.d.ts +37 -0
  353. package/build/main//321/201omponents/Input/types.js +2 -0
  354. package/build/main//321/201omponents/Input/types.js.map +1 -0
  355. package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
  356. package/build/main//321/201omponents/ListItem/ListItem.js +214 -0
  357. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
  358. package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
  359. package/build/main//321/201omponents/ListItem/index.js +2 -0
  360. package/build/main//321/201omponents/ListItem/index.js.map +1 -0
  361. package/build/main//321/201omponents/ListItem/types.d.ts +47 -0
  362. package/build/main//321/201omponents/ListItem/types.js +2 -0
  363. package/build/main//321/201omponents/ListItem/types.js.map +1 -0
  364. package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
  365. package/build/main//321/201omponents/Loader/Loader.js +44 -0
  366. package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
  367. package/build/main//321/201omponents/Loader/index.d.ts +1 -0
  368. package/build/main//321/201omponents/Loader/index.js +2 -0
  369. package/build/main//321/201omponents/Loader/index.js.map +1 -0
  370. package/build/main//321/201omponents/Loader/types.d.ts +18 -0
  371. package/build/main//321/201omponents/Loader/types.js +2 -0
  372. package/build/main//321/201omponents/Loader/types.js.map +1 -0
  373. package/build/main//321/201omponents/Modal/Modal.d.ts +5 -0
  374. package/build/main//321/201omponents/Modal/Modal.js +397 -0
  375. package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
  376. package/build/main//321/201omponents/Modal/index.d.ts +1 -0
  377. package/build/main//321/201omponents/Modal/index.js +2 -0
  378. package/build/main//321/201omponents/Modal/index.js.map +1 -0
  379. package/build/main//321/201omponents/Modal/types.d.ts +77 -0
  380. package/build/main//321/201omponents/Modal/types.js +2 -0
  381. package/build/main//321/201omponents/Modal/types.js.map +1 -0
  382. package/build/main//321/201omponents/Notification/Notification.d.ts +4 -0
  383. package/build/main//321/201omponents/Notification/Notification.js +208 -0
  384. package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
  385. package/build/main//321/201omponents/Notification/constants.d.ts +34 -0
  386. package/build/main//321/201omponents/Notification/constants.js +59 -0
  387. package/build/main//321/201omponents/Notification/constants.js.map +1 -0
  388. package/build/main//321/201omponents/Notification/index.d.ts +1 -0
  389. package/build/main//321/201omponents/Notification/index.js +2 -0
  390. package/build/main//321/201omponents/Notification/index.js.map +1 -0
  391. package/build/main//321/201omponents/Notification/types.d.ts +64 -0
  392. package/build/main//321/201omponents/Notification/types.js +2 -0
  393. package/build/main//321/201omponents/Notification/types.js.map +1 -0
  394. package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
  395. package/build/main//321/201omponents/Profile/Profile.js +42 -0
  396. package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
  397. package/build/main//321/201omponents/Profile/index.d.ts +1 -0
  398. package/build/main//321/201omponents/Profile/index.js +2 -0
  399. package/build/main//321/201omponents/Profile/index.js.map +1 -0
  400. package/build/main//321/201omponents/Profile/types.d.ts +14 -0
  401. package/build/main//321/201omponents/Profile/types.js +2 -0
  402. package/build/main//321/201omponents/Profile/types.js.map +1 -0
  403. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
  404. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
  405. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
  406. package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
  407. package/build/main//321/201omponents/ProgressBar/index.js +2 -0
  408. package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
  409. package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
  410. package/build/main//321/201omponents/ProgressBar/types.js +2 -0
  411. package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
  412. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
  413. package/build/main//321/201omponents/RadioButton/RadioButton.js +33 -0
  414. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
  415. package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
  416. package/build/main//321/201omponents/RadioButton/index.js +2 -0
  417. package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
  418. package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
  419. package/build/main//321/201omponents/RadioButton/types.js +2 -0
  420. package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
  421. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
  422. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +140 -0
  423. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
  424. package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
  425. package/build/main//321/201omponents/ScrollBar/index.js +2 -0
  426. package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
  427. package/build/main//321/201omponents/ScrollBar/types.d.ts +24 -0
  428. package/build/main//321/201omponents/ScrollBar/types.js +2 -0
  429. package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
  430. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
  431. package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
  432. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
  433. package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
  434. package/build/main//321/201omponents/Skeleton/index.js +2 -0
  435. package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
  436. package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
  437. package/build/main//321/201omponents/Skeleton/types.js +2 -0
  438. package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
  439. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  440. package/build/main//321/201omponents/Stories/Stories.js +406 -0
  441. package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
  442. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  443. package/build/main//321/201omponents/Stories/index.js +2 -0
  444. package/build/main//321/201omponents/Stories/index.js.map +1 -0
  445. package/build/main//321/201omponents/Stories/types.d.ts +71 -0
  446. package/build/main//321/201omponents/Stories/types.js +16 -0
  447. package/build/main//321/201omponents/Stories/types.js.map +1 -0
  448. package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
  449. package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
  450. package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
  451. package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
  452. package/build/main//321/201omponents/Switcher/index.js +2 -0
  453. package/build/main//321/201omponents/Switcher/index.js.map +1 -0
  454. package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
  455. package/build/main//321/201omponents/Switcher/types.js +2 -0
  456. package/build/main//321/201omponents/Switcher/types.js.map +1 -0
  457. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
  458. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
  459. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
  460. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  461. package/build/main//321/201omponents/SyncLoader/index.js +2 -0
  462. package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
  463. package/build/main//321/201omponents/SyncLoader/types.d.ts +8 -0
  464. package/build/main//321/201omponents/SyncLoader/types.js +2 -0
  465. package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
  466. package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
  467. package/build/main//321/201omponents/Textarea/Textarea.js +59 -0
  468. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
  469. package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
  470. package/build/main//321/201omponents/Textarea/index.js +2 -0
  471. package/build/main//321/201omponents/Textarea/index.js.map +1 -0
  472. package/build/main//321/201omponents/Textarea/types.d.ts +13 -0
  473. package/build/main//321/201omponents/Textarea/types.js +2 -0
  474. package/build/main//321/201omponents/Textarea/types.js.map +1 -0
  475. package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
  476. package/build/main//321/201omponents/Toggle/Toggle.js +35 -0
  477. package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
  478. package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
  479. package/build/main//321/201omponents/Toggle/index.js +2 -0
  480. package/build/main//321/201omponents/Toggle/index.js.map +1 -0
  481. package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
  482. package/build/main//321/201omponents/Toggle/types.js +2 -0
  483. package/build/main//321/201omponents/Toggle/types.js.map +1 -0
  484. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
  485. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +40 -0
  486. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
  487. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
  488. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +98 -0
  489. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
  490. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +5 -0
  491. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +24 -0
  492. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
  493. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
  494. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +104 -0
  495. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
  496. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +4 -0
  497. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +133 -0
  498. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
  499. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
  500. package/build/main//321/201omponents/UserDropdown/Option/Option.js +85 -0
  501. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
  502. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
  503. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +41 -0
  504. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
  505. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
  506. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +527 -0
  507. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
  508. package/build/main//321/201omponents/UserDropdown/components/Delimiter.d.ts +8 -0
  509. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js +10 -0
  510. package/build/main//321/201omponents/UserDropdown/components/Delimiter.js.map +1 -0
  511. package/build/main//321/201omponents/UserDropdown/components/Hint.d.ts +6 -0
  512. package/build/main//321/201omponents/UserDropdown/components/Hint.js +21 -0
  513. package/build/main//321/201omponents/UserDropdown/components/Hint.js.map +1 -0
  514. package/build/main//321/201omponents/UserDropdown/components/Input.d.ts +2 -0
  515. package/build/main//321/201omponents/UserDropdown/components/Input.js +24 -0
  516. package/build/main//321/201omponents/UserDropdown/components/Input.js.map +1 -0
  517. package/build/main//321/201omponents/UserDropdown/components/Mask.d.ts +8 -0
  518. package/build/main//321/201omponents/UserDropdown/components/Mask.js +19 -0
  519. package/build/main//321/201omponents/UserDropdown/components/Mask.js.map +1 -0
  520. package/build/main//321/201omponents/UserDropdown/components/Title.d.ts +5 -0
  521. package/build/main//321/201omponents/UserDropdown/components/Title.js +18 -0
  522. package/build/main//321/201omponents/UserDropdown/components/Title.js.map +1 -0
  523. package/build/main//321/201omponents/UserDropdown/constants.d.ts +65 -0
  524. package/build/main//321/201omponents/UserDropdown/constants.js +83 -0
  525. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
  526. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +148 -0
  527. package/build/main//321/201omponents/UserDropdown/helpers.js +313 -0
  528. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
  529. package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
  530. package/build/main//321/201omponents/UserDropdown/index.js +2 -0
  531. package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
  532. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
  533. package/build/main//321/201omponents/UserDropdown/selectStyles.js +99 -0
  534. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
  535. package/build/main//321/201omponents/UserDropdown/types.d.ts +356 -0
  536. package/build/main//321/201omponents/UserDropdown/types.js +2 -0
  537. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
  538. package/build/main//321/201omponents/types.d.ts +2 -0
  539. package/build/main//321/201omponents/types.js +2 -0
  540. package/build/main//321/201omponents/types.js.map +1 -0
  541. package/package.json +13 -8
@@ -0,0 +1,205 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import classNames from 'classnames';
14
+ import DOMPurify from 'dompurify';
15
+ import juice from 'juice';
16
+ import { isArray, isNil } from 'lodash';
17
+ import { v4 as uuidv4 } from 'uuid';
18
+ import { DISPLAY_SIZE } from '../сomponents/AttachedFile/AttachedFile';
19
+ import { AVATAR_COLOR_BOTTOM, AVATAR_COLOR_BOTTOM_PERCENTS, AVATAR_COLOR_MIDDLE, AVATAR_COLOR_MIDDLE_PERCENTS, AVATAR_COLOR_TOP, AVATAR_COLOR_TOP_PERCENTS, AVATAR_DEGREES, BOTTOM_SHEET, CENTER, COLORS, DEFAULT_HEADER_AVATAR_INDEX, FILE_FORMATS, FONT_FAMILY, LAYOUT_TYPE, MODAL_ICONS_PADDING_LEFT, PLATFORM, THEME, } from '../constants';
20
+ import { CONTACT_TYPES } from '../сomponents/UserDropdown/constants';
21
+ import { ReactComponent as CorporateUserIcon } from '../assets/icons/corporate-user.svg';
22
+ import { ReactComponent as DistributionIcon } from '../assets/icons/distribution.svg';
23
+ import { ReactComponent as DocFileSmallIcon } from '../assets/icons/doc-small.svg';
24
+ import { ReactComponent as DocFileIcon } from '../assets/icons/doc.svg';
25
+ import { ReactComponent as FileSmallIcon } from '../assets/icons/file-small.svg';
26
+ import { ReactComponent as FileIcon } from '../assets/icons/file.svg';
27
+ import { ReactComponent as GlobalAddressBookIcon } from '../assets/icons/global-address-book-user.svg';
28
+ import { ReactComponent as GroupIcon } from '../assets/icons/group.svg';
29
+ import { ReactComponent as ImageFileSmallIcon } from '../assets/icons/image-no-preview-small.svg';
30
+ import { ReactComponent as ImageFileIcon } from '../assets/icons/image-no-preview.svg';
31
+ import { ReactComponent as MeetingRoomIcon } from '../assets/icons/meeting-room.svg';
32
+ import { ReactComponent as MyContactsUserIcon } from '../assets/icons/my-contacts-user.svg';
33
+ import { ReactComponent as PdfFileSmallIcon } from '../assets/icons/pdf-small.svg';
34
+ import { ReactComponent as PdfFileIcon } from '../assets/icons/pdf.svg';
35
+ import { ReactComponent as PptFileSmallIcon } from '../assets/icons/ppt-small.svg';
36
+ import { ReactComponent as PptFileIcon } from '../assets/icons/ppt.svg';
37
+ import { ReactComponent as TxtFileSmallIcon } from '../assets/icons/txt-small.svg';
38
+ import { ReactComponent as TxtFileIcon } from '../assets/icons/txt.svg';
39
+ import { ReactComponent as VideoFileSmallIcon } from '../assets/icons/video-no-preview-small.svg';
40
+ import { ReactComponent as VideoFileIcon } from '../assets/icons/video-no-preview.svg';
41
+ import { ReactComponent as XlsFileSmallIcon } from '../assets/icons/xls-small.svg';
42
+ import { ReactComponent as XlsFileIcon } from '../assets/icons/xls.svg';
43
+ export { getFontScale, generateScaledCssValue, generateScaledFontValue } from './fontScale';
44
+ export var generateColor = function (color, defaultColor) {
45
+ if (defaultColor === void 0) { defaultColor = ''; }
46
+ return (color && CSS.supports('color', color) ? color : defaultColor);
47
+ };
48
+ export var checkIsWebPlatform = function (platform) { return platform === PLATFORM.web; };
49
+ export var checkIsIosPlatform = function (platform) { return platform === PLATFORM.ios; };
50
+ export var checkIsAndroidPlatform = function (platform) { return platform === PLATFORM.android; };
51
+ export var checkIsMobilePlatform = function (platform) {
52
+ return checkIsAndroidPlatform(platform) || checkIsIosPlatform(platform) || platform === PLATFORM.aurora;
53
+ };
54
+ export var isDarkTheme = function (theme) { return theme === THEME.dark; };
55
+ export var generateClassNames = function (_a) {
56
+ var className = _a.className, delimiter = _a.delimiter, additionalClassName = _a.additionalClassName;
57
+ return isArray(additionalClassName)
58
+ ? classNames(className, additionalClassName.map(function (name) { return "".concat(className).concat(delimiter).concat(name); }))
59
+ : classNames(className, "".concat(className).concat(delimiter).concat(additionalClassName));
60
+ };
61
+ export var userNameToColor = function (userName) {
62
+ var _a = generateAvatarColor(userName), degrees = _a.degrees, top = _a.top, topPercent = _a.topPercent, middle = _a.middle, middlePercent = _a.middlePercent, bottom = _a.bottom, bottomPercent = _a.bottomPercent;
63
+ return middle
64
+ ? "linear-gradient(".concat(degrees, "deg, ").concat(top, " ").concat(topPercent, "%, ").concat(middle, " ").concat(middlePercent, "%, ").concat(bottom, " ").concat(bottomPercent, "%)")
65
+ : "linear-gradient(".concat(degrees, "deg, ").concat(top, " ").concat(topPercent, "%, ").concat(bottom, " ").concat(bottomPercent, "%)");
66
+ };
67
+ var generateAvatarData = function (index) { return ({
68
+ degrees: AVATAR_DEGREES[index],
69
+ top: AVATAR_COLOR_TOP[index],
70
+ topPercent: AVATAR_COLOR_TOP_PERCENTS[index],
71
+ middle: AVATAR_COLOR_MIDDLE[index],
72
+ middlePercent: AVATAR_COLOR_MIDDLE_PERCENTS[index],
73
+ bottom: AVATAR_COLOR_BOTTOM[index],
74
+ bottomPercent: AVATAR_COLOR_BOTTOM_PERCENTS[index],
75
+ }); };
76
+ var generateAvatarColor = function (str) {
77
+ if (!str)
78
+ return generateAvatarData(DEFAULT_HEADER_AVATAR_INDEX);
79
+ var stylesIndex = calculateAvatarStylesIndex(str) || 0;
80
+ return generateAvatarData(stylesIndex);
81
+ };
82
+ var calculateAvatarStylesIndex = function (str) { return Math.abs(hashCode(str) % AVATAR_COLOR_TOP.length); };
83
+ var hashCode = function (str) {
84
+ return str.split('').reduce(function (a, b) {
85
+ a = (a << 5) - a + b.charCodeAt(0);
86
+ return a & a;
87
+ }, 0);
88
+ };
89
+ var generateFirstLetterOfWord = function (word) { return (word === null || word === void 0 ? void 0 : word[0]) || ''; };
90
+ export var createInitials = function (str) {
91
+ var _a = str.trim().toUpperCase().split(' '), firstWord = _a[0], secondWord = _a[1];
92
+ return "".concat(generateFirstLetterOfWord(firstWord)).concat(generateFirstLetterOfWord(secondWord));
93
+ };
94
+ export var calculatePercentageOfValue = function (_a) {
95
+ var value = _a.value, percentage = _a.percentage, _b = _a.shouldBeRounded, shouldBeRounded = _b === void 0 ? true : _b;
96
+ var result = (value * percentage) / 100;
97
+ return shouldBeRounded ? Math.ceil(result) : result;
98
+ };
99
+ export var isFullScreen = function (layoutType) { return layoutType === LAYOUT_TYPE.full; };
100
+ export var isValueEqualToZero = function (value) { return value === 0; };
101
+ export var renderStoryComponent = function (_a) {
102
+ var component = _a.component, componentDarkTheme = _a.componentDarkTheme, styles = _a.styles;
103
+ return (_jsxs("div", __assign({ style: { display: 'flex', flexDirection: 'column', gap: '16px' } }, { children: [_jsxs("div", __assign({ style: __assign({ border: '1px dashed #9747FF', borderRadius: '5px', padding: '0 16px 16px' }, styles) }, { children: [_jsx("h3", { children: "Light Theme" }), component] })), _jsxs("div", __assign({ style: __assign({ background: '#242424', borderRadius: '5px', padding: '0 16px 16px' }, styles) }, { children: [_jsx("h3", __assign({ style: { color: '#F9F9F9' } }, { children: "Dark Theme" })), _jsx("div", __assign({ "data-theme": "dark" }, { children: componentDarkTheme || component }))] }))] })));
104
+ };
105
+ export var generateIsCloseIconHidden = function (platform, isCloseIconHidden) {
106
+ return isNil(isCloseIconHidden) ? checkIsMobilePlatform(platform) : isCloseIconHidden;
107
+ };
108
+ var isTextAlignEqualToCenter = function (element) { return (element ? window.getComputedStyle(element).textAlign === CENTER : false); };
109
+ export var checkIfContentIsCentered = function (elementRef) {
110
+ var elementRefCurrent = elementRef.current;
111
+ if (elementRefCurrent)
112
+ return isTextAlignEqualToCenter(elementRefCurrent) || isTextAlignEqualToCenter(elementRefCurrent.firstElementChild);
113
+ };
114
+ export var generateBottomSheetClassName = function (platform, shouldUseBottomSheet) {
115
+ return [platform, shouldUseBottomSheet ? BOTTOM_SHEET : ''].filter(Boolean);
116
+ };
117
+ export var generateId = function () { return uuidv4(); };
118
+ export var generateAvatarIcon = function (userType) {
119
+ switch (userType) {
120
+ case CONTACT_TYPES.privateDL:
121
+ return _jsx(GroupIcon, { color: COLORS.iconContrast });
122
+ case CONTACT_TYPES.publicDL:
123
+ return _jsx(DistributionIcon, { color: COLORS.iconContrast });
124
+ case CONTACT_TYPES.meetingRoom:
125
+ return _jsx(MeetingRoomIcon, { color: COLORS.iconContrast });
126
+ default:
127
+ return null;
128
+ }
129
+ };
130
+ export var renderUserIcon = function (_a) {
131
+ var isMyContacts = _a.isMyContacts, isLocalContact = _a.isLocalContact, isCachedContact = _a.isCachedContact, userType = _a.userType, style = _a.style;
132
+ if (isMyContacts)
133
+ return _jsx(MyContactsUserIcon, { color: COLORS.iconSecondary, style: style });
134
+ if (isLocalContact || isCachedContact)
135
+ return _jsx(GlobalAddressBookIcon, { color: COLORS.iconPrimary, style: style });
136
+ switch (userType) {
137
+ case CONTACT_TYPES.myContact:
138
+ case CONTACT_TYPES.privateDL:
139
+ return _jsx(MyContactsUserIcon, { color: COLORS.iconSecondary, style: style });
140
+ case CONTACT_TYPES.GALContact:
141
+ return _jsx(GlobalAddressBookIcon, { color: COLORS.iconPrimary, style: style });
142
+ case CONTACT_TYPES.meetingRoom:
143
+ case CONTACT_TYPES.publicDL:
144
+ return null;
145
+ default:
146
+ return _jsx(CorporateUserIcon, { color: COLORS.iconAccent, style: style });
147
+ }
148
+ };
149
+ export var extractFileExtensionRegex = function (filename) {
150
+ var match = filename.match(/\.([a-z0-9]+)$/i);
151
+ return (match === null || match === void 0 ? void 0 : match[1]) || '';
152
+ };
153
+ export var generateFileIcon = function (fileName, displaySize) {
154
+ var isSmallDisplaySize = displaySize === DISPLAY_SIZE.small;
155
+ var fileExtension = extractFileExtensionRegex(fileName);
156
+ switch (fileExtension) {
157
+ case FILE_FORMATS.pdf:
158
+ return isSmallDisplaySize ? _jsx(PdfFileSmallIcon, {}) : _jsx(PdfFileIcon, {});
159
+ case FILE_FORMATS.doc:
160
+ case FILE_FORMATS.docx:
161
+ return isSmallDisplaySize ? _jsx(DocFileSmallIcon, {}) : _jsx(DocFileIcon, {});
162
+ case FILE_FORMATS.xls:
163
+ case FILE_FORMATS.xlsx:
164
+ return isSmallDisplaySize ? _jsx(XlsFileSmallIcon, {}) : _jsx(XlsFileIcon, {});
165
+ case FILE_FORMATS.ppt:
166
+ case FILE_FORMATS.pptx:
167
+ return isSmallDisplaySize ? _jsx(PptFileSmallIcon, {}) : _jsx(PptFileIcon, {});
168
+ case FILE_FORMATS.txt:
169
+ return isSmallDisplaySize ? _jsx(TxtFileSmallIcon, {}) : _jsx(TxtFileIcon, {});
170
+ case FILE_FORMATS.mov:
171
+ case FILE_FORMATS.mp4:
172
+ case FILE_FORMATS.webm:
173
+ case FILE_FORMATS.wmv:
174
+ return isSmallDisplaySize ? _jsx(VideoFileSmallIcon, {}) : _jsx(VideoFileIcon, {});
175
+ case FILE_FORMATS.jpg:
176
+ case FILE_FORMATS.jpeg:
177
+ case FILE_FORMATS.png:
178
+ return isSmallDisplaySize ? _jsx(ImageFileSmallIcon, {}) : _jsx(ImageFileIcon, {});
179
+ default:
180
+ return isSmallDisplaySize ? _jsx(FileSmallIcon, {}) : _jsx(FileIcon, {});
181
+ }
182
+ };
183
+ export var renderCloseIconSpace = function (_a) {
184
+ var _b;
185
+ var elementRef = _a.elementRef, closeIconRef = _a.closeIconRef, _c = _a.isContent, isContent = _c === void 0 ? false : _c;
186
+ var _d = (((_b = closeIconRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) || {}).width, width = _d === void 0 ? 0 : _d;
187
+ return (_jsx("div", { style: { '--close-icon-space-width': "".concat(width + MODAL_ICONS_PADDING_LEFT, "px") }, className: classNames('close-icon-space', {
188
+ 'close-icon-space__content': isContent,
189
+ 'close-icon-space__centered': checkIfContentIsCentered(elementRef),
190
+ }) }));
191
+ };
192
+ export var generateFontFamilyStyle = function (fontFamily) {
193
+ if (fontFamily === void 0) { fontFamily = FONT_FAMILY.inter; }
194
+ return ({ fontFamily: "".concat(fontFamily, ", sans-serif") });
195
+ };
196
+ export var createSanitizedHtml = function (str) {
197
+ var preparedHtml = juice(str);
198
+ var html = DOMPurify.sanitize(preparedHtml);
199
+ return { __html: html };
200
+ };
201
+ export var clickOutsideTheModal = function (closeModal, clickOutside) { return (clickOutside ? clickOutside() : closeModal()); };
202
+ export var checkIfContactTypeIsGroup = function (contactType) {
203
+ return contactType === CONTACT_TYPES.publicDL || contactType === CONTACT_TYPES.privateDL;
204
+ };
205
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/helpers/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,SAAS,MAAM,WAAW,CAAA;AACjC,OAAO,KAAK,MAAM,OAAO,CAAA;AAC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MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,UAAsC;IAAtC,2BAAA,EAAA,aAAqB,WAAW,CAAC,KAAK;IAAK,OAAA,CAAC,EAAE,UAAU,EAAE,UAAG,UAAU,iBAAc,EAAE,CAAC;AAA7C,CAA6C,CAAA;AAEhI,MAAM,CAAC,IAAM,mBAAmB,GAAG,UAAC,GAAW;IAC7C,IAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;IAC/B,IAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;IAC7C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACzB,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAAC,UAAsB,EAAE,YAAyB,IAAK,OAAA,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,EAA9C,CAA8C,CAAA;AAEzI,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAC,WAA2B;IACnE,OAAA,WAAW,KAAK,aAAa,CAAC,QAAQ,IAAI,WAAW,KAAK,aAAa,CAAC,SAAS;AAAjF,CAAiF,CAAA"}
@@ -0,0 +1,10 @@
1
+ type TUseCharHintDisplay = {
2
+ isFieldFocused?: boolean;
3
+ isCharHintEnable?: boolean;
4
+ inputValue: string;
5
+ charHintTimeout?: number;
6
+ };
7
+ export declare const useCharHintDisplay: ({ isFieldFocused, isCharHintEnable, inputValue, charHintTimeout, }: TUseCharHintDisplay) => {
8
+ isCharHintVisible: boolean;
9
+ };
10
+ export {};
@@ -0,0 +1,57 @@
1
+ import { useEffect, useRef, useState } from 'react';
2
+ import { isNil } from 'lodash';
3
+ import { MIN_INPUT_SYMBOLS } from '../constants';
4
+ var ONE_CHARACTER = 1;
5
+ var TWO_CHARACTERS = 2;
6
+ var DEFAULT_CHAR_HINT_TIMEOUT = 1500;
7
+ export var useCharHintDisplay = function (_a) {
8
+ var isFieldFocused = _a.isFieldFocused, _b = _a.isCharHintEnable, isCharHintEnable = _b === void 0 ? true : _b, inputValue = _a.inputValue, _c = _a.charHintTimeout, charHintTimeout = _c === void 0 ? DEFAULT_CHAR_HINT_TIMEOUT : _c;
9
+ var _d = useState(null), timeoutId = _d[0], setTimeoutId = _d[1];
10
+ var _e = useState(false), isCharHintVisible = _e[0], setIsCharHintVisible = _e[1];
11
+ var wasCharHintVisibleOnBlurRef = useRef(false);
12
+ var handleClearTimeout = function () {
13
+ if (timeoutId) {
14
+ clearTimeout(timeoutId);
15
+ setTimeoutId(null);
16
+ }
17
+ };
18
+ // скрываем подсказку при blur и мгновенно возвращаем при focus, если она была видна
19
+ useEffect(function () {
20
+ if (!isCharHintEnable || isNil(isFieldFocused))
21
+ return;
22
+ if (!isFieldFocused) {
23
+ wasCharHintVisibleOnBlurRef.current = isCharHintVisible;
24
+ handleClearTimeout();
25
+ if (isCharHintVisible)
26
+ setIsCharHintVisible(false);
27
+ return;
28
+ }
29
+ if (wasCharHintVisibleOnBlurRef.current) {
30
+ wasCharHintVisibleOnBlurRef.current = false;
31
+ setIsCharHintVisible(true);
32
+ }
33
+ // eslint-disable-next-line
34
+ }, [isFieldFocused, isCharHintEnable]);
35
+ useEffect(function () {
36
+ var inputValueLength = inputValue.length;
37
+ if (!isCharHintEnable || (!isNil(isFieldFocused) && !isFieldFocused))
38
+ return;
39
+ handleClearTimeout();
40
+ if (inputValueLength >= MIN_INPUT_SYMBOLS)
41
+ setIsCharHintVisible(false);
42
+ else if (inputValueLength === ONE_CHARACTER || inputValueLength === TWO_CHARACTERS) {
43
+ if (!isCharHintVisible) {
44
+ var nextTimeoutId = setTimeout(function () { return setIsCharHintVisible(true); }, charHintTimeout);
45
+ setTimeoutId(nextTimeoutId);
46
+ }
47
+ }
48
+ else
49
+ setIsCharHintVisible(false);
50
+ return function () {
51
+ timeoutId && clearTimeout(timeoutId);
52
+ };
53
+ // eslint-disable-next-line
54
+ }, [charHintTimeout, inputValue, isCharHintEnable, isCharHintVisible]);
55
+ return { isCharHintVisible: isCharHintVisible };
56
+ };
57
+ //# sourceMappingURL=useCharHintDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharHintDisplay.js","sourceRoot":"","sources":["../../../src/hooks/useCharHintDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAkB,MAAM,cAAc,CAAA;AAShE,IAAM,aAAa,GAAG,CAAC,CAAA;AACvB,IAAM,cAAc,GAAG,CAAC,CAAA;AACxB,IAAM,yBAAyB,GAAG,IAAI,CAAA;AAEtC,MAAM,CAAC,IAAM,kBAAkB,GAAG,UAAC,EAKb;QAJpB,cAAc,oBAAA,EACd,wBAAuB,EAAvB,gBAAgB,mBAAG,IAAI,KAAA,EACvB,UAAU,gBAAA,EACV,uBAA2C,EAA3C,eAAe,mBAAG,yBAAyB,KAAA;IAErC,IAAA,KAA4B,QAAQ,CAAiB,IAAI,CAAC,EAAzD,SAAS,QAAA,EAAE,YAAY,QAAkC,CAAA;IAC1D,IAAA,KAA4C,QAAQ,CAAC,KAAK,CAAC,EAA1D,iBAAiB,QAAA,EAAE,oBAAoB,QAAmB,CAAA;IACjE,IAAM,2BAA2B,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAEjD,IAAM,kBAAkB,GAAG;QACzB,IAAI,SAAS,EAAE;YACb,YAAY,CAAC,SAAS,CAAC,CAAA;YACvB,YAAY,CAAC,IAAI,CAAC,CAAA;SACnB;IACH,CAAC,CAAA;IAED,oFAAoF;IACpF,SAAS,CAAC;QACR,IAAI,CAAC,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC;YAAE,OAAM;QAEtD,IAAI,CAAC,cAAc,EAAE;YACnB,2BAA2B,CAAC,OAAO,GAAG,iBAA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 import { isUndefined } from 'lodash';
3
+ import { getFontScale } from '../helpers';
4
+ var FONT_SCALE_OBSERVED_ATTRIBUTES = ['class', 'style'];
5
+ export var useFontScale = function () {
6
+ var _a = useState(getFontScale), fontScale = _a[0], setFontScale = _a[1];
7
+ useEffect(function () {
8
+ if (isUndefined(globalThis.document) || isUndefined(globalThis.MutationObserver))
9
+ return;
10
+ var fontScaleObserver = new globalThis.MutationObserver(function () { return setFontScale(getFontScale()); });
11
+ fontScaleObserver.observe(globalThis.document.documentElement, {
12
+ attributeFilter: FONT_SCALE_OBSERVED_ATTRIBUTES,
13
+ attributes: true,
14
+ });
15
+ return function () { return fontScaleObserver.disconnect(); };
16
+ }, []);
17
+ return fontScale;
18
+ };
19
+ //# sourceMappingURL=useFontScale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFontScale.js","sourceRoot":"","sources":["../../../src/hooks/useFontScale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,IAAM,8BAA8B,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;AAEzD,MAAM,CAAC,IAAM,YAAY,GAAG;IACpB,IAAA,KAA4B,QAAQ,CAAC,YAAY,CAAC,EAAjD,SAAS,QAAA,EAAE,YAAY,QAA0B,CAAA;IAExD,SAAS,CAAC;QACR,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,gBAAgB,CAAC;YAAE,OAAM;QAExF,IAAM,iBAAiB,GAAG,IAAI,UAAU,CAAC,gBAAgB,CAAC,cAAM,OAAA,YAAY,CAAC,YAAY,EAAE,CAAC,EAA5B,CAA4B,CAAC,CAAA;QAE7F,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,eAAe,EAAE;YAC7D,eAAe,EAAE,8BAA8B;YAC/C,UAAU,EAAE,IAAI;SACjB,CAAC,CAAA;QAEF,OAAO,cAAM,OAAA,iBAAiB,CAAC,UAAU,EAAE,EAA9B,CAA8B,CAAA;IAC7C,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { TouchEvent } from 'react';
2
+ type TUseMobileLongTap = {
3
+ delay?: number;
4
+ onLongTap?: () => void;
5
+ onShortTap?: () => void;
6
+ onDragStart?: () => void;
7
+ onPressStart?: () => void;
8
+ onPressEnd?: () => void;
9
+ };
10
+ export declare const useMobileLongTap: ({ delay, onLongTap, onShortTap, onDragStart, onPressStart, onPressEnd, }: TUseMobileLongTap) => {
11
+ startPressTimer: ({ touches }: TouchEvent) => void;
12
+ handleTouchMove: ({ touches }: TouchEvent) => void;
13
+ handleTouchEnd: () => void;
14
+ handleTouchCancel: () => void;
15
+ };
16
+ export {};
@@ -0,0 +1,65 @@
1
+ import { useCallback, useRef } from 'react';
2
+ import { RENDER_DELAY } from '../constants';
3
+ var DRAG_THRESHOLD = 10;
4
+ var DEFAULT_LONG_TAP_DELAY = 500;
5
+ export var useMobileLongTap = function (_a) {
6
+ var _b = _a.delay, delay = _b === void 0 ? DEFAULT_LONG_TAP_DELAY : _b, onLongTap = _a.onLongTap, onShortTap = _a.onShortTap, onDragStart = _a.onDragStart, onPressStart = _a.onPressStart, onPressEnd = _a.onPressEnd;
7
+ var pressTimer = useRef(null);
8
+ var isLongTapActivated = useRef(false);
9
+ var startPosition = useRef(null);
10
+ var touchStartTime = useRef(0);
11
+ var isMovedBeyondThreshold = useRef(false);
12
+ var startPressTimer = useCallback(function (_a) {
13
+ var touches = _a.touches;
14
+ var _b = touches[0], x = _b.clientX, y = _b.clientY;
15
+ isMovedBeyondThreshold.current = false;
16
+ isLongTapActivated.current = false;
17
+ touchStartTime.current = Date.now();
18
+ startPosition.current = { x: x, y: y };
19
+ onPressStart === null || onPressStart === void 0 ? void 0 : onPressStart();
20
+ pressTimer.current = setTimeout(function () {
21
+ isLongTapActivated.current = true;
22
+ onLongTap === null || onLongTap === void 0 ? void 0 : onLongTap();
23
+ }, delay);
24
+ }, [onLongTap, delay, onPressStart]);
25
+ var cancelPressTimer = useCallback(function () {
26
+ var pressTimerCurrent = pressTimer.current;
27
+ if (pressTimerCurrent) {
28
+ clearTimeout(pressTimerCurrent);
29
+ pressTimer.current = null;
30
+ }
31
+ startPosition.current = null;
32
+ }, []);
33
+ var handleTouchEnd = useCallback(function () {
34
+ var touchDuration = Date.now() - touchStartTime.current;
35
+ var isShortTap = touchDuration < delay && !isLongTapActivated.current && !isMovedBeyondThreshold.current;
36
+ onPressEnd === null || onPressEnd === void 0 ? void 0 : onPressEnd();
37
+ isMovedBeyondThreshold.current = false;
38
+ cancelPressTimer();
39
+ if (isShortTap)
40
+ setTimeout(function () { return !isLongTapActivated.current && (onShortTap === null || onShortTap === void 0 ? void 0 : onShortTap()); }, RENDER_DELAY);
41
+ isLongTapActivated.current = false;
42
+ }, [cancelPressTimer, onShortTap, delay, onPressEnd]);
43
+ var handleTouchMove = useCallback(function (_a) {
44
+ var touches = _a.touches;
45
+ var startPositionCurrent = startPosition.current;
46
+ if (!startPositionCurrent || isLongTapActivated.current || touches.length === 0)
47
+ return;
48
+ var _b = touches[0], clientX = _b.clientX, clientY = _b.clientY;
49
+ var x = startPositionCurrent.x, y = startPositionCurrent.y;
50
+ var deltaX = Math.abs(clientX - x);
51
+ var deltaY = Math.abs(clientY - y);
52
+ if (deltaX > DRAG_THRESHOLD || deltaY > DRAG_THRESHOLD) {
53
+ isMovedBeyondThreshold.current = true;
54
+ cancelPressTimer();
55
+ onDragStart === null || onDragStart === void 0 ? void 0 : onDragStart();
56
+ }
57
+ }, [cancelPressTimer, onDragStart]);
58
+ var handleTouchCancel = useCallback(function () {
59
+ isMovedBeyondThreshold.current = false;
60
+ isLongTapActivated.current = false;
61
+ cancelPressTimer();
62
+ }, [cancelPressTimer]);
63
+ return { startPressTimer: startPressTimer, handleTouchMove: handleTouchMove, handleTouchEnd: handleTouchEnd, handleTouchCancel: handleTouchCancel };
64
+ };
65
+ //# sourceMappingURL=useMobileLongTap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useMobileLongTap.js","sourceRoot":"","sources":["../../../src/hooks/useMobileLongTap.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AACvD,OAAO,EAAE,YAAY,EAAqB,MAAM,cAAc,CAAA;AAW9D,IAAM,cAAc,GAAG,EAAE,CAAA;AACzB,IAAM,sBAAsB,GAAG,GAAG,CAAA;AAElC,MAAM,CAAC,IAAM,gBAAgB,GAAG,UAAC,EAOb;QANlB,aAA8B,EAA9B,KAAK,mBAAG,sBAAsB,KAAA,EAC9B,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,WAAW,iBAAA,EACX,YAAY,kBAAA,EACZ,UAAU,gBAAA;IAEV,IAAM,UAAU,GAAG,MAAM,CAAW,IAAI,CAAC,CAAA;IACzC,IAAM,kBAAkB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IACxC,IAAM,aAAa,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAClD,IAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;IAChC,IAAM,sBAAsB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAE5C,IAAM,eAAe,GAAG,WAAW,CACjC,UAAC,EAAuB;YAArB,OAAO,aAAA;QACF,IAAA,KAA6B,OAAO,CAAC,CAAC,CAAC,EAA5B,CAAC,aAAA,EAAW,CAAC,aAAe,CAAA;QAE7C,sBAAsB,CAAC,OAAO,GAAG,KAAK,CAAA;QACtC,kBAAkB,CAAC,OAAO,GAAG,KAAK,CAAA;QAClC,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,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react';
2
+ import { SheetDetent } from 'react-modal-sheet';
3
+ import { TBottomSheetProps, TBottomSheetScrollMobileConfig, TBottomSheetStyles } from '../сomponents/Modal/types';
4
+ interface IUseModalProps {
5
+ platform?: string;
6
+ isModalOpen: boolean;
7
+ isClosableOutside: boolean;
8
+ isDisabledBottomSheet?: boolean;
9
+ initialIsBottomSheet?: boolean;
10
+ modalRef: RefObject<HTMLDivElement | null>;
11
+ scrollRef?: RefObject<HTMLDivElement | null>;
12
+ popupClassName?: string;
13
+ popupStyles?: React.CSSProperties;
14
+ bottomSheetProps?: TBottomSheetProps;
15
+ bottomSheetStyles?: TBottomSheetStyles;
16
+ bottomSheetDetent?: SheetDetent;
17
+ bottomSheetScrollMobileConfig?: TBottomSheetScrollMobileConfig;
18
+ handleClickOutside?: () => void;
19
+ handleCloseModal: () => void;
20
+ handleBottomSheetInitialized?: () => void;
21
+ }
22
+ export declare const DEFAULT_BOTTOM_SHEET_DETENT = "content";
23
+ export declare const useModal: ({ platform, isModalOpen, isClosableOutside, isDisabledBottomSheet, initialIsBottomSheet, modalRef, scrollRef, popupClassName, popupStyles, bottomSheetProps, bottomSheetStyles, bottomSheetDetent, bottomSheetScrollMobileConfig, handleClickOutside, handleCloseModal, handleBottomSheetInitialized, }: IUseModalProps) => {
24
+ shouldUseBottomSheet: boolean;
25
+ renderModal: (children: React.ReactNode) => import("react/jsx-runtime").JSX.Element | null;
26
+ offsetScrollY: number;
27
+ offsetScrollYKey: number;
28
+ bottomKeyboardPadding: number;
29
+ };
30
+ export {};