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

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 (483) 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-arrow-down.svg +3 -0
  7. package/build/main/assets/icons/avatar-arrow-up.svg +3 -0
  8. package/build/main/assets/icons/avatar-loader.svg +3 -0
  9. package/build/main/assets/icons/button-loader.svg +3 -0
  10. package/build/main/assets/icons/calendar-arrow-next.svg +3 -0
  11. package/build/main/assets/icons/calendar-arrow-prev.svg +3 -0
  12. package/build/main/assets/icons/check-mark-square.svg +4 -0
  13. package/build/main/assets/icons/check-mark.svg +4 -0
  14. package/build/main/assets/icons/chip-info.svg +5 -0
  15. package/build/main/assets/icons/clear.svg +3 -0
  16. package/build/main/assets/icons/close-modal.svg +3 -0
  17. package/build/main/assets/icons/close-stories.svg +4 -0
  18. package/build/main/assets/icons/close.svg +3 -0
  19. package/build/main/assets/icons/contact-info.svg +5 -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/distribution.svg +12 -0
  25. package/build/main/assets/icons/doc-small.svg +11 -0
  26. package/build/main/assets/icons/doc.svg +11 -0
  27. package/build/main/assets/icons/error.svg +5 -0
  28. package/build/main/assets/icons/external-link.svg +3 -0
  29. package/build/main/assets/icons/eye-off.svg +5 -0
  30. package/build/main/assets/icons/eye-on.svg +4 -0
  31. package/build/main/assets/icons/file-small.svg +11 -0
  32. package/build/main/assets/icons/file.svg +11 -0
  33. package/build/main/assets/icons/global-address-book-user.svg +4 -0
  34. package/build/main/assets/icons/group.svg +3 -0
  35. package/build/main/assets/icons/indeterminate-check-mark-square.svg +4 -0
  36. package/build/main/assets/icons/info.svg +5 -0
  37. package/build/main/assets/icons/input-arrow-down.svg +3 -0
  38. package/build/main/assets/icons/input-arrow-up.svg +3 -0
  39. package/build/main/assets/icons/loader.svg +3 -0
  40. package/build/main/assets/icons/logout.svg +4 -0
  41. package/build/main/assets/icons/magnifying-glass.svg +3 -0
  42. package/build/main/assets/icons/mail.svg +3 -0
  43. package/build/main/assets/icons/meeting-room.svg +3 -0
  44. package/build/main/assets/icons/more.svg +3 -0
  45. package/build/main/assets/icons/my-contacts-user.svg +3 -0
  46. package/build/main/assets/icons/needs-action-invite-status.svg +4 -0
  47. package/build/main/assets/icons/notification-close.svg +3 -0
  48. package/build/main/assets/icons/notification-failure.svg +3 -0
  49. package/build/main/assets/icons/notification-info-filled.svg +5 -0
  50. package/build/main/assets/icons/notification-info.svg +5 -0
  51. package/build/main/assets/icons/notification-success-filled.svg +4 -0
  52. package/build/main/assets/icons/notification-success.svg +4 -0
  53. package/build/main/assets/icons/order.svg +6 -0
  54. package/build/main/assets/icons/pdf-small.svg +11 -0
  55. package/build/main/assets/icons/pdf.svg +11 -0
  56. package/build/main/assets/icons/play-small.svg +3 -0
  57. package/build/main/assets/icons/play.svg +3 -0
  58. package/build/main/assets/icons/plus.svg +4 -0
  59. package/build/main/assets/icons/ppt-small.svg +11 -0
  60. package/build/main/assets/icons/ppt.svg +11 -0
  61. package/build/main/assets/icons/private.svg +12 -0
  62. package/build/main/assets/icons/refresh.svg +3 -0
  63. package/build/main/assets/icons/search.svg +3 -0
  64. package/build/main/assets/icons/story-loader.svg +3 -0
  65. package/build/main/assets/icons/tick.svg +10 -0
  66. package/build/main/assets/icons/trash.svg +3 -0
  67. package/build/main/assets/icons/txt-small.svg +11 -0
  68. package/build/main/assets/icons/txt.svg +11 -0
  69. package/build/main/assets/icons/unread-mails.svg +4 -0
  70. package/build/main/assets/icons/warning-avatar.svg +4 -0
  71. package/build/main/assets/icons/xls-small.svg +11 -0
  72. package/build/main/assets/icons/xls.svg +11 -0
  73. package/build/main/assets/storybook/index.d.ts +24 -0
  74. package/build/main/assets/storybook/index.js +25 -0
  75. package/build/main/assets/storybook/index.js.map +1 -0
  76. package/build/main/constants/constants.d.ts +198 -0
  77. package/build/main/constants/constants.js +218 -0
  78. package/build/main/constants/constants.js.map +1 -0
  79. package/build/main/constants/index.d.ts +2 -0
  80. package/build/main/constants/index.js +3 -0
  81. package/build/main/constants/index.js.map +1 -0
  82. package/build/main/constants/types.d.ts +58 -0
  83. package/build/main/constants/types.js +2 -0
  84. package/build/main/constants/types.js.map +1 -0
  85. package/build/main/helpers/index.d.ts +31 -0
  86. package/build/main/helpers/index.js +183 -0
  87. package/build/main/helpers/index.js.map +1 -0
  88. package/build/main/hooks/useLongTap.d.ts +12 -0
  89. package/build/main/hooks/useLongTap.js +29 -0
  90. package/build/main/hooks/useLongTap.js.map +1 -0
  91. package/build/main/hooks/useModal.d.ts +22 -0
  92. package/build/main/hooks/useModal.js +61 -0
  93. package/build/main/hooks/useModal.js.map +1 -0
  94. package/build/main/index.d.ts +36 -0
  95. package/build/main/index.js +37 -0
  96. package/build/main/index.js.map +1 -0
  97. package/build/main/styles/index.d.ts +1 -0
  98. package/build/main/styles/index.js +2 -0
  99. package/build/main/styles/index.js.map +1 -0
  100. package/build/main/styles/main.js +0 -0
  101. package/build/main/styles/styles.scss +14 -0
  102. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
  103. package/build/main//321/201omponents/ActionModal/ActionModal.js +53 -0
  104. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
  105. package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
  106. package/build/main//321/201omponents/ActionModal/index.js +2 -0
  107. package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
  108. package/build/main//321/201omponents/ActionModal/types.d.ts +23 -0
  109. package/build/main//321/201omponents/ActionModal/types.js +2 -0
  110. package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
  111. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
  112. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +146 -0
  113. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
  114. package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
  115. package/build/main//321/201omponents/AttachedFile/index.js +2 -0
  116. package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
  117. package/build/main//321/201omponents/AttachedFile/types.d.ts +22 -0
  118. package/build/main//321/201omponents/AttachedFile/types.js +2 -0
  119. package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
  120. package/build/main//321/201omponents/Avatar/Avatar.d.ts +4 -0
  121. package/build/main//321/201omponents/Avatar/Avatar.js +243 -0
  122. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
  123. package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
  124. package/build/main//321/201omponents/Avatar/index.js +2 -0
  125. package/build/main//321/201omponents/Avatar/index.js.map +1 -0
  126. package/build/main//321/201omponents/Avatar/types.d.ts +61 -0
  127. package/build/main//321/201omponents/Avatar/types.js +29 -0
  128. package/build/main//321/201omponents/Avatar/types.js.map +1 -0
  129. package/build/main//321/201omponents/Button/Button.d.ts +4 -0
  130. package/build/main//321/201omponents/Button/Button.js +62 -0
  131. package/build/main//321/201omponents/Button/Button.js.map +1 -0
  132. package/build/main//321/201omponents/Button/index.d.ts +1 -0
  133. package/build/main//321/201omponents/Button/index.js +2 -0
  134. package/build/main//321/201omponents/Button/index.js.map +1 -0
  135. package/build/main//321/201omponents/Button/types.d.ts +24 -0
  136. package/build/main//321/201omponents/Button/types.js +12 -0
  137. package/build/main//321/201omponents/Button/types.js.map +1 -0
  138. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
  139. package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
  140. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
  141. package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
  142. package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
  143. package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
  144. package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
  145. package/build/main//321/201omponents/CachedImage/index.js +2 -0
  146. package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
  147. package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
  148. package/build/main//321/201omponents/CachedImage/types.js +2 -0
  149. package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
  150. package/build/main//321/201omponents/Calendar/Calendar.d.ts +4 -0
  151. package/build/main//321/201omponents/Calendar/Calendar.js +145 -0
  152. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
  153. package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
  154. package/build/main//321/201omponents/Calendar/index.js +2 -0
  155. package/build/main//321/201omponents/Calendar/index.js.map +1 -0
  156. package/build/main//321/201omponents/Calendar/types.d.ts +15 -0
  157. package/build/main//321/201omponents/Calendar/types.js +2 -0
  158. package/build/main//321/201omponents/Calendar/types.js.map +1 -0
  159. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
  160. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +47 -0
  161. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
  162. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
  163. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
  164. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
  165. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
  166. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +42 -0
  167. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
  168. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
  169. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +64 -0
  170. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
  171. package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
  172. package/build/main//321/201omponents/Charts/colors.js +4 -0
  173. package/build/main//321/201omponents/Charts/colors.js.map +1 -0
  174. package/build/main//321/201omponents/Charts/constants.d.ts +42 -0
  175. package/build/main//321/201omponents/Charts/constants.js +42 -0
  176. package/build/main//321/201omponents/Charts/constants.js.map +1 -0
  177. package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
  178. package/build/main//321/201omponents/Charts/helpers.js +73 -0
  179. package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
  180. package/build/main//321/201omponents/Charts/index.d.ts +3 -0
  181. package/build/main//321/201omponents/Charts/index.js +4 -0
  182. package/build/main//321/201omponents/Charts/index.js.map +1 -0
  183. package/build/main//321/201omponents/Charts/types.d.ts +89 -0
  184. package/build/main//321/201omponents/Charts/types.js +2 -0
  185. package/build/main//321/201omponents/Charts/types.js.map +1 -0
  186. package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
  187. package/build/main//321/201omponents/Charts/useEvents.js +45 -0
  188. package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
  189. package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
  190. package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
  191. package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
  192. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +8 -0
  193. package/build/main//321/201omponents/Checkbox/Checkbox.js +48 -0
  194. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
  195. package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
  196. package/build/main//321/201omponents/Checkbox/index.js +2 -0
  197. package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
  198. package/build/main//321/201omponents/Checkbox/types.d.ts +14 -0
  199. package/build/main//321/201omponents/Checkbox/types.js +2 -0
  200. package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
  201. package/build/main//321/201omponents/Chip/Chip.d.ts +4 -0
  202. package/build/main//321/201omponents/Chip/Chip.js +118 -0
  203. package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
  204. package/build/main//321/201omponents/Chip/index.d.ts +1 -0
  205. package/build/main//321/201omponents/Chip/index.js +2 -0
  206. package/build/main//321/201omponents/Chip/index.js.map +1 -0
  207. package/build/main//321/201omponents/Chip/types.d.ts +28 -0
  208. package/build/main//321/201omponents/Chip/types.js +2 -0
  209. package/build/main//321/201omponents/Chip/types.js.map +1 -0
  210. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
  211. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +63 -0
  212. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
  213. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
  214. package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
  215. package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
  216. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +28 -0
  217. package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
  218. package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
  219. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
  220. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +81 -0
  221. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
  222. package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
  223. package/build/main//321/201omponents/ContextMenu/index.js +2 -0
  224. package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
  225. package/build/main//321/201omponents/ContextMenu/types.d.ts +34 -0
  226. package/build/main//321/201omponents/ContextMenu/types.js +2 -0
  227. package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
  228. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
  229. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +248 -0
  230. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
  231. package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
  232. package/build/main//321/201omponents/CustomSelect/index.js +2 -0
  233. package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
  234. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
  235. package/build/main//321/201omponents/CustomSelect/selectStyles.js +70 -0
  236. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
  237. package/build/main//321/201omponents/CustomSelect/types.d.ts +69 -0
  238. package/build/main//321/201omponents/CustomSelect/types.js +2 -0
  239. package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
  240. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
  241. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +58 -0
  242. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
  243. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
  244. package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
  245. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
  246. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +12 -0
  247. package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
  248. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
  249. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
  250. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
  251. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
  252. package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
  253. package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
  254. package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
  255. package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
  256. package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
  257. package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
  258. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
  259. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +222 -0
  260. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
  261. package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
  262. package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
  263. package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
  264. package/build/main//321/201omponents/DraggablePopup/types.d.ts +90 -0
  265. package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
  266. package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
  267. package/build/main//321/201omponents/Error/Error.d.ts +4 -0
  268. package/build/main//321/201omponents/Error/Error.js +23 -0
  269. package/build/main//321/201omponents/Error/Error.js.map +1 -0
  270. package/build/main//321/201omponents/Error/index.d.ts +1 -0
  271. package/build/main//321/201omponents/Error/index.js +2 -0
  272. package/build/main//321/201omponents/Error/index.js.map +1 -0
  273. package/build/main//321/201omponents/Error/types.d.ts +10 -0
  274. package/build/main//321/201omponents/Error/types.js +2 -0
  275. package/build/main//321/201omponents/Error/types.js.map +1 -0
  276. package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
  277. package/build/main//321/201omponents/Flex/Flex.js +35 -0
  278. package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
  279. package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
  280. package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
  281. package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
  282. package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
  283. package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
  284. package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
  285. package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
  286. package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
  287. package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
  288. package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
  289. package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
  290. package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
  291. package/build/main//321/201omponents/Flex/index.d.ts +3 -0
  292. package/build/main//321/201omponents/Flex/index.js +4 -0
  293. package/build/main//321/201omponents/Flex/index.js.map +1 -0
  294. package/build/main//321/201omponents/Flex/types.d.ts +20 -0
  295. package/build/main//321/201omponents/Flex/types.js +2 -0
  296. package/build/main//321/201omponents/Flex/types.js.map +1 -0
  297. package/build/main//321/201omponents/Header/Header.d.ts +5 -0
  298. package/build/main//321/201omponents/Header/Header.js +125 -0
  299. package/build/main//321/201omponents/Header/Header.js.map +1 -0
  300. package/build/main//321/201omponents/Header/index.d.ts +1 -0
  301. package/build/main//321/201omponents/Header/index.js +2 -0
  302. package/build/main//321/201omponents/Header/index.js.map +1 -0
  303. package/build/main//321/201omponents/Header/types.d.ts +47 -0
  304. package/build/main//321/201omponents/Header/types.js +2 -0
  305. package/build/main//321/201omponents/Header/types.js.map +1 -0
  306. package/build/main//321/201omponents/Input/Input.d.ts +4 -0
  307. package/build/main//321/201omponents/Input/Input.js +182 -0
  308. package/build/main//321/201omponents/Input/Input.js.map +1 -0
  309. package/build/main//321/201omponents/Input/index.d.ts +1 -0
  310. package/build/main//321/201omponents/Input/index.js +2 -0
  311. package/build/main//321/201omponents/Input/index.js.map +1 -0
  312. package/build/main//321/201omponents/Input/types.d.ts +27 -0
  313. package/build/main//321/201omponents/Input/types.js +2 -0
  314. package/build/main//321/201omponents/Input/types.js.map +1 -0
  315. package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
  316. package/build/main//321/201omponents/ListItem/ListItem.js +203 -0
  317. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
  318. package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
  319. package/build/main//321/201omponents/ListItem/index.js +2 -0
  320. package/build/main//321/201omponents/ListItem/index.js.map +1 -0
  321. package/build/main//321/201omponents/ListItem/types.d.ts +41 -0
  322. package/build/main//321/201omponents/ListItem/types.js +2 -0
  323. package/build/main//321/201omponents/ListItem/types.js.map +1 -0
  324. package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
  325. package/build/main//321/201omponents/Loader/Loader.js +44 -0
  326. package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
  327. package/build/main//321/201omponents/Loader/index.d.ts +1 -0
  328. package/build/main//321/201omponents/Loader/index.js +2 -0
  329. package/build/main//321/201omponents/Loader/index.js.map +1 -0
  330. package/build/main//321/201omponents/Loader/types.d.ts +18 -0
  331. package/build/main//321/201omponents/Loader/types.js +2 -0
  332. package/build/main//321/201omponents/Loader/types.js.map +1 -0
  333. package/build/main//321/201omponents/Modal/Modal.d.ts +4 -0
  334. package/build/main//321/201omponents/Modal/Modal.js +261 -0
  335. package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
  336. package/build/main//321/201omponents/Modal/index.d.ts +1 -0
  337. package/build/main//321/201omponents/Modal/index.js +2 -0
  338. package/build/main//321/201omponents/Modal/index.js.map +1 -0
  339. package/build/main//321/201omponents/Modal/types.d.ts +41 -0
  340. package/build/main//321/201omponents/Modal/types.js +2 -0
  341. package/build/main//321/201omponents/Modal/types.js.map +1 -0
  342. package/build/main//321/201omponents/Notification/Notification.d.ts +9 -0
  343. package/build/main//321/201omponents/Notification/Notification.js +231 -0
  344. package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
  345. package/build/main//321/201omponents/Notification/index.d.ts +1 -0
  346. package/build/main//321/201omponents/Notification/index.js +2 -0
  347. package/build/main//321/201omponents/Notification/index.js.map +1 -0
  348. package/build/main//321/201omponents/Notification/types.d.ts +48 -0
  349. package/build/main//321/201omponents/Notification/types.js +2 -0
  350. package/build/main//321/201omponents/Notification/types.js.map +1 -0
  351. package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
  352. package/build/main//321/201omponents/Profile/Profile.js +42 -0
  353. package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
  354. package/build/main//321/201omponents/Profile/index.d.ts +1 -0
  355. package/build/main//321/201omponents/Profile/index.js +2 -0
  356. package/build/main//321/201omponents/Profile/index.js.map +1 -0
  357. package/build/main//321/201omponents/Profile/types.d.ts +14 -0
  358. package/build/main//321/201omponents/Profile/types.js +2 -0
  359. package/build/main//321/201omponents/Profile/types.js.map +1 -0
  360. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
  361. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
  362. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
  363. package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
  364. package/build/main//321/201omponents/ProgressBar/index.js +2 -0
  365. package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
  366. package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
  367. package/build/main//321/201omponents/ProgressBar/types.js +2 -0
  368. package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
  369. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
  370. package/build/main//321/201omponents/RadioButton/RadioButton.js +33 -0
  371. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
  372. package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
  373. package/build/main//321/201omponents/RadioButton/index.js +2 -0
  374. package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
  375. package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
  376. package/build/main//321/201omponents/RadioButton/types.js +2 -0
  377. package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
  378. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
  379. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +140 -0
  380. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
  381. package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
  382. package/build/main//321/201omponents/ScrollBar/index.js +2 -0
  383. package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
  384. package/build/main//321/201omponents/ScrollBar/types.d.ts +24 -0
  385. package/build/main//321/201omponents/ScrollBar/types.js +2 -0
  386. package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
  387. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
  388. package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
  389. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
  390. package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
  391. package/build/main//321/201omponents/Skeleton/index.js +2 -0
  392. package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
  393. package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
  394. package/build/main//321/201omponents/Skeleton/types.js +2 -0
  395. package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
  396. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  397. package/build/main//321/201omponents/Stories/Stories.js +338 -0
  398. package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
  399. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  400. package/build/main//321/201omponents/Stories/index.js +2 -0
  401. package/build/main//321/201omponents/Stories/index.js.map +1 -0
  402. package/build/main//321/201omponents/Stories/types.d.ts +71 -0
  403. package/build/main//321/201omponents/Stories/types.js +16 -0
  404. package/build/main//321/201omponents/Stories/types.js.map +1 -0
  405. package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
  406. package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
  407. package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
  408. package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
  409. package/build/main//321/201omponents/Switcher/index.js +2 -0
  410. package/build/main//321/201omponents/Switcher/index.js.map +1 -0
  411. package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
  412. package/build/main//321/201omponents/Switcher/types.js +2 -0
  413. package/build/main//321/201omponents/Switcher/types.js.map +1 -0
  414. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
  415. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
  416. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
  417. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  418. package/build/main//321/201omponents/SyncLoader/index.js +2 -0
  419. package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
  420. package/build/main//321/201omponents/SyncLoader/types.d.ts +8 -0
  421. package/build/main//321/201omponents/SyncLoader/types.js +2 -0
  422. package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
  423. package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
  424. package/build/main//321/201omponents/Textarea/Textarea.js +59 -0
  425. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
  426. package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
  427. package/build/main//321/201omponents/Textarea/index.js +2 -0
  428. package/build/main//321/201omponents/Textarea/index.js.map +1 -0
  429. package/build/main//321/201omponents/Textarea/types.d.ts +13 -0
  430. package/build/main//321/201omponents/Textarea/types.js +2 -0
  431. package/build/main//321/201omponents/Textarea/types.js.map +1 -0
  432. package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
  433. package/build/main//321/201omponents/Toggle/Toggle.js +35 -0
  434. package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
  435. package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
  436. package/build/main//321/201omponents/Toggle/index.js +2 -0
  437. package/build/main//321/201omponents/Toggle/index.js.map +1 -0
  438. package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
  439. package/build/main//321/201omponents/Toggle/types.js +2 -0
  440. package/build/main//321/201omponents/Toggle/types.js.map +1 -0
  441. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
  442. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +31 -0
  443. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
  444. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
  445. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +88 -0
  446. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
  447. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
  448. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
  449. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
  450. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
  451. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +129 -0
  452. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
  453. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -0
  454. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +137 -0
  455. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
  456. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
  457. package/build/main//321/201omponents/UserDropdown/Option/Option.js +80 -0
  458. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
  459. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
  460. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +44 -0
  461. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
  462. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
  463. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +549 -0
  464. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
  465. package/build/main//321/201omponents/UserDropdown/constants.d.ts +8 -0
  466. package/build/main//321/201omponents/UserDropdown/constants.js +10 -0
  467. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
  468. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +105 -0
  469. package/build/main//321/201omponents/UserDropdown/helpers.js +143 -0
  470. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
  471. package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
  472. package/build/main//321/201omponents/UserDropdown/index.js +2 -0
  473. package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
  474. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
  475. package/build/main//321/201omponents/UserDropdown/selectStyles.js +69 -0
  476. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
  477. package/build/main//321/201omponents/UserDropdown/types.d.ts +269 -0
  478. package/build/main//321/201omponents/UserDropdown/types.js +9 -0
  479. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
  480. package/build/main//321/201omponents/types.d.ts +2 -0
  481. package/build/main//321/201omponents/types.js +2 -0
  482. package/build/main//321/201omponents/types.js.map +1 -0
  483. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ import { isArray, isEmpty } from 'lodash';
2
+ import { isLineChart } from './helpers';
3
+ import { COLORS } from '../../constants';
4
+ import { DISPATCH_ACTION_TYPES } from './constants';
5
+ var black = COLORS.black;
6
+ export var useEvents = function (_a) {
7
+ var chartRef = _a.chartRef, chartType = _a.chartType;
8
+ var getChartInstance = function () { var _a; return (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance(); };
9
+ var getChartOption = function () { var _a; return (_a = getChartInstance()) === null || _a === void 0 ? void 0 : _a.getOption(); };
10
+ var generateAxisLabel = function (label) { return (typeof label === 'object' ? label.value : label); };
11
+ var generateXAxisData = function () {
12
+ var _a;
13
+ var xAxis = (_a = getChartOption()) === null || _a === void 0 ? void 0 : _a.xAxis;
14
+ return isArray(xAxis) && !isEmpty(xAxis) ? xAxis[0].data : [];
15
+ };
16
+ var highlight = function (_a) {
17
+ var batch = _a.batch;
18
+ var chartInstance = getChartInstance();
19
+ var initialXAxisData = generateXAxisData();
20
+ if (batch === null || batch === void 0 ? void 0 : batch.length) {
21
+ var dataIndex_1 = batch[0].dataIndex;
22
+ var xAxisData = initialXAxisData.map(function (label, index) {
23
+ var value = generateAxisLabel(label);
24
+ return index === dataIndex_1 ? { value: value, textStyle: { color: black } } : value;
25
+ });
26
+ chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.setOption({
27
+ xAxis: [
28
+ {
29
+ data: xAxisData,
30
+ formatter: function (label) { return generateAxisLabel(label); },
31
+ },
32
+ ],
33
+ });
34
+ isLineChart(chartType) && (chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.dispatchAction({ type: DISPATCH_ACTION_TYPES.highlight, dataIndex: dataIndex_1 }));
35
+ }
36
+ };
37
+ var downplay = function () {
38
+ var chartInstance = getChartInstance();
39
+ var initialXAxisData = generateXAxisData();
40
+ var xAxisData = initialXAxisData.map(function (label) { return generateAxisLabel(label); });
41
+ chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.setOption({ xAxis: [{ data: xAxisData }] });
42
+ };
43
+ return { highlight: highlight, downplay: downplay };
44
+ };
45
+ //# sourceMappingURL=useEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useEvents.js","sourceRoot":"","sources":["../../../../src/сomponents/Charts/useEvents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAG3C,IAAA,KAAK,GA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E,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAA;YAC7E,CAAC,CAAC,CAAA;YAEF,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,SAAS,CAAC;gBACvB,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,SAAS;wBACf,SAAS,EAAE,UAAC,KAA0B,IAAK,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB;qBACpE;iBACF;aACF,CAAC,CAAA;YAEF,WAAW,CAAC,SAAS,CAAC,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,cAAc,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,SAAS,EAAE,SAAS,aAAA,EAAE,CAAC,CAAA,CAAA;SAC9G;IACH,CAAC,CAAA;IAED,IAAM,QAAQ,GAAG;QACf,IAAM,aAAa,GAAG,gBAAgB,EAAE,CAAA;QACxC,IAAM,gBAAgB,GAAG,iBAAiB,EAAE,CAAA;QAC5C,IAAM,SAAS,GAAG,gBAAgB,CAAC,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,iBAAiB,CAAC,KAAK,CAAC,EAAxB,CAAwB,CAAC,CAAA;QAE3E,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAA;IAC5D,CAAC,CAAA;IAED,OAAO,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,CAAA;AAChC,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { TLegendsChanged, TMouseover, TUsePieEvents } from './types';
2
+ export declare const usePieEvents: ({ chartRef, data }: TUsePieEvents) => {
3
+ legendselectchanged: ({ selected }: TLegendsChanged) => void;
4
+ mouseover: ({ name }: TMouseover) => void;
5
+ mouseout: () => void;
6
+ };
@@ -0,0 +1,57 @@
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 Color from 'color';
13
+ import { isArray, isEmpty } from 'lodash';
14
+ import { calculatePieValue } from './helpers';
15
+ export var usePieEvents = function (_a) {
16
+ var chartRef = _a.chartRef, data = _a.data;
17
+ var getChartInstance = function () { var _a; return (_a = chartRef.current) === null || _a === void 0 ? void 0 : _a.getEchartsInstance(); };
18
+ var getChartOption = function () { var _a; return (_a = getChartInstance()) === null || _a === void 0 ? void 0 : _a.getOption(); };
19
+ var getSeriesData = function () {
20
+ var chartOption = getChartOption();
21
+ var series = chartOption === null || chartOption === void 0 ? void 0 : chartOption.series;
22
+ return isArray(series) && !isEmpty(series) ? series[0].data : [];
23
+ };
24
+ var legendselectchanged = function (_a) {
25
+ var selected = _a.selected;
26
+ var chartInstance = getChartInstance();
27
+ var filteredData = data.filter(function (_a) {
28
+ var name = _a.name;
29
+ return selected[name];
30
+ });
31
+ var subtext = calculatePieValue(filteredData);
32
+ chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.setOption({ title: { subtext: subtext } });
33
+ };
34
+ var mouseover = function (_a) {
35
+ var name = _a.name;
36
+ var chartInstance = getChartInstance();
37
+ var series = getSeriesData();
38
+ var data = series.map(function (dataItem) {
39
+ var dataItemName = dataItem.name, color = dataItem.color;
40
+ var _a = Color(color).rgb().object(), r = _a.r, g = _a.g, b = _a.b;
41
+ var itemStyle = dataItemName === name ? { color: color } : { color: "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(0.65, ")") };
42
+ return __assign(__assign({}, dataItem), { itemStyle: itemStyle });
43
+ });
44
+ chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.setOption({ series: [{ data: data }] });
45
+ };
46
+ var mouseout = function () {
47
+ var chartInstance = getChartInstance();
48
+ var series = getSeriesData();
49
+ var data = series.map(function (dataItem) {
50
+ var color = dataItem.color;
51
+ return __assign(__assign({}, dataItem), { itemStyle: { color: color } });
52
+ });
53
+ chartInstance === null || chartInstance === void 0 ? void 0 : chartInstance.setOption({ series: [{ data: data }] });
54
+ };
55
+ return { legendselectchanged: legendselectchanged, mouseover: mouseover, mouseout: mouseout };
56
+ };
57
+ //# sourceMappingURL=usePieEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePieEvents.js","sourceRoot":"","sources":["../../../../src/сomponents/Charts/usePieEvents.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAG7C,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,EAAiC;QAA/B,QAAQ,cAAA,EAAE,IAAI,UAAA;IAC3C,IAAM,gBAAgB,GAAG,sBAAM,OAAA,MAAA,QAAQ,CAAC,OAAO,0CAAE,kBAAkB,EAAE,CAAA,EAAA,CAAA;IACrE,IAAM,cAAc,GAAG,sBAAM,OAAA,MAAA,gBAAgB,EAAE,0CAAE,SAAS,EAAE,CAAA,EAAA,CAAA;IAE5D,IAAM,aAAa,GAAG;QACpB,IAAM,WAAW,GAAG,cAAc,EAAE,CAAA;QACpC,IAAM,MAAM,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,CAAA;QAClC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;IAClE,CAAC,CAAA;IAED,IAAM,mBAAmB,GAAG,UAAC,EAA6B;YAA3B,QAAQ,cAAA;QACrC,IAAM,aAAa,GA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AgB,EAAE,CAAA;QACxC,IAAM,MAAM,GAAG,aAAa,EAAE,CAAA;QAE9B,IAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,UAAC,QAAmB;YAClC,IAAA,KAAK,GAAK,QAAQ,MAAb,CAAa;YAC1B,6BAAY,QAAQ,KAAE,SAAS,EAAE,EAAE,KAAK,OAAA,EAAE,IAAE;QAC9C,CAAC,CAAC,CAAA;QAEF,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,MAAA,EAAE,CAAC,EAAE,CAAC,CAAA;IAClD,CAAC,CAAA;IAED,OAAO,EAAE,mBAAmB,qBAAA,EAAE,SAAS,WAAA,EAAE,QAAQ,UAAA,EAAE,CAAA;AACrD,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { ICheckBoxProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ export declare enum CHECK_BOX_SHAPE {
4
+ square = "square",
5
+ circle = "circle"
6
+ }
7
+ declare const CheckBox: ({ id, isDisabled, isChecked, isIndeterminate, className, styles, shape, checkedColor, checkedHoverColor, checkedPressedColor, onChange, }: ICheckBoxProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default CheckBox;
@@ -0,0 +1,48 @@
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 { useEffect, useRef } from 'react';
14
+ import classNames from 'classnames';
15
+ import { generateColor } from '../../helpers';
16
+ import { COLORS, EVENT_LISTENER_TYPES } from '../../constants';
17
+ import { ReactComponent as CheckSquareIcon } from '../../assets/icons/check-mark-square.svg';
18
+ import { ReactComponent as CheckIcon } from '../../assets/icons/check-mark.svg';
19
+ import { ReactComponent as IndeterminateCheckSquareIcon } from '../../assets/icons/indeterminate-check-mark-square.svg';
20
+ import '../../styles/styles.scss';
21
+ export var CHECK_BOX_SHAPE;
22
+ (function (CHECK_BOX_SHAPE) {
23
+ CHECK_BOX_SHAPE["square"] = "square";
24
+ CHECK_BOX_SHAPE["circle"] = "circle";
25
+ })(CHECK_BOX_SHAPE || (CHECK_BOX_SHAPE = {}));
26
+ var PRESSED_CLASS_NAME = 'smartapp-check-box__pressed';
27
+ var CheckBox = function (_a) {
28
+ var id = _a.id, _b = _a.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = _a.isChecked, isChecked = _c === void 0 ? false : _c, _d = _a.isIndeterminate, isIndeterminate = _d === void 0 ? false : _d, className = _a.className, _e = _a.styles, styles = _e === void 0 ? {} : _e, _f = _a.shape, shape = _f === void 0 ? CHECK_BOX_SHAPE.square : _f, checkedColor = _a.checkedColor, checkedHoverColor = _a.checkedHoverColor, checkedPressedColor = _a.checkedPressedColor, _g = _a.onChange, onChange = _g === void 0 ? function () { return undefined; } : _g;
29
+ var checkBoxRef = useRef(null);
30
+ var inputId = "cb-".concat(id);
31
+ var iconColorStyle = { color: generateColor(checkedColor, COLORS.buttonPrimary) };
32
+ var isSquareShape = shape === CHECK_BOX_SHAPE.square;
33
+ var checkBoxStyles = __assign({ '--checkbox-hover-color': generateColor(checkedHoverColor, COLORS.buttonPrimaryHover), '--checkbox-pressed-color': generateColor(checkedPressedColor, COLORS.buttonPrimaryPressed) }, styles);
34
+ useEffect(function () {
35
+ window.addEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp);
36
+ return function () { return window.removeEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp); };
37
+ }, []);
38
+ var handleMouseDown = function () { var _a; return (_a = checkBoxRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(PRESSED_CLASS_NAME); };
39
+ var handleMouseUp = function () { var _a; return (_a = checkBoxRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(PRESSED_CLASS_NAME); };
40
+ var handleClick = function (event) { return event.stopPropagation(); };
41
+ var renderSquareCheckIcon = function () {
42
+ return isIndeterminate ? (_jsx(IndeterminateCheckSquareIcon, { style: iconColorStyle, onMouseDown: handleMouseDown })) : (_jsx(CheckSquareIcon, { style: iconColorStyle, onMouseDown: handleMouseDown }));
43
+ };
44
+ var renderCheckIcon = function () { return (isSquareShape ? renderSquareCheckIcon() : _jsx(CheckIcon, { style: iconColorStyle, onMouseDown: handleMouseDown })); };
45
+ return (_jsx("div", __assign({ ref: checkBoxRef, className: classNames('smartapp-check-box', className), style: checkBoxStyles }, { children: _jsxs("label", __assign({ htmlFor: inputId }, { children: [_jsx("input", { id: inputId, type: "checkbox", className: "smartapp-check-box__custom-check-box", disabled: isDisabled, checked: isChecked, onChange: onChange, onClick: handleClick }), isChecked ? renderCheckIcon() : _jsx("span", { className: classNames('checkmark', "checkmark__".concat(shape)), onMouseDown: handleMouseDown })] })) })));
46
+ };
47
+ export default CheckBox;
48
+ //# sourceMappingURL=Checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../src/сomponents/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAiB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE9D,OAAO,EAAE,cAAc,IAAI,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC5F,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAC/E,OAAO,EAAE,cAAc,IAAI,4BAA4B,EAAE,MAAM,wDAAwD,CAAA;AACvH,O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E,WAAW,GACpB,EACD,SAAS,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,eAAM,SAAS,EAAE,UAAU,CAAC,WAAW,EAAE,qBAAc,KAAK,CAAE,CAAC,EAAE,WAAW,EAAE,eAAe,GAAI,KAC5H,IACJ,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,QAAQ,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './Checkbox';
@@ -0,0 +1,2 @@
1
+ export { default } from './Checkbox';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Checkbox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { TStyles } from '../../constants';
2
+ export interface ICheckBoxProps {
3
+ id: string;
4
+ isDisabled?: boolean;
5
+ isChecked?: boolean;
6
+ isIndeterminate?: boolean;
7
+ className?: string;
8
+ styles?: TStyles;
9
+ shape?: 'square' | 'circle';
10
+ checkedColor?: string;
11
+ checkedHoverColor?: string;
12
+ checkedPressedColor?: string;
13
+ onChange?: () => void;
14
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Checkbox/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IChipProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const Chip: ({ fontFamily, language, name, organizerName, email, uid, avatar, isAvatarHidden, isDisabled, isError, isLoading, isWarning, isEye, isMyContacts, isOrganizerShort, isOutline, isOpenContextMenu, userType, inviteStatus, contextMenuItems, className, styles, iconColor, platform, onDelete, setIsOpenContextMenu, }: IChipProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Chip;
@@ -0,0 +1,118 @@
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
+ var _a;
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
15
+ import classNames from 'classnames';
16
+ import { isEmpty } from 'lodash';
17
+ import { useLongTap } from '../../hooks/useLongTap';
18
+ import Avatar from '../Avatar';
19
+ import ContextMenu from '../ContextMenu';
20
+ import Loader from '../Loader';
21
+ import { createSanitizedHtml, generateAvatarIcon, generateColor, generateFontFamilyStyle, isWebPlatform, renderUserIcon } from '../../helpers';
22
+ import { COLORS, EVENT_LISTENER_TYPES, FIT_CONTENT, LANGUAGES, PLATFORM } from '../../constants';
23
+ import { AVATAR_SIZES } from '../Avatar/types';
24
+ import { ReactComponent as ArrowDownIcon } from '../../assets/icons/avatar-arrow-down.svg';
25
+ import { ReactComponent as ArrowUpIcon } from '../../assets/icons/avatar-arrow-up.svg';
26
+ import { ReactComponent as LoaderIcon } from '../../assets/icons/avatar-loader.svg';
27
+ import { ReactComponent as InfoIcon } from '../../assets/icons/chip-info.svg';
28
+ import { ReactComponent as DeleteIcon } from '../../assets/icons/delete-chip.svg';
29
+ import '../../styles/styles.scss';
30
+ var CHIP_HEIGHT = 32;
31
+ var CONTEXT_MENU_INDENT_TOP = 4;
32
+ var CONTEXT_MENU_INDENT = CHIP_HEIGHT + CONTEXT_MENU_INDENT_TOP;
33
+ var CHIP_PRESSED_CLASSNAME = 'smartapp-chip__pressed';
34
+ var DELETE_ICON_PRESSED_CLASSNAME = 'smartapp-chip__right-icons--delete-icon__pressed';
35
+ var ICON_TRANSITION = 'opacity 150ms ease-in-out';
36
+ var OPACITY_VALUES;
37
+ (function (OPACITY_VALUES) {
38
+ OPACITY_VALUES[OPACITY_VALUES["default"] = 1] = "default";
39
+ OPACITY_VALUES[OPACITY_VALUES["loading"] = 0.5] = "loading";
40
+ })(OPACITY_VALUES || (OPACITY_VALUES = {}));
41
+ var ORGANIZER = (_a = {},
42
+ _a[LANGUAGES.ru] = 'организатор',
43
+ _a[LANGUAGES.en] = 'organizer',
44
+ _a[LANGUAGES.de] = 'veranstalter',
45
+ _a[LANGUAGES.es] = 'organizador',
46
+ _a[LANGUAGES.fr] = 'organisateur',
47
+ _a[LANGUAGES.ar] = 'منظم',
48
+ _a[LANGUAGES.ms] = 'pengurus',
49
+ _a[LANGUAGES.tr] = 'düzenleyici',
50
+ _a[LANGUAGES.id] = 'penyelenggara',
51
+ _a[LANGUAGES.uz] = 'tashkilotchi',
52
+ _a);
53
+ var generateLoaderContainerStyles = function () { return ({ background: 'none' }); };
54
+ var generateLoaderStyles = function () { return ({ width: 'fit-content', padding: 0 }); };
55
+ var Chip = function (_a) {
56
+ var fontFamily = _a.fontFamily, _b = _a.language, language = _b === void 0 ? LANGUAGES.ru : _b, name = _a.name, organizerName = _a.organizerName, email = _a.email, uid = _a.uid, avatar = _a.avatar, _c = _a.isAvatarHidden, isAvatarHidden = _c === void 0 ? false : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isError, isError = _e === void 0 ? false : _e, _f = _a.isLoading, isLoading = _f === void 0 ? false : _f, _g = _a.isWarning, isWarning = _g === void 0 ? false : _g, _h = _a.isEye, isEye = _h === void 0 ? false : _h, isMyContacts = _a.isMyContacts, isOrganizerShort = _a.isOrganizerShort, isOutline = _a.isOutline, isOpenContextMenu = _a.isOpenContextMenu, userType = _a.userType, inviteStatus = _a.inviteStatus, contextMenuItems = _a.contextMenuItems, className = _a.className, styles = _a.styles, iconColor = _a.iconColor, _j = _a.platform, platform = _j === void 0 ? PLATFORM.web : _j, onDelete = _a.onDelete, setIsOpenContextMenu = _a.setIsOpenContextMenu;
57
+ var chipRef = useRef(null);
58
+ var deleteIconRef = useRef(null);
59
+ var _k = useState(false), isAvatarArrowVisible = _k[0], setIsAvatarArrowVisible = _k[1];
60
+ var iconOpacity = useMemo(function () { return (isLoading ? OPACITY_VALUES.loading : OPACITY_VALUES.default); }, [isLoading]);
61
+ var iconStyles = { opacity: iconOpacity, transition: ICON_TRANSITION };
62
+ var userIcon = renderUserIcon({ userType: userType, isMyContacts: isMyContacts, style: iconStyles });
63
+ var isContextMenuAvailable = !isEmpty(contextMenuItems);
64
+ var isDeleteIconAvailable = !isDisabled && onDelete;
65
+ useEffect(function () {
66
+ window.addEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp);
67
+ return function () { return window.removeEventListener(EVENT_LISTENER_TYPES.mouseup, handleMouseUp); };
68
+ }, []);
69
+ var generateName = function () {
70
+ if (organizerName)
71
+ return isOrganizerShort ? organizerName : "".concat(organizerName, " <span>(").concat(ORGANIZER[language], ")</span>");
72
+ return name;
73
+ };
74
+ var handleMouseDown = function () { var _a; return !isLoading && isContextMenuAvailable && ((_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(CHIP_PRESSED_CLASSNAME)); };
75
+ var handleMouseEnter = function () { return isContextMenuAvailable && setIsAvatarArrowVisible(true); };
76
+ var handleMouseLeave = function () { return isContextMenuAvailable && setIsAvatarArrowVisible(false); };
77
+ var handleDeleteIconMouseDown = function (event) {
78
+ var _a;
79
+ if (isLoading)
80
+ return;
81
+ event.stopPropagation();
82
+ (_a = deleteIconRef.current) === null || _a === void 0 ? void 0 : _a.classList.add(DELETE_ICON_PRESSED_CLASSNAME);
83
+ };
84
+ var handleMouseUp = function () {
85
+ var _a, _b;
86
+ (_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.classList.remove(CHIP_PRESSED_CLASSNAME);
87
+ (_b = deleteIconRef.current) === null || _b === void 0 ? void 0 : _b.classList.remove(DELETE_ICON_PRESSED_CLASSNAME);
88
+ };
89
+ var handleDeleteClick = function (event) {
90
+ event.stopPropagation();
91
+ event.preventDefault();
92
+ !isLoading && (onDelete === null || onDelete === void 0 ? void 0 : onDelete(name));
93
+ };
94
+ var handleOpenContextMenu = useCallback(function () { return isContextMenuAvailable && !isLoading && (setIsOpenContextMenu === null || setIsOpenContextMenu === void 0 ? void 0 : setIsOpenContextMenu(true)); }, [isContextMenuAvailable, isLoading, setIsOpenContextMenu]);
95
+ var handleCloseContextMenu = function () {
96
+ setIsOpenContextMenu === null || setIsOpenContextMenu === void 0 ? void 0 : setIsOpenContextMenu(false);
97
+ setIsAvatarArrowVisible(false);
98
+ };
99
+ var setContextMenuPosition = useCallback(function () {
100
+ var _a;
101
+ var _b = ((_a = chipRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || {}, _c = _b.left, left = _c === void 0 ? 0 : _c, _d = _b.top, top = _d === void 0 ? 0 : _d;
102
+ return { x: left, y: top + CONTEXT_MENU_INDENT };
103
+ }, [chipRef]);
104
+ var _l = useLongTap({ onLongTap: handleOpenContextMenu }), cancelPressTimer = _l.cancelPressTimer, startPressTimer = _l.startPressTimer;
105
+ var handleContextMenu = function (event) {
106
+ if (!isWebPlatform(platform))
107
+ return;
108
+ event.preventDefault();
109
+ handleOpenContextMenu();
110
+ };
111
+ var renderAvatar = function () {
112
+ return isAvatarArrowVisible || isOpenContextMenu ? (_jsx("div", __assign({ className: classNames('smartapp-chip__info--avatar-arrow', { 'smartapp-chip__info--avatar-arrow__outline': isOutline }) }, { children: isOpenContextMenu ? _jsx(ArrowUpIcon, { color: COLORS.iconAccentPressed }) : _jsx(ArrowDownIcon, { color: COLORS.iconAccent }) }))) : (avatar);
113
+ };
114
+ var contextMenuHeader = (_jsxs("div", __assign({ className: "smartapp-chip__context-menu-header" }, { children: [_jsx(Avatar, { fontFamily: fontFamily, username: name, icon: generateAvatarIcon(userType), avatar: avatar, size: AVATAR_SIZES.size_32, isEye: isEye, outlineDefaultBackground: COLORS.chip }), _jsxs("div", __assign({ className: "smartapp-chip__context-menu-header__content" }, { children: [_jsxs("div", { children: [userIcon, _jsx("span", { children: name })] }), email && _jsx("div", { children: email })] }))] })));
115
+ return (_jsxs("div", __assign({ ref: chipRef, className: classNames('smartapp-chip', { 'smartapp-chip__outline': isOutline, 'smartapp-chip__loading': isLoading }, className), style: __assign(__assign({}, generateFontFamilyStyle(fontFamily)), styles), onContextMenu: handleContextMenu, onTouchStart: !isOpenContextMenu ? startPressTimer : undefined, onTouchEnd: cancelPressTimer, onTouchMove: cancelPressTimer, onMouseDown: handleMouseDown, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, { children: [_jsxs("div", __assign({ className: "smartapp-chip__info" }, { children: [!isAvatarHidden && (_jsx("div", __assign({ className: "smartapp-chip__info--avatar" }, { children: isLoading ? (_jsx(Loader, { icon: _jsx(LoaderIcon, {}), color: COLORS.iconAccent, isLoader: true, iconSize: AVATAR_SIZES.size_20, styles: generateLoaderStyles(), containerStyles: generateLoaderContainerStyles(), isFullScreen: false })) : (_jsx(Avatar, { isTooltipAvailableOnEye: true, language: language, fontFamily: fontFamily, icon: !isAvatarArrowVisible && generateAvatarIcon(userType), username: name, isWarning: isWarning, avatar: renderAvatar(), size: AVATAR_SIZES.size_24, isEye: isEye, inviteStatus: inviteStatus, outlineDefaultBackground: isOutline ? COLORS.colorBgPopUp : COLORS.chip })) }))), userIcon, _jsx("p", { className: classNames('smartapp-chip__info--name', { 'smartapp-chip__info--name__loading': isLoading }), dangerouslySetInnerHTML: createSanitizedHtml(generateName()) })] })), (isError || isDeleteIconAvailable) && (_jsxs("div", __assign({ className: "smartapp-chip__right-icons" }, { children: [isError && _jsx(InfoIcon, { color: COLORS.iconNegative }), isDeleteIconAvailable && (_jsx("div", __assign({ ref: deleteIconRef, className: classNames('smartapp-chip__right-icons--delete-icon', { 'smartapp-chip__right-icons--delete-icon__loading': isLoading }), onClick: handleDeleteClick, onMouseDown: handleDeleteIconMouseDown }, { children: _jsx(DeleteIcon, { style: __assign({ color: generateColor(iconColor) }, iconStyles) }) })))] }))), contextMenuItems && (_jsx(ContextMenu, { isMenuOpen: !!isOpenContextMenu, fontFamily: fontFamily, position: setContextMenuPosition(), closeMenu: handleCloseContextMenu, items: contextMenuItems, actionData: uid || email || name, topSlot: contextMenuHeader, menuStyles: { width: FIT_CONTENT } }))] })));
116
+ };
117
+ export default Chip;
118
+ //# sourceMappingURL=Chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/Chip.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChF,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,WAAW,MAAM,gBAAgB,CAAA;AACxC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,aAAa,EAAE,uBAAuB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9I,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAmB,MAAM,iBAAiB,CAAA;AACjH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,EAAE,cAAc,IAAI,aAAa,EAAE,MAAM,0CAA0C,CAAA;AAC1F,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,wCAAwC,CAAA;AACtF,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,sCAAsC,CAAA;AACnF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,EAAE,cAA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CACrC,wBAAK,SAAS,EAAC,4BAA4B,iBACxC,OAAO,IAAI,KAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,GAAI,EACnD,qBAAqB,IAAI,CACxB,uBACE,GAAG,EAAE,aAAa,EAClB,SAAS,EAAE,UAAU,CAAC,yCAAyC,EAAE,EAAE,kDAAkD,EAAE,SAAS,EAAE,CAAC,EACnI,OAAO,EAAE,iBAAiB,EAC1B,WAAW,EAAE,yBAAyB,gBAEtC,KAAC,UAAU,IAAC,KAAK,aAAI,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,IAAK,UAAU,IAAM,IACrE,CACP,KACG,CACP,EACA,gBAAgB,IAAI,CACnB,KAAC,WAAW,IACV,UAAU,EAAE,CAAC,CAAC,iBAAiB,EAC/B,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,sBAAsB,EAAE,EAClC,SAAS,EAAE,sBAAsB,EACjC,KAAK,EAAE,gBAAgB,EACvB,UAAU,EAAE,GAAG,IAAI,KAAK,IAAI,IAAI,EAChC,OAAO,EAAE,iBAAiB,EAC1B,UAAU,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GAClC,CACH,KACG,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,IAAI,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './Chip';
@@ -0,0 +1,2 @@
1
+ export { default } from './Chip';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { IFontFamilyProps, ILanguageProps, IPlatformProps, TStyles } from '../../constants';
2
+ import { CONTACT_TYPES } from '../UserDropdown/constants';
3
+ import { MenuItem } from '../ContextMenu/types';
4
+ export interface IChipProps extends IFontFamilyProps, IPlatformProps, ILanguageProps {
5
+ name: string;
6
+ organizerName?: string | null;
7
+ email?: string;
8
+ uid?: string;
9
+ avatar?: string;
10
+ isAvatarHidden?: boolean;
11
+ isDisabled?: boolean;
12
+ isError?: boolean;
13
+ isWarning?: boolean;
14
+ isLoading?: boolean;
15
+ isEye?: boolean;
16
+ isMyContacts?: boolean;
17
+ isOrganizerShort?: boolean;
18
+ isOutline?: boolean;
19
+ isOpenContextMenu?: boolean;
20
+ userType?: CONTACT_TYPES;
21
+ inviteStatus?: 'accepted' | 'declined' | 'needsAction';
22
+ className?: string;
23
+ styles?: TStyles;
24
+ iconColor?: string;
25
+ contextMenuItems?: MenuItem[];
26
+ onDelete?: (name?: string) => void;
27
+ setIsOpenContextMenu?: (isOpen: boolean) => void;
28
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Chip/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IConfirmationModalProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const ConfirmationModal: ({ isModalOpen, isClosableOutside, isConfirmLoading, isCancelLoading, isCloseIconHidden, title, text, cancelButtonName, confirmButtonName, cancelButtonFunction, confirmButtonFunction, handleCloseModal, platform, fontFamily, popupClassName, className, popupStyles, styles, titleStyles, iconColor, backgroundColor, buttonsDirection, isBottomSheet, isDisabledBottomSheet, bottomSheetProps, }: IConfirmationModalProps) => import("react/jsx-runtime").JSX.Element | null;
4
+ export default ConfirmationModal;
@@ -0,0 +1,63 @@
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 { useEffect, useRef } from 'react';
14
+ import classNames from 'classnames';
15
+ import { useModal } from '../../hooks/useModal';
16
+ import Button from '../Button';
17
+ import { generateBottomSheetClassName, generateClassNames, generateColor, generateFontFamilyStyle, generateIsCloseIconHidden, renderCloseIconSpace, } from '../../helpers';
18
+ import { COLORS, EVENT_LISTENER_TYPES, MODAL_BUTTONS_DIRECTION, PLATFORM } from '../../constants';
19
+ import { TButtonVariant } from '../Button/types';
20
+ import { ReactComponent as CloseIcon } from '../../assets/icons/close-modal.svg';
21
+ import '../../styles/styles.scss';
22
+ var ConfirmationModal = function (_a) {
23
+ var isModalOpen = _a.isModalOpen, _b = _a.isClosableOutside, isClosableOutside = _b === void 0 ? true : _b, _c = _a.isConfirmLoading, isConfirmLoading = _c === void 0 ? false : _c, _d = _a.isCancelLoading, isCancelLoading = _d === void 0 ? false : _d, isCloseIconHidden = _a.isCloseIconHidden, title = _a.title, text = _a.text, cancelButtonName = _a.cancelButtonName, confirmButtonName = _a.confirmButtonName, cancelButtonFunction = _a.cancelButtonFunction, confirmButtonFunction = _a.confirmButtonFunction, handleCloseModal = _a.handleCloseModal, _e = _a.platform, platform = _e === void 0 ? PLATFORM.web : _e, fontFamily = _a.fontFamily, popupClassName = _a.popupClassName, className = _a.className, popupStyles = _a.popupStyles, styles = _a.styles, titleStyles = _a.titleStyles, iconColor = _a.iconColor, backgroundColor = _a.backgroundColor, _f = _a.buttonsDirection, buttonsDirection = _f === void 0 ? MODAL_BUTTONS_DIRECTION.row : _f, _g = _a.isBottomSheet, isBottomSheet = _g === void 0 ? false : _g, _h = _a.isDisabledBottomSheet, isDisabledBottomSheet = _h === void 0 ? false : _h, bottomSheetProps = _a.bottomSheetProps;
24
+ var ref = useRef(null);
25
+ var titleRef = useRef(null);
26
+ var textRef = useRef(null);
27
+ var closeIconRef = useRef(null);
28
+ var background = generateColor(backgroundColor, COLORS.colorBgBlackoutTransparent);
29
+ var isCloseIconInvisible = generateIsCloseIconHidden(platform, isCloseIconHidden);
30
+ var cancelFunction = handleCloseModal || cancelButtonFunction;
31
+ var popupOverlayStyle = __assign({ '--confirmation-modal-background': background }, popupStyles);
32
+ var _j = useModal({
33
+ isModalOpen: isModalOpen,
34
+ platform: platform,
35
+ isDisabledBottomSheet: isDisabledBottomSheet,
36
+ initialIsBottomSheet: isBottomSheet,
37
+ modalRef: ref,
38
+ isClosableOutside: isClosableOutside,
39
+ handleCloseModal: cancelFunction,
40
+ popupClassName: classNames('confirmation-modal', popupClassName),
41
+ popupStyles: popupOverlayStyle,
42
+ bottomSheetStyles: { '--rsbs-backdrop-bg': background },
43
+ bottomSheetProps: bottomSheetProps,
44
+ }), shouldUseBottomSheet = _j.shouldUseBottomSheet, renderModal = _j.renderModal;
45
+ var additionalClassName = generateBottomSheetClassName(platform, shouldUseBottomSheet);
46
+ useEffect(function () {
47
+ var checkIfClickedOutside = function (_a) {
48
+ var target = _a.target;
49
+ var refCurrent = ref.current;
50
+ if (isModalOpen && isClosableOutside && refCurrent && !refCurrent.contains(target))
51
+ cancelFunction();
52
+ };
53
+ document === null || document === void 0 ? void 0 : document.addEventListener(EVENT_LISTENER_TYPES.click, checkIfClickedOutside, true);
54
+ return function () { return document === null || document === void 0 ? void 0 : document.removeEventListener(EVENT_LISTENER_TYPES.click, checkIfClickedOutside, true); };
55
+ // eslint-disable-next-line react-hooks/exhaustive-deps
56
+ }, [isModalOpen, isClosableOutside]);
57
+ var modalContent = (_jsx("div", __assign({ ref: ref, className: classNames('smartapp-confirmation-modal', { 'smartapp-confirmation-modal__bottom-sheet': shouldUseBottomSheet }, className), style: __assign(__assign({}, generateFontFamilyStyle(fontFamily)), styles) }, { children: _jsxs("div", __assign({ className: generateClassNames({ className: 'smartapp-confirmation-modal__content', delimiter: '--', additionalClassName: additionalClassName }) }, { children: [title && (_jsxs("div", { children: [!isCloseIconInvisible && renderCloseIconSpace({ elementRef: titleRef, closeIconRef: closeIconRef }), _jsx("p", __assign({ ref: titleRef, className: "smartapp-confirmation-modal__content--title", style: titleStyles }, { children: title }))] })), !isCloseIconInvisible && (_jsx("div", __assign({ ref: closeIconRef, onClick: cancelFunction, className: "smartapp-close-modal-icon" }, { children: _jsx(CloseIcon, { style: { color: generateColor(iconColor) } }) }))), _jsxs("div", { children: [!title && !isCloseIconInvisible && renderCloseIconSpace({ elementRef: textRef, closeIconRef: closeIconRef, isContent: true }), _jsx("span", __assign({ ref: textRef, className: "smartapp-confirmation-modal__content--text" }, { children: text }))] }), _jsxs("div", __assign({ className: classNames("smartapp-confirmation-modal__content--buttons smartapp-confirmation-modal__content--buttons__".concat(platform), {
58
+ 'smartapp-confirmation-modal__content--buttons__column-reverse': buttonsDirection === MODAL_BUTTONS_DIRECTION.column,
59
+ }) }, { children: [cancelButtonName && (_jsx(Button, { fontFamily: fontFamily, title: cancelButtonName, isWaitingResponse: isCancelLoading, variant: TButtonVariant.secondary, onClick: cancelButtonFunction, disabled: isConfirmLoading })), _jsx(Button, { fontFamily: fontFamily, isWaitingResponse: isConfirmLoading, title: confirmButtonName, onClick: confirmButtonFunction, disabled: isCancelLoading })] }))] })) })));
60
+ return renderModal(modalContent);
61
+ };
62
+ export default ConfirmationModal;
63
+ //# sourceMappingURL=ConfirmationModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationModal.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/ConfirmationModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAiB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EAClB,aAAa,EACb,uBAAuB,EACvB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,M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AM;qBACrH,CAAC,iBAED,gBAAgB,IAAI,CACnB,KAAC,MAAM,IACL,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,gBAAgB,EACvB,iBAAiB,EAAE,eAAe,EAClC,OAAO,EAAE,cAAc,CAAC,SAAS,EACjC,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,gBAAgB,GAC1B,CACH,EACD,KAAC,MAAM,IACL,UAAU,EAAE,UAAU,EACtB,iBAAiB,EAAE,gBAAgB,EACnC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,eAAe,GACzB,KACE,KACF,IACF,CACP,CAAA;IAED,OAAO,WAAW,CAAC,YAAY,CAAC,CAAA;AAClC,CAAC,CAAA;AAED,eAAe,iBAAiB,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './ConfirmationModal';
@@ -0,0 +1,2 @@
1
+ export { default } from './ConfirmationModal';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ import { BottomSheetProps } from 'alex.chus-react-spring-bottom-sheet';
3
+ import { IFontFamilyProps, IPlatformProps, TStyles } from '../../constants';
4
+ export interface IConfirmationModalProps extends IPlatformProps, IFontFamilyProps {
5
+ isModalOpen: boolean;
6
+ isClosableOutside?: boolean;
7
+ isCloseIconHidden?: boolean;
8
+ isConfirmLoading?: boolean;
9
+ isCancelLoading?: boolean;
10
+ title?: string;
11
+ text: ReactNode;
12
+ cancelButtonName?: string;
13
+ confirmButtonName: string;
14
+ cancelButtonFunction: () => void;
15
+ confirmButtonFunction: (option?: any) => void;
16
+ handleCloseModal?: () => void;
17
+ popupClassName?: string;
18
+ className?: string;
19
+ popupStyles?: TStyles;
20
+ styles?: TStyles;
21
+ titleStyles?: TStyles;
22
+ iconColor?: string;
23
+ backgroundColor?: string;
24
+ buttonsDirection?: 'row' | 'column';
25
+ isBottomSheet?: boolean;
26
+ isDisabledBottomSheet?: boolean;
27
+ bottomSheetProps?: Partial<BottomSheetProps>;
28
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/ConfirmationModal/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IContextMenuProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const ContextMenu: <T>({ fontFamily, isMenuOpen, isClickForbidden, isCloseOnItemClick, position: { x, y }, menuWidth, containerClassName, menuClassName, itemClassName, containerStyles, menuStyles, itemStyles, items, closeMenu, platform, actionData, topSlot, }: IContextMenuProps<T>) => import("react/jsx-runtime").JSX.Element | null;
4
+ export default ContextMenu;