@expressms/smartapp-ui 2.9.4-alpha.1 → 2.9.4-alpha.2

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 (458) hide show
  1. package/build/main/assets/icons/arrow-back.svg +3 -0
  2. package/build/main/assets/icons/arrow-down.svg +3 -0
  3. package/build/main/assets/icons/arrow-up.svg +3 -0
  4. package/build/main/assets/icons/attachment-loader.svg +3 -0
  5. package/build/main/assets/icons/button-loader.svg +3 -0
  6. package/build/main/assets/icons/cancel-cross.svg +3 -0
  7. package/build/main/assets/icons/check-mark.svg +4 -0
  8. package/build/main/assets/icons/clear.svg +3 -0
  9. package/build/main/assets/icons/close-stories.svg +4 -0
  10. package/build/main/assets/icons/close.svg +10 -0
  11. package/build/main/assets/icons/contact-info.svg +12 -0
  12. package/build/main/assets/icons/corporate-user.svg +10 -0
  13. package/build/main/assets/icons/crown.svg +5 -0
  14. package/build/main/assets/icons/delete-chip.svg +3 -0
  15. package/build/main/assets/icons/distribution.svg +12 -0
  16. package/build/main/assets/icons/download.svg +4 -0
  17. package/build/main/assets/icons/error.svg +5 -0
  18. package/build/main/assets/icons/external-link.svg +3 -0
  19. package/build/main/assets/icons/eye-off.svg +10 -0
  20. package/build/main/assets/icons/eye.svg +10 -0
  21. package/build/main/assets/icons/file.svg +3 -0
  22. package/build/main/assets/icons/group.svg +3 -0
  23. package/build/main/assets/icons/info.svg +5 -0
  24. package/build/main/assets/icons/loader.svg +3 -0
  25. package/build/main/assets/icons/logout.svg +4 -0
  26. package/build/main/assets/icons/magnifying-glass.svg +3 -0
  27. package/build/main/assets/icons/mail.svg +3 -0
  28. package/build/main/assets/icons/meeting-room.svg +3 -0
  29. package/build/main/assets/icons/meeting-rooms-list.svg +5 -0
  30. package/build/main/assets/icons/more.svg +3 -0
  31. package/build/main/assets/icons/my-contact-user.svg +10 -0
  32. package/build/main/assets/icons/notification-close.svg +3 -0
  33. package/build/main/assets/icons/notification-error.svg +3 -0
  34. package/build/main/assets/icons/notification-failure.svg +3 -0
  35. package/build/main/assets/icons/notification-info.svg +5 -0
  36. package/build/main/assets/icons/notification-success.svg +4 -0
  37. package/build/main/assets/icons/notification-warning.svg +5 -0
  38. package/build/main/assets/icons/order.svg +6 -0
  39. package/build/main/assets/icons/plus.svg +4 -0
  40. package/build/main/assets/icons/private.svg +12 -0
  41. package/build/main/assets/icons/refresh.svg +3 -0
  42. package/build/main/assets/icons/search.svg +3 -0
  43. package/build/main/assets/icons/story-loader.svg +3 -0
  44. package/build/main/assets/icons/tick.svg +10 -0
  45. package/build/main/assets/icons/trash.svg +3 -0
  46. package/build/main/assets/icons/unread-mails.svg +4 -0
  47. package/build/main/assets/icons/warning-avatar.svg +4 -0
  48. package/build/main/assets/storybook/index.d.ts +22 -0
  49. package/build/main/assets/storybook/index.js +23 -0
  50. package/build/main/assets/storybook/index.js.map +1 -0
  51. package/build/main/constants/constants.d.ts +158 -0
  52. package/build/main/constants/constants.js +178 -0
  53. package/build/main/constants/constants.js.map +1 -0
  54. package/build/main/constants/index.d.ts +2 -0
  55. package/build/main/constants/index.js +3 -0
  56. package/build/main/constants/index.js.map +1 -0
  57. package/build/main/constants/types.d.ts +29 -0
  58. package/build/main/constants/types.js +2 -0
  59. package/build/main/constants/types.js.map +1 -0
  60. package/build/main/helpers/index.d.ts +25 -0
  61. package/build/main/helpers/index.js +113 -0
  62. package/build/main/helpers/index.js.map +1 -0
  63. package/build/main/hooks/useLongTap.d.ts +12 -0
  64. package/build/main/hooks/useLongTap.js +29 -0
  65. package/build/main/hooks/useLongTap.js.map +1 -0
  66. package/build/main/hooks/useModal.d.ts +21 -0
  67. package/build/main/hooks/useModal.js +60 -0
  68. package/build/main/hooks/useModal.js.map +1 -0
  69. package/build/main/index.d.ts +36 -0
  70. package/build/main/index.js +37 -0
  71. package/build/main/index.js.map +1 -0
  72. package/build/main/styles/index.d.ts +1 -0
  73. package/build/main/styles/index.js +2 -0
  74. package/build/main/styles/index.js.map +1 -0
  75. package/build/main/styles/main.js +0 -0
  76. package/build/main/styles/styles.scss +14 -0
  77. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +4 -0
  78. package/build/main//321/201omponents/ActionModal/ActionModal.js +55 -0
  79. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +1 -0
  80. package/build/main//321/201omponents/ActionModal/index.d.ts +1 -0
  81. package/build/main//321/201omponents/ActionModal/index.js +2 -0
  82. package/build/main//321/201omponents/ActionModal/index.js.map +1 -0
  83. package/build/main//321/201omponents/ActionModal/types.d.ts +24 -0
  84. package/build/main//321/201omponents/ActionModal/types.js +2 -0
  85. package/build/main//321/201omponents/ActionModal/types.js.map +1 -0
  86. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +8 -0
  87. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +60 -0
  88. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +1 -0
  89. package/build/main//321/201omponents/AttachedFile/index.d.ts +1 -0
  90. package/build/main//321/201omponents/AttachedFile/index.js +2 -0
  91. package/build/main//321/201omponents/AttachedFile/index.js.map +1 -0
  92. package/build/main//321/201omponents/AttachedFile/types.d.ts +25 -0
  93. package/build/main//321/201omponents/AttachedFile/types.js +2 -0
  94. package/build/main//321/201omponents/AttachedFile/types.js.map +1 -0
  95. package/build/main//321/201omponents/Avatar/Avatar.d.ts +4 -0
  96. package/build/main//321/201omponents/Avatar/Avatar.js +150 -0
  97. package/build/main//321/201omponents/Avatar/Avatar.js.map +1 -0
  98. package/build/main//321/201omponents/Avatar/index.d.ts +1 -0
  99. package/build/main//321/201omponents/Avatar/index.js +2 -0
  100. package/build/main//321/201omponents/Avatar/index.js.map +1 -0
  101. package/build/main//321/201omponents/Avatar/types.d.ts +59 -0
  102. package/build/main//321/201omponents/Avatar/types.js +29 -0
  103. package/build/main//321/201omponents/Avatar/types.js.map +1 -0
  104. package/build/main//321/201omponents/Button/Button.d.ts +4 -0
  105. package/build/main//321/201omponents/Button/Button.js +63 -0
  106. package/build/main//321/201omponents/Button/Button.js.map +1 -0
  107. package/build/main//321/201omponents/Button/index.d.ts +1 -0
  108. package/build/main//321/201omponents/Button/index.js +2 -0
  109. package/build/main//321/201omponents/Button/index.js.map +1 -0
  110. package/build/main//321/201omponents/Button/types.d.ts +28 -0
  111. package/build/main//321/201omponents/Button/types.js +11 -0
  112. package/build/main//321/201omponents/Button/types.js.map +1 -0
  113. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +4 -0
  114. package/build/main//321/201omponents/CachedImage/CachedImage.js +59 -0
  115. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +1 -0
  116. package/build/main//321/201omponents/CachedImage/helpers.d.ts +3 -0
  117. package/build/main//321/201omponents/CachedImage/helpers.js +40 -0
  118. package/build/main//321/201omponents/CachedImage/helpers.js.map +1 -0
  119. package/build/main//321/201omponents/CachedImage/index.d.ts +1 -0
  120. package/build/main//321/201omponents/CachedImage/index.js +2 -0
  121. package/build/main//321/201omponents/CachedImage/index.js.map +1 -0
  122. package/build/main//321/201omponents/CachedImage/types.d.ts +10 -0
  123. package/build/main//321/201omponents/CachedImage/types.js +2 -0
  124. package/build/main//321/201omponents/CachedImage/types.js.map +1 -0
  125. package/build/main//321/201omponents/Calendar/Calendar.d.ts +4 -0
  126. package/build/main//321/201omponents/Calendar/Calendar.js +97 -0
  127. package/build/main//321/201omponents/Calendar/Calendar.js.map +1 -0
  128. package/build/main//321/201omponents/Calendar/index.d.ts +1 -0
  129. package/build/main//321/201omponents/Calendar/index.js +2 -0
  130. package/build/main//321/201omponents/Calendar/index.js.map +1 -0
  131. package/build/main//321/201omponents/Calendar/types.d.ts +13 -0
  132. package/build/main//321/201omponents/Calendar/types.js +2 -0
  133. package/build/main//321/201omponents/Calendar/types.js.map +1 -0
  134. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +4 -0
  135. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +46 -0
  136. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +1 -0
  137. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +4 -0
  138. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +71 -0
  139. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +1 -0
  140. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +4 -0
  141. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +41 -0
  142. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +1 -0
  143. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +4 -0
  144. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +63 -0
  145. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +1 -0
  146. package/build/main//321/201omponents/Charts/colors.d.ts +3 -0
  147. package/build/main//321/201omponents/Charts/colors.js +4 -0
  148. package/build/main//321/201omponents/Charts/colors.js.map +1 -0
  149. package/build/main//321/201omponents/Charts/constants.d.ts +46 -0
  150. package/build/main//321/201omponents/Charts/constants.js +43 -0
  151. package/build/main//321/201omponents/Charts/constants.js.map +1 -0
  152. package/build/main//321/201omponents/Charts/helpers.d.ts +17 -0
  153. package/build/main//321/201omponents/Charts/helpers.js +73 -0
  154. package/build/main//321/201omponents/Charts/helpers.js.map +1 -0
  155. package/build/main//321/201omponents/Charts/index.d.ts +3 -0
  156. package/build/main//321/201omponents/Charts/index.js +4 -0
  157. package/build/main//321/201omponents/Charts/index.js.map +1 -0
  158. package/build/main//321/201omponents/Charts/types.d.ts +88 -0
  159. package/build/main//321/201omponents/Charts/types.js +2 -0
  160. package/build/main//321/201omponents/Charts/types.js.map +1 -0
  161. package/build/main//321/201omponents/Charts/useEvents.d.ts +5 -0
  162. package/build/main//321/201omponents/Charts/useEvents.js +45 -0
  163. package/build/main//321/201omponents/Charts/useEvents.js.map +1 -0
  164. package/build/main//321/201omponents/Charts/usePieEvents.d.ts +6 -0
  165. package/build/main//321/201omponents/Charts/usePieEvents.js +57 -0
  166. package/build/main//321/201omponents/Charts/usePieEvents.js.map +1 -0
  167. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +4 -0
  168. package/build/main//321/201omponents/Checkbox/Checkbox.js +38 -0
  169. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +1 -0
  170. package/build/main//321/201omponents/Checkbox/index.d.ts +1 -0
  171. package/build/main//321/201omponents/Checkbox/index.js +2 -0
  172. package/build/main//321/201omponents/Checkbox/index.js.map +1 -0
  173. package/build/main//321/201omponents/Checkbox/types.d.ts +12 -0
  174. package/build/main//321/201omponents/Checkbox/types.js +2 -0
  175. package/build/main//321/201omponents/Checkbox/types.js.map +1 -0
  176. package/build/main//321/201omponents/Chip/Chip.d.ts +4 -0
  177. package/build/main//321/201omponents/Chip/Chip.js +65 -0
  178. package/build/main//321/201omponents/Chip/Chip.js.map +1 -0
  179. package/build/main//321/201omponents/Chip/index.d.ts +1 -0
  180. package/build/main//321/201omponents/Chip/index.js +2 -0
  181. package/build/main//321/201omponents/Chip/index.js.map +1 -0
  182. package/build/main//321/201omponents/Chip/types.d.ts +21 -0
  183. package/build/main//321/201omponents/Chip/types.js +2 -0
  184. package/build/main//321/201omponents/Chip/types.js.map +1 -0
  185. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +4 -0
  186. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +70 -0
  187. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +1 -0
  188. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +1 -0
  189. package/build/main//321/201omponents/ConfirmationModal/index.js +2 -0
  190. package/build/main//321/201omponents/ConfirmationModal/index.js.map +1 -0
  191. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +28 -0
  192. package/build/main//321/201omponents/ConfirmationModal/types.js +2 -0
  193. package/build/main//321/201omponents/ConfirmationModal/types.js.map +1 -0
  194. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +4 -0
  195. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +81 -0
  196. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +1 -0
  197. package/build/main//321/201omponents/ContextMenu/index.d.ts +1 -0
  198. package/build/main//321/201omponents/ContextMenu/index.js +2 -0
  199. package/build/main//321/201omponents/ContextMenu/index.js.map +1 -0
  200. package/build/main//321/201omponents/ContextMenu/types.d.ts +34 -0
  201. package/build/main//321/201omponents/ContextMenu/types.js +2 -0
  202. package/build/main//321/201omponents/ContextMenu/types.js.map +1 -0
  203. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +12 -0
  204. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +243 -0
  205. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +1 -0
  206. package/build/main//321/201omponents/CustomSelect/index.d.ts +1 -0
  207. package/build/main//321/201omponents/CustomSelect/index.js +2 -0
  208. package/build/main//321/201omponents/CustomSelect/index.js.map +1 -0
  209. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +16 -0
  210. package/build/main//321/201omponents/CustomSelect/selectStyles.js +67 -0
  211. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +1 -0
  212. package/build/main//321/201omponents/CustomSelect/types.d.ts +64 -0
  213. package/build/main//321/201omponents/CustomSelect/types.js +2 -0
  214. package/build/main//321/201omponents/CustomSelect/types.js.map +1 -0
  215. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +4 -0
  216. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +58 -0
  217. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +1 -0
  218. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +1 -0
  219. package/build/main//321/201omponents/CustomSelectProfiles/index.js +2 -0
  220. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +1 -0
  221. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +12 -0
  222. package/build/main//321/201omponents/CustomSelectProfiles/types.js +2 -0
  223. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +1 -0
  224. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +4 -0
  225. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +57 -0
  226. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +1 -0
  227. package/build/main//321/201omponents/DragAndDrop/index.d.ts +1 -0
  228. package/build/main//321/201omponents/DragAndDrop/index.js +2 -0
  229. package/build/main//321/201omponents/DragAndDrop/index.js.map +1 -0
  230. package/build/main//321/201omponents/DragAndDrop/types.d.ts +24 -0
  231. package/build/main//321/201omponents/DragAndDrop/types.js +2 -0
  232. package/build/main//321/201omponents/DragAndDrop/types.js.map +1 -0
  233. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +4 -0
  234. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +223 -0
  235. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +1 -0
  236. package/build/main//321/201omponents/DraggablePopup/index.d.ts +1 -0
  237. package/build/main//321/201omponents/DraggablePopup/index.js +2 -0
  238. package/build/main//321/201omponents/DraggablePopup/index.js.map +1 -0
  239. package/build/main//321/201omponents/DraggablePopup/types.d.ts +88 -0
  240. package/build/main//321/201omponents/DraggablePopup/types.js +2 -0
  241. package/build/main//321/201omponents/DraggablePopup/types.js.map +1 -0
  242. package/build/main//321/201omponents/Error/Error.d.ts +4 -0
  243. package/build/main//321/201omponents/Error/Error.js +23 -0
  244. package/build/main//321/201omponents/Error/Error.js.map +1 -0
  245. package/build/main//321/201omponents/Error/index.d.ts +1 -0
  246. package/build/main//321/201omponents/Error/index.js +2 -0
  247. package/build/main//321/201omponents/Error/index.js.map +1 -0
  248. package/build/main//321/201omponents/Error/types.d.ts +10 -0
  249. package/build/main//321/201omponents/Error/types.js +2 -0
  250. package/build/main//321/201omponents/Error/types.js.map +1 -0
  251. package/build/main//321/201omponents/Flex/Flex.d.ts +2 -0
  252. package/build/main//321/201omponents/Flex/Flex.js +49 -0
  253. package/build/main//321/201omponents/Flex/Flex.js.map +1 -0
  254. package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +5 -0
  255. package/build/main//321/201omponents/Flex/HFlex/HFlex.js +16 -0
  256. package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +1 -0
  257. package/build/main//321/201omponents/Flex/HFlex/index.d.ts +1 -0
  258. package/build/main//321/201omponents/Flex/HFlex/index.js +2 -0
  259. package/build/main//321/201omponents/Flex/HFlex/index.js.map +1 -0
  260. package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +5 -0
  261. package/build/main//321/201omponents/Flex/VFlex/VFlex.js +16 -0
  262. package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +1 -0
  263. package/build/main//321/201omponents/Flex/VFlex/index.d.ts +1 -0
  264. package/build/main//321/201omponents/Flex/VFlex/index.js +2 -0
  265. package/build/main//321/201omponents/Flex/VFlex/index.js.map +1 -0
  266. package/build/main//321/201omponents/Flex/index.d.ts +3 -0
  267. package/build/main//321/201omponents/Flex/index.js +4 -0
  268. package/build/main//321/201omponents/Flex/index.js.map +1 -0
  269. package/build/main//321/201omponents/Flex/types.d.ts +15 -0
  270. package/build/main//321/201omponents/Flex/types.js +2 -0
  271. package/build/main//321/201omponents/Flex/types.js.map +1 -0
  272. package/build/main//321/201omponents/Header/Header.d.ts +5 -0
  273. package/build/main//321/201omponents/Header/Header.js +125 -0
  274. package/build/main//321/201omponents/Header/Header.js.map +1 -0
  275. package/build/main//321/201omponents/Header/index.d.ts +1 -0
  276. package/build/main//321/201omponents/Header/index.js +2 -0
  277. package/build/main//321/201omponents/Header/index.js.map +1 -0
  278. package/build/main//321/201omponents/Header/types.d.ts +46 -0
  279. package/build/main//321/201omponents/Header/types.js +2 -0
  280. package/build/main//321/201omponents/Header/types.js.map +1 -0
  281. package/build/main//321/201omponents/Input/Input.d.ts +4 -0
  282. package/build/main//321/201omponents/Input/Input.js +207 -0
  283. package/build/main//321/201omponents/Input/Input.js.map +1 -0
  284. package/build/main//321/201omponents/Input/index.d.ts +1 -0
  285. package/build/main//321/201omponents/Input/index.js +2 -0
  286. package/build/main//321/201omponents/Input/index.js.map +1 -0
  287. package/build/main//321/201omponents/Input/types.d.ts +29 -0
  288. package/build/main//321/201omponents/Input/types.js +2 -0
  289. package/build/main//321/201omponents/Input/types.js.map +1 -0
  290. package/build/main//321/201omponents/ListItem/ListItem.d.ts +23 -0
  291. package/build/main//321/201omponents/ListItem/ListItem.js +208 -0
  292. package/build/main//321/201omponents/ListItem/ListItem.js.map +1 -0
  293. package/build/main//321/201omponents/ListItem/index.d.ts +1 -0
  294. package/build/main//321/201omponents/ListItem/index.js +2 -0
  295. package/build/main//321/201omponents/ListItem/index.js.map +1 -0
  296. package/build/main//321/201omponents/ListItem/types.d.ts +42 -0
  297. package/build/main//321/201omponents/ListItem/types.js +2 -0
  298. package/build/main//321/201omponents/ListItem/types.js.map +1 -0
  299. package/build/main//321/201omponents/Loader/Loader.d.ts +4 -0
  300. package/build/main//321/201omponents/Loader/Loader.js +44 -0
  301. package/build/main//321/201omponents/Loader/Loader.js.map +1 -0
  302. package/build/main//321/201omponents/Loader/index.d.ts +1 -0
  303. package/build/main//321/201omponents/Loader/index.js +2 -0
  304. package/build/main//321/201omponents/Loader/index.js.map +1 -0
  305. package/build/main//321/201omponents/Loader/types.d.ts +18 -0
  306. package/build/main//321/201omponents/Loader/types.js +2 -0
  307. package/build/main//321/201omponents/Loader/types.js.map +1 -0
  308. package/build/main//321/201omponents/Modal/Modal.d.ts +4 -0
  309. package/build/main//321/201omponents/Modal/Modal.js +147 -0
  310. package/build/main//321/201omponents/Modal/Modal.js.map +1 -0
  311. package/build/main//321/201omponents/Modal/index.d.ts +1 -0
  312. package/build/main//321/201omponents/Modal/index.js +2 -0
  313. package/build/main//321/201omponents/Modal/index.js.map +1 -0
  314. package/build/main//321/201omponents/Modal/types.d.ts +36 -0
  315. package/build/main//321/201omponents/Modal/types.js +2 -0
  316. package/build/main//321/201omponents/Modal/types.js.map +1 -0
  317. package/build/main//321/201omponents/Notification/Notification.d.ts +8 -0
  318. package/build/main//321/201omponents/Notification/Notification.js +218 -0
  319. package/build/main//321/201omponents/Notification/Notification.js.map +1 -0
  320. package/build/main//321/201omponents/Notification/index.d.ts +1 -0
  321. package/build/main//321/201omponents/Notification/index.js +2 -0
  322. package/build/main//321/201omponents/Notification/index.js.map +1 -0
  323. package/build/main//321/201omponents/Notification/types.d.ts +45 -0
  324. package/build/main//321/201omponents/Notification/types.js +2 -0
  325. package/build/main//321/201omponents/Notification/types.js.map +1 -0
  326. package/build/main//321/201omponents/Profile/Profile.d.ts +4 -0
  327. package/build/main//321/201omponents/Profile/Profile.js +42 -0
  328. package/build/main//321/201omponents/Profile/Profile.js.map +1 -0
  329. package/build/main//321/201omponents/Profile/index.d.ts +1 -0
  330. package/build/main//321/201omponents/Profile/index.js +2 -0
  331. package/build/main//321/201omponents/Profile/index.js.map +1 -0
  332. package/build/main//321/201omponents/Profile/types.d.ts +14 -0
  333. package/build/main//321/201omponents/Profile/types.js +2 -0
  334. package/build/main//321/201omponents/Profile/types.js.map +1 -0
  335. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +4 -0
  336. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +66 -0
  337. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +1 -0
  338. package/build/main//321/201omponents/ProgressBar/index.d.ts +1 -0
  339. package/build/main//321/201omponents/ProgressBar/index.js +2 -0
  340. package/build/main//321/201omponents/ProgressBar/index.js.map +1 -0
  341. package/build/main//321/201omponents/ProgressBar/types.d.ts +7 -0
  342. package/build/main//321/201omponents/ProgressBar/types.js +2 -0
  343. package/build/main//321/201omponents/ProgressBar/types.js.map +1 -0
  344. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +4 -0
  345. package/build/main//321/201omponents/RadioButton/RadioButton.js +37 -0
  346. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +1 -0
  347. package/build/main//321/201omponents/RadioButton/index.d.ts +1 -0
  348. package/build/main//321/201omponents/RadioButton/index.js +2 -0
  349. package/build/main//321/201omponents/RadioButton/index.js.map +1 -0
  350. package/build/main//321/201omponents/RadioButton/types.d.ts +12 -0
  351. package/build/main//321/201omponents/RadioButton/types.js +2 -0
  352. package/build/main//321/201omponents/RadioButton/types.js.map +1 -0
  353. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +5 -0
  354. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +63 -0
  355. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +1 -0
  356. package/build/main//321/201omponents/ScrollBar/index.d.ts +1 -0
  357. package/build/main//321/201omponents/ScrollBar/index.js +2 -0
  358. package/build/main//321/201omponents/ScrollBar/index.js.map +1 -0
  359. package/build/main//321/201omponents/ScrollBar/types.d.ts +20 -0
  360. package/build/main//321/201omponents/ScrollBar/types.js +2 -0
  361. package/build/main//321/201omponents/ScrollBar/types.js.map +1 -0
  362. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +4 -0
  363. package/build/main//321/201omponents/Skeleton/Skeleton.js +59 -0
  364. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +1 -0
  365. package/build/main//321/201omponents/Skeleton/index.d.ts +1 -0
  366. package/build/main//321/201omponents/Skeleton/index.js +2 -0
  367. package/build/main//321/201omponents/Skeleton/index.js.map +1 -0
  368. package/build/main//321/201omponents/Skeleton/types.d.ts +17 -0
  369. package/build/main//321/201omponents/Skeleton/types.js +2 -0
  370. package/build/main//321/201omponents/Skeleton/types.js.map +1 -0
  371. package/build/main//321/201omponents/Stories/Stories.d.ts +4 -0
  372. package/build/main//321/201omponents/Stories/Stories.js +300 -0
  373. package/build/main//321/201omponents/Stories/Stories.js.map +1 -0
  374. package/build/main//321/201omponents/Stories/index.d.ts +1 -0
  375. package/build/main//321/201omponents/Stories/index.js +2 -0
  376. package/build/main//321/201omponents/Stories/index.js.map +1 -0
  377. package/build/main//321/201omponents/Stories/types.d.ts +70 -0
  378. package/build/main//321/201omponents/Stories/types.js +16 -0
  379. package/build/main//321/201omponents/Stories/types.js.map +1 -0
  380. package/build/main//321/201omponents/Switcher/Switcher.d.ts +4 -0
  381. package/build/main//321/201omponents/Switcher/Switcher.js +34 -0
  382. package/build/main//321/201omponents/Switcher/Switcher.js.map +1 -0
  383. package/build/main//321/201omponents/Switcher/index.d.ts +1 -0
  384. package/build/main//321/201omponents/Switcher/index.js +2 -0
  385. package/build/main//321/201omponents/Switcher/index.js.map +1 -0
  386. package/build/main//321/201omponents/Switcher/types.d.ts +8 -0
  387. package/build/main//321/201omponents/Switcher/types.js +2 -0
  388. package/build/main//321/201omponents/Switcher/types.js.map +1 -0
  389. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +5 -0
  390. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +65 -0
  391. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +1 -0
  392. package/build/main//321/201omponents/SyncLoader/index.d.ts +1 -0
  393. package/build/main//321/201omponents/SyncLoader/index.js +2 -0
  394. package/build/main//321/201omponents/SyncLoader/index.js.map +1 -0
  395. package/build/main//321/201omponents/SyncLoader/types.d.ts +9 -0
  396. package/build/main//321/201omponents/SyncLoader/types.js +2 -0
  397. package/build/main//321/201omponents/SyncLoader/types.js.map +1 -0
  398. package/build/main//321/201omponents/Textarea/Textarea.d.ts +4 -0
  399. package/build/main//321/201omponents/Textarea/Textarea.js +96 -0
  400. package/build/main//321/201omponents/Textarea/Textarea.js.map +1 -0
  401. package/build/main//321/201omponents/Textarea/index.d.ts +1 -0
  402. package/build/main//321/201omponents/Textarea/index.js +2 -0
  403. package/build/main//321/201omponents/Textarea/index.js.map +1 -0
  404. package/build/main//321/201omponents/Textarea/types.d.ts +12 -0
  405. package/build/main//321/201omponents/Textarea/types.js +2 -0
  406. package/build/main//321/201omponents/Textarea/types.js.map +1 -0
  407. package/build/main//321/201omponents/Toggle/Toggle.d.ts +4 -0
  408. package/build/main//321/201omponents/Toggle/Toggle.js +38 -0
  409. package/build/main//321/201omponents/Toggle/Toggle.js.map +1 -0
  410. package/build/main//321/201omponents/Toggle/index.d.ts +1 -0
  411. package/build/main//321/201omponents/Toggle/index.js +2 -0
  412. package/build/main//321/201omponents/Toggle/index.js.map +1 -0
  413. package/build/main//321/201omponents/Toggle/types.d.ts +12 -0
  414. package/build/main//321/201omponents/Toggle/types.js +2 -0
  415. package/build/main//321/201omponents/Toggle/types.js.map +1 -0
  416. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +4 -0
  417. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +32 -0
  418. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +1 -0
  419. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +4 -0
  420. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +82 -0
  421. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +1 -0
  422. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +4 -0
  423. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +23 -0
  424. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +1 -0
  425. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +4 -0
  426. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +132 -0
  427. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +1 -0
  428. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +3 -0
  429. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +97 -0
  430. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +1 -0
  431. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +4 -0
  432. package/build/main//321/201omponents/UserDropdown/Option/Option.js +93 -0
  433. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +1 -0
  434. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.d.ts +4 -0
  435. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js +43 -0
  436. package/build/main//321/201omponents/UserDropdown/SearchInCatalogButton/SearchInCatalogButton.js.map +1 -0
  437. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +5 -0
  438. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +484 -0
  439. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +1 -0
  440. package/build/main//321/201omponents/UserDropdown/constants.d.ts +7 -0
  441. package/build/main//321/201omponents/UserDropdown/constants.js +9 -0
  442. package/build/main//321/201omponents/UserDropdown/constants.js.map +1 -0
  443. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +98 -0
  444. package/build/main//321/201omponents/UserDropdown/helpers.js +146 -0
  445. package/build/main//321/201omponents/UserDropdown/helpers.js.map +1 -0
  446. package/build/main//321/201omponents/UserDropdown/index.d.ts +1 -0
  447. package/build/main//321/201omponents/UserDropdown/index.js +2 -0
  448. package/build/main//321/201omponents/UserDropdown/index.js.map +1 -0
  449. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +15 -0
  450. package/build/main//321/201omponents/UserDropdown/selectStyles.js +80 -0
  451. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +1 -0
  452. package/build/main//321/201omponents/UserDropdown/types.d.ts +251 -0
  453. package/build/main//321/201omponents/UserDropdown/types.js +9 -0
  454. package/build/main//321/201omponents/UserDropdown/types.js.map +1 -0
  455. package/build/main//321/201omponents/types.d.ts +2 -0
  456. package/build/main//321/201omponents/types.js +2 -0
  457. package/build/main//321/201omponents/types.js.map +1 -0
  458. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import { IActionModalProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const ActionModal: ({ isModalOpen, isClosableOutside, isCloseIconHidden, title, buttonName, confirmButtonFunction, cancelButtonFunction, platform, placeholder, defaultValue, isWaitingResponse, isButtonDisabled, popupClassName, className, popupStyles, styles, titleStyles, iconColor, buttonWidth, backgroundColor, inputFillType, }: IActionModalProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default ActionModal;
@@ -0,0 +1,55 @@
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, useState } from 'react';
14
+ import Popup from 'reactjs-popup';
15
+ import classNames from 'classnames';
16
+ import Button from '../Button';
17
+ import Input from '../Input';
18
+ import { checkIfContentIsCentered, generateClassNames, generateColor, generateIsCloseIconHidden } from '../../helpers';
19
+ import { PLATFORM } from '../../constants';
20
+ import { ReactComponent as CloseIcon } from '../../assets/icons/cancel-cross.svg';
21
+ import '../../styles/styles.scss';
22
+ var ActionModal = function (_a) {
23
+ var isModalOpen = _a.isModalOpen, _b = _a.isClosableOutside, isClosableOutside = _b === void 0 ? true : _b, isCloseIconHidden = _a.isCloseIconHidden, title = _a.title, buttonName = _a.buttonName, confirmButtonFunction = _a.confirmButtonFunction, cancelButtonFunction = _a.cancelButtonFunction, _c = _a.platform, platform = _c === void 0 ? PLATFORM.web : _c, placeholder = _a.placeholder, _d = _a.defaultValue, defaultValue = _d === void 0 ? '' : _d, isWaitingResponse = _a.isWaitingResponse, isButtonDisabled = _a.isButtonDisabled, popupClassName = _a.popupClassName, className = _a.className, popupStyles = _a.popupStyles, styles = _a.styles, titleStyles = _a.titleStyles, iconColor = _a.iconColor, _e = _a.buttonWidth, buttonWidth = _e === void 0 ? 100 : _e, backgroundColor = _a.backgroundColor, inputFillType = _a.inputFillType;
24
+ var isCloseIconInvisible = generateIsCloseIconHidden(platform, isCloseIconHidden);
25
+ var ref = useRef(null);
26
+ var titleRef = useRef(null);
27
+ var _f = useState(defaultValue), value = _f[0], setValue = _f[1];
28
+ var handleConfirmClick = function () {
29
+ confirmButtonFunction(value);
30
+ setValue('');
31
+ };
32
+ var handleCloseModal = function () {
33
+ setValue('');
34
+ cancelButtonFunction();
35
+ };
36
+ var handleChange = function (value) { return setValue(value); };
37
+ useEffect(function () {
38
+ document.documentElement.style.setProperty('--action-modal-background', generateColor(backgroundColor));
39
+ }, [backgroundColor]);
40
+ useEffect(function () {
41
+ var checkIfClickedOutside = function (e) {
42
+ if (isModalOpen && isClosableOutside && ref.current && !ref.current.contains(e.target) && !value.length) {
43
+ handleCloseModal();
44
+ }
45
+ };
46
+ document === null || document === void 0 ? void 0 : document.addEventListener('click', checkIfClickedOutside, true);
47
+ return function () {
48
+ document === null || document === void 0 ? void 0 : document.removeEventListener('click', checkIfClickedOutside, true);
49
+ };
50
+ // eslint-disable-next-line
51
+ }, [isModalOpen, isClosableOutside, cancelButtonFunction, value]);
52
+ return (_jsx(Popup, __assign({ className: classNames('action-modal', popupClassName), overlayStyle: popupStyles, closeOnDocumentClick: isClosableOutside, modal: true, open: isModalOpen, closeOnEscape: isClosableOutside, onClose: handleCloseModal }, { children: _jsx("div", __assign({ ref: ref, className: classNames('smartapp-action-modal', className), style: styles }, { children: _jsxs("div", __assign({ className: "smartapp-action-modal__content" }, { children: [_jsxs("div", { children: [!isCloseIconInvisible && (_jsx("div", { className: classNames('close-icon-space', { 'close-icon-space__centered': checkIfContentIsCentered(titleRef) }) })), _jsx("p", __assign({ ref: titleRef, className: generateClassNames({ className: 'smartapp-action-modal__content--title', delimiter: '__', additionalClassName: platform }), style: titleStyles }, { children: title }))] }), !isCloseIconInvisible && (_jsx("div", __assign({ onClick: handleCloseModal, className: "smartapp-action-modal__content--cancel-cross" }, { children: _jsx(CloseIcon, { style: { color: generateColor(iconColor) } }) }))), _jsx("div", __assign({ className: "smartapp-action-modal__content--input" }, { children: _jsx(Input, { defaultValue: value, placeholder: placeholder, fillType: inputFillType, disabled: isWaitingResponse, onChange: handleChange }) })), _jsx("div", __assign({ className: "smartapp-action-modal__content--buttons" }, { children: _jsx(Button, { width: buttonWidth, isWaitingResponse: isWaitingResponse, disabled: isButtonDisabled, title: buttonName, onClick: handleConfirmClick }) }))] })) })) })));
53
+ };
54
+ export default ActionModal;
55
+ //# sourceMappingURL=ActionModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionModal.js","sourceRoot":"","sources":["../../../../src/сomponents/ActionModal/ActionModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,KAAK,MAAM,eAAe,CAAA;AACjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AACtH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE1C,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACjF,OAAO,0BAA0B,CAAA;AAEjC,IAAM,WAAW,GAAG,UAAC,EAsBD;QArBlB,WAAW,iBAAA,EACX,yBAAwB,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,EACxB,iBAAiB,uBAAA,EACjB,KAAK,WAAA,EACL,UAAU,gBAAA,EACV,qBAAqB,2BAAA,EACrB,oBAAoB,0BAAA,EACpB,gBAAuB,EAAvB,QAAQ,mBAAG,QAAQ,CAAC,GAAG,KAAA,EACvB,WAAW,iBAAA,EACX,oBAAiB,EAAjB,YAAY,mBAAG,E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AAS,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,GAAI,IACrD,CACP,EACD,uBAAK,SAAS,EAAC,uCAAuC,gBACpD,KAAC,KAAK,IAAC,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,GAAI,IAClI,EACN,uBAAK,SAAS,EAAC,yCAAyC,gBACtD,KAAC,MAAM,IACL,KAAK,EAAE,WAAW,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,kBAAkB,GAC3B,IACE,KACF,IACF,IACA,CACT,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './ActionModal';
@@ -0,0 +1,2 @@
1
+ export { default } from './ActionModal';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/ActionModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,24 @@
1
+ import { IntRange } from '../types';
2
+ import { ICommonProps, TStyles } from '../../constants';
3
+ export interface IActionModalProps extends ICommonProps {
4
+ isModalOpen: boolean;
5
+ isClosableOutside?: boolean;
6
+ isCloseIconHidden?: boolean;
7
+ title: string;
8
+ buttonName: string;
9
+ confirmButtonFunction: (str: string) => void;
10
+ cancelButtonFunction: () => void;
11
+ placeholder?: string;
12
+ defaultValue?: string;
13
+ isWaitingResponse?: boolean;
14
+ isButtonDisabled?: boolean;
15
+ popupClassName?: string;
16
+ className?: string;
17
+ popupStyles?: TStyles;
18
+ styles?: TStyles;
19
+ titleStyles?: TStyles;
20
+ iconColor?: string;
21
+ buttonWidth?: IntRange<1, 101>;
22
+ backgroundColor?: string;
23
+ inputFillType?: 'primary' | 'secondary';
24
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/ActionModal/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import { IAttachedFileProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ export declare enum DISPLAY_SIZE {
4
+ small = "small",
5
+ normal = "normal"
6
+ }
7
+ declare const AttachedFile: ({ theme, fileName, weight, weightType, isIconEnclosedWithinBorders, isSpaceBetween, isRemovable, isDownloadable, isDisabled, isLoading, width, displaySize, className, styles, fileColor, downloadColor, removeColor, fileIcon, onClick, onRemove, onDownload, }: IAttachedFileProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default AttachedFile;
@@ -0,0 +1,60 @@
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 { ReactComponent as FileIcon } from '../../assets/icons/file.svg';
15
+ import { ReactComponent as RemoveIcon } from '../../assets/icons/close.svg';
16
+ import { ReactComponent as DownloadIcon } from '../../assets/icons/download.svg';
17
+ import { ReactComponent as LoaderIcon } from '../../assets/icons/attachment-loader.svg';
18
+ import { generateColor, generateDefaultGrayColorForIcon } from '../../helpers';
19
+ import { COLORS, THEME } from '../../constants';
20
+ import '../../styles/styles.scss';
21
+ export var DISPLAY_SIZE;
22
+ (function (DISPLAY_SIZE) {
23
+ DISPLAY_SIZE["small"] = "small";
24
+ DISPLAY_SIZE["normal"] = "normal";
25
+ })(DISPLAY_SIZE || (DISPLAY_SIZE = {}));
26
+ var AttachedFile = function (_a) {
27
+ var _b = _a.theme, theme = _b === void 0 ? THEME.default : _b, fileName = _a.fileName, weight = _a.weight, weightType = _a.weightType, _c = _a.isIconEnclosedWithinBorders, isIconEnclosedWithinBorders = _c === void 0 ? false : _c, _d = _a.isSpaceBetween, isSpaceBetween = _d === void 0 ? false : _d, _e = _a.isRemovable, isRemovable = _e === void 0 ? false : _e, _f = _a.isDownloadable, isDownloadable = _f === void 0 ? false : _f, _g = _a.isDisabled, isDisabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, _j = _a.width, width = _j === void 0 ? 100 : _j, _k = _a.displaySize, displaySize = _k === void 0 ? DISPLAY_SIZE.normal : _k, className = _a.className, styles = _a.styles, fileColor = _a.fileColor, downloadColor = _a.downloadColor, removeColor = _a.removeColor, fileIcon = _a.fileIcon, onClick = _a.onClick, onRemove = _a.onRemove, onDownload = _a.onDownload;
28
+ var handleAttachmentClick = function () { return !isLoading && !isDisabled && onClick && onClick(fileName); };
29
+ var handleAttachmentRemove = function (event) {
30
+ if (onRemove) {
31
+ event.stopPropagation();
32
+ onRemove(fileName);
33
+ }
34
+ };
35
+ var handleAttachmentDownload = function (event) {
36
+ if (!isLoading && !isDisabled && onDownload) {
37
+ event.stopPropagation();
38
+ onDownload(fileName);
39
+ }
40
+ };
41
+ return (_jsxs("div", __assign({ style: __assign({ width: "".concat(width, "%") }, styles), className: classNames('smartapp-attached-file', "smartapp-attached-file__".concat(theme), {
42
+ 'smartapp-attached-file__clickable': onClick,
43
+ 'smartapp-attached-file__disabled': isDisabled,
44
+ 'smartapp-attached-file__loading': isLoading,
45
+ }, className), onClick: handleAttachmentClick }, { children: [_jsxs("div", __assign({ className: classNames('smartapp-attached-file__icon', "smartapp-attached-file__icon--".concat(displaySize), {
46
+ 'smartapp-attached-file__icon--bordered': isIconEnclosedWithinBorders,
47
+ 'smartapp-attached-file__icon--disabled': isDisabled,
48
+ 'smartapp-attached-file__icon--loading': isLoading && !isIconEnclosedWithinBorders,
49
+ }) }, { children: [fileIcon || _jsx(FileIcon, { style: { color: generateColor(fileColor, generateDefaultGrayColorForIcon(theme)) } }), isLoading && (_jsx("div", __assign({ className: classNames('smartapp-attached-file__icon--loader', "smartapp-attached-file__icon--loader__".concat(displaySize)) }, { children: _jsx(LoaderIcon, {}) })))] })), _jsxs("div", __assign({ className: classNames('smartapp-attached-file__value', { 'justify-space-between': isSpaceBetween }) }, { children: [_jsxs("div", __assign({ className: classNames('smartapp-attached-file__value--info', {
50
+ 'smartapp-attached-file__value--info__paddings': isIconEnclosedWithinBorders && displaySize === DISPLAY_SIZE.normal,
51
+ }) }, { children: [_jsx("p", __assign({ className: classNames('smartapp-attached-file__value--info__name', "smartapp-attached-file__value--info__name--".concat(displaySize), {
52
+ 'smartapp-attached-file__value--info__name--disabled': isDisabled,
53
+ 'smartapp-attached-file__value--info__name--loading': isLoading,
54
+ }) }, { children: fileName })), _jsx("p", __assign({ className: "smartapp-attached-file__value--info__weight" }, { children: "".concat(weight, " ").concat(weightType) }))] })), _jsxs("div", __assign({ className: "smartapp-attached-file__value--icons" }, { children: [isRemovable && (_jsx("div", __assign({ onClick: handleAttachmentRemove, className: "smartapp-attached-file__value--icons__close" }, { children: _jsx(RemoveIcon, { style: { color: generateColor(removeColor, generateDefaultGrayColorForIcon(theme)) } }) }))), isDownloadable && (_jsx("div", __assign({ onClick: handleAttachmentDownload, className: classNames('smartapp-attached-file__value--icons__download', {
55
+ 'smartapp-attached-file__value--icons__download--disabled': isDisabled,
56
+ 'smartapp-attached-file__value--icons__download--loading': isLoading,
57
+ }) }, { children: _jsx(DownloadIcon, { style: { color: generateColor(downloadColor, COLORS.blue) } }) })))] }))] }))] }), weight));
58
+ };
59
+ export default AttachedFile;
60
+ //# sourceMappingURL=AttachedFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachedFile.js","sourceRoot":"","sources":["../../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 -0,0 +1,2 @@
1
+ export { default } from './AttachedFile';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/AttachedFile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { ReactElement } from 'react';
2
+ import { IntRange } from '../types';
3
+ import { IThemeProps, TStyles } from '../../constants';
4
+ export interface IAttachedFileProps extends IThemeProps {
5
+ fileName: string;
6
+ weight: number;
7
+ weightType: string;
8
+ isIconEnclosedWithinBorders?: boolean;
9
+ isSpaceBetween?: boolean;
10
+ isRemovable?: boolean;
11
+ isDownloadable?: boolean;
12
+ isDisabled?: boolean;
13
+ isLoading?: boolean;
14
+ width?: IntRange<1, 101>;
15
+ displaySize?: 'small' | 'normal';
16
+ className?: string;
17
+ styles?: TStyles;
18
+ fileColor?: string;
19
+ downloadColor?: string;
20
+ removeColor?: string;
21
+ fileIcon?: ReactElement;
22
+ onClick?: (file: any) => void;
23
+ onRemove?: (file: any) => void;
24
+ onDownload?: (file: any) => void;
25
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/AttachedFile/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { IAvatarProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const Avatar: ({ theme, className, styles, avatarRef, isSelected, isHighlighted, isInactive, isSpam, isWarning, isCrown, isEye, size, username, initials, avatar, counter, icon, outlineDefaultBackground, outlineDarkBackground, onClick, onMouseDown, }: IAvatarProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Avatar;
@@ -0,0 +1,150 @@
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 { isString } from 'lodash';
14
+ import classNames from 'classnames';
15
+ import { calculatePercentageOfValue, createInitials, isDarkTheme, userNameToColor } from '../../helpers';
16
+ import { AVATAR_SIZES, AvatarFontSizes } from './types';
17
+ import { COLORS, MAX_NUMBER_OF_CHARACTERS_IN_INITIALS, THEME } from '../../constants';
18
+ import { ReactComponent as TickIcon } from '../../assets/icons/tick.svg';
19
+ import { ReactComponent as InfoIcon } from '../../assets/icons/info.svg';
20
+ import { ReactComponent as CrownIcon } from '../../assets/icons/crown.svg';
21
+ import { ReactComponent as PrivateIcon } from '../../assets/icons/private.svg';
22
+ import { ReactComponent as AvatarWarningIcon } from '../../assets/icons/warning-avatar.svg';
23
+ import '../../styles/styles.scss';
24
+ var PERCENTS;
25
+ (function (PERCENTS) {
26
+ PERCENTS[PERCENTS["pct_5"] = 5] = "pct_5";
27
+ PERCENTS[PERCENTS["pct_8"] = 8] = "pct_8";
28
+ PERCENTS[PERCENTS["pct_10"] = 10] = "pct_10";
29
+ PERCENTS[PERCENTS["pct_15"] = 15] = "pct_15";
30
+ PERCENTS[PERCENTS["pct_25"] = 25] = "pct_25";
31
+ PERCENTS[PERCENTS["pct_40"] = 40] = "pct_40";
32
+ PERCENTS[PERCENTS["pct_50"] = 50] = "pct_50";
33
+ PERCENTS[PERCENTS["pct_57"] = 57] = "pct_57";
34
+ PERCENTS[PERCENTS["pct_60"] = 60] = "pct_60";
35
+ PERCENTS[PERCENTS["pct_62_5"] = 62.5] = "pct_62_5";
36
+ PERCENTS[PERCENTS["pct_65"] = 65] = "pct_65";
37
+ PERCENTS[PERCENTS["pct_75"] = 75] = "pct_75";
38
+ PERCENTS[PERCENTS["pct_100"] = 100] = "pct_100";
39
+ })(PERCENTS || (PERCENTS = {}));
40
+ var AVATAR_OPACITY = 0.5;
41
+ var USER_INITIALS_OPACITY = 0.3;
42
+ var WARNING_AVATAR_BACKGROUND_COLOR = 'var(--color-icon-transparent-pressed)';
43
+ var Avatar = function (_a) {
44
+ var _b = _a.theme, theme = _b === void 0 ? THEME.default : _b, className = _a.className, styles = _a.styles, avatarRef = _a.avatarRef, isSelected = _a.isSelected, isHighlighted = _a.isHighlighted, isInactive = _a.isInactive, isSpam = _a.isSpam, isWarning = _a.isWarning, isCrown = _a.isCrown, isEye = _a.isEye, _c = _a.size, size = _c === void 0 ? 44 : _c, _d = _a.username, username = _d === void 0 ? '' : _d, initials = _a.initials, avatar = _a.avatar, _e = _a.counter, counter = _e === void 0 ? 0 : _e, icon = _a.icon, _f = _a.outlineDefaultBackground, outlineDefaultBackground = _f === void 0 ? COLORS.white : _f, _g = _a.outlineDarkBackground, outlineDarkBackground = _g === void 0 ? COLORS.brightBlack : _g, _h = _a.onClick, onClick = _h === void 0 ? function () { return undefined; } : _h, onMouseDown = _a.onMouseDown;
45
+ var inactiveOpacity = avatar ? AVATAR_OPACITY : USER_INITIALS_OPACITY;
46
+ var outlineBackground = isDarkTheme(theme) ? outlineDarkBackground : outlineDefaultBackground;
47
+ var outlineWidth = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
48
+ var generateFontSizeAvatar = function () {
49
+ switch (size) {
50
+ case AVATAR_SIZES.size_16:
51
+ return AvatarFontSizes.xSmall;
52
+ case AVATAR_SIZES.size_20:
53
+ case AVATAR_SIZES.size_24:
54
+ return AvatarFontSizes.small;
55
+ case AVATAR_SIZES.size_32:
56
+ case AVATAR_SIZES.size_36:
57
+ case AVATAR_SIZES.size_40:
58
+ return AvatarFontSizes.normal;
59
+ case AVATAR_SIZES.size_44:
60
+ case AVATAR_SIZES.size_48:
61
+ return AvatarFontSizes.medium;
62
+ case AVATAR_SIZES.size_56:
63
+ case AVATAR_SIZES.size_64:
64
+ case AVATAR_SIZES.size_80:
65
+ return AvatarFontSizes.large;
66
+ case AVATAR_SIZES.size_100:
67
+ return AvatarFontSizes.xLarge;
68
+ case AVATAR_SIZES.size_160:
69
+ return AvatarFontSizes.xxLarge;
70
+ case AVATAR_SIZES.size_200:
71
+ return AvatarFontSizes.xxxLarge;
72
+ }
73
+ };
74
+ var renderUserInitials = function () { return (initials === null || initials === void 0 ? void 0 : initials.slice(0, MAX_NUMBER_OF_CHARACTERS_IN_INITIALS).toUpperCase()) || createInitials(username); };
75
+ var renderAvatarImage = function () {
76
+ if (avatar)
77
+ return isString(avatar) ? _jsx("img", { src: avatar, alt: "avatar" }) : avatar;
78
+ else
79
+ return renderUserInitials();
80
+ };
81
+ var renderContent = function () {
82
+ if (isWarning) {
83
+ var warningSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_100 });
84
+ return _jsx(AvatarWarningIcon, { width: warningSize, height: warningSize });
85
+ }
86
+ if (isSelected) {
87
+ var tickSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_57 });
88
+ return _jsx(TickIcon, { width: tickSize, height: tickSize });
89
+ }
90
+ if (isSpam) {
91
+ var infoSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_60 });
92
+ return _jsx(InfoIcon, { width: infoSize, height: infoSize });
93
+ }
94
+ if (icon) {
95
+ var iconSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_62_5 });
96
+ var iconSizeInPx = "".concat(iconSize, "px");
97
+ return (_jsx("div", __assign({ className: "smartapp-avatar__content--icon", style: { width: iconSizeInPx, height: iconSizeInPx } }, { children: icon })));
98
+ }
99
+ return renderAvatarImage();
100
+ };
101
+ var renderCounter = function () {
102
+ var isSingleDigitNumber = counter <= 9;
103
+ var counterText = isSingleDigitNumber ? counter : '9+';
104
+ var width = calculatePercentageOfValue({ value: size, percentage: isSingleDigitNumber ? PERCENTS.pct_40 : PERCENTS.pct_50 });
105
+ var height = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_40 });
106
+ var fontSize = calculatePercentageOfValue({ value: height, percentage: PERCENTS.pct_75 });
107
+ var top = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
108
+ var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
109
+ var borderWidth = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
110
+ var borderRadius = isSingleDigitNumber ? '50%' : "".concat(height * 1.5625, "px");
111
+ return (_jsx("div", __assign({ className: "smartapp-avatar__content--counter", style: {
112
+ width: "".concat(width, "px"),
113
+ height: "".concat(height, "px"),
114
+ top: "-".concat(top, "px"),
115
+ right: "-".concat(right, "px"),
116
+ fontSize: "".concat(fontSize, "px"),
117
+ border: "".concat(borderWidth, "px solid ").concat(outlineBackground),
118
+ borderRadius: borderRadius,
119
+ } }, { children: counterText })));
120
+ };
121
+ var renderEye = function () {
122
+ var top = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_8 });
123
+ var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_25 });
124
+ var eyeSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_65 });
125
+ return (_jsx(PrivateIcon, { className: "smartapp-avatar__content--eye", width: eyeSize, height: eyeSize, color: outlineBackground, style: { top: "-".concat(top, "px"), right: "-".concat(right, "px") } }));
126
+ };
127
+ var renderCrown = function () {
128
+ var bottom = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
129
+ var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
130
+ var crownSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_50 });
131
+ return (_jsx(CrownIcon, { className: "smartapp-avatar__content--crown", width: crownSize, height: crownSize, color: outlineBackground, style: { bottom: "-".concat(bottom, "px"), right: "-".concat(right, "px") } }));
132
+ };
133
+ var generateBackgroundValueForStyles = function () { return (isWarning ? WARNING_AVATAR_BACKGROUND_COLOR : userNameToColor(initials || username)); };
134
+ var generateAvatarContentStyles = function () { return ({
135
+ width: "".concat(size, "px"),
136
+ minWidth: "".concat(size, "px"),
137
+ height: "".concat(size, "px"),
138
+ fontSize: generateFontSizeAvatar(),
139
+ background: isInactive
140
+ ? "linear-gradient(180deg, ".concat(COLORS.inactiveAvatarGradientStart, " 0%, ").concat(COLORS.inactiveAvatarGradientEnd, " 100%)")
141
+ : generateBackgroundValueForStyles(),
142
+ opacity: isInactive ? inactiveOpacity : 1,
143
+ }); };
144
+ return (_jsx("div", __assign({ ref: avatarRef, className: classNames('smartapp-avatar', "smartapp-avatar__".concat(theme), { 'smartapp-avatar__outline': isHighlighted }, className), style: __assign({ '--avatar-outline-width': "".concat(outlineWidth, "px") }, styles), onClick: onClick, onMouseDown: onMouseDown }, { children: _jsxs("div", __assign({ style: generateAvatarContentStyles(), className: classNames('smartapp-avatar__content', {
145
+ 'smartapp-avatar__content--spam': isSpam,
146
+ 'smartapp-avatar__content--inactive': isInactive,
147
+ }) }, { children: [!!counter && renderCounter(), isEye && renderEye(), renderContent(), isCrown && renderCrown()] })) })));
148
+ };
149
+ export default Avatar;
150
+ //# sourceMappingURL=Avatar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACjC,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACxG,OAAO,EAAE,YAAY,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,MAAM,EAAE,oCAAoC,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACrF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE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C,CASxC,CAAA;IAEF,OAAO,CACL,uBACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,UAAU,CAAC,iBAAiB,EAAE,2BAAoB,KAAK,CAAE,EAAE,EAAE,0BAA0B,EAAE,aAAa,EAAE,EAAE,SAAS,CAAC,EAC/H,KAAK,EAAE,WAAE,wBAAwB,EAAE,UAAG,YAAY,OAAI,IAAK,MAAM,CAAyB,EAC1F,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,gBAExB,wBACE,KAAK,EAAE,2BAA2B,EAAE,EACpC,SAAS,EAAE,UAAU,CAAC,0BAA0B,EAAE;gBAChD,gCAAgC,EAAE,MAAM;gBACxC,oCAAoC,EAAE,UAAU;aACjD,CAAC,iBAED,CAAC,CAAC,OAAO,IAAI,aAAa,EAAE,EAC5B,KAAK,IAAI,SAAS,EAAE,EACpB,aAAa,EAAE,EACf,OAAO,IAAI,WAAW,EAAE,KACrB,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './Avatar';
@@ -0,0 +1,2 @@
1
+ export { default } from './Avatar';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
@@ -0,0 +1,59 @@
1
+ import { ReactElement, ReactNode, RefObject } from 'react';
2
+ import { IThemeProps, TStyles } from '../../constants';
3
+ export interface IAvatarProps extends IThemeProps {
4
+ avatarRef?: RefObject<HTMLDivElement | null>;
5
+ className?: string;
6
+ styles?: TStyles;
7
+ isSelected?: boolean;
8
+ isHighlighted?: boolean;
9
+ isInactive?: boolean;
10
+ isSpam?: boolean;
11
+ isCrown?: boolean;
12
+ isWarning?: boolean;
13
+ isEye?: boolean;
14
+ size?: 16 | 20 | 24 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 100 | 160 | 200;
15
+ username?: string;
16
+ initials?: string;
17
+ avatar?: string | ReactElement | null;
18
+ counter?: number;
19
+ icon?: ReactNode;
20
+ outlineDefaultBackground?: string;
21
+ outlineDarkBackground?: string;
22
+ onClick?: () => void;
23
+ onMouseDown?: () => void;
24
+ }
25
+ export declare enum AVATAR_SIZES {
26
+ size_16 = 16,
27
+ size_20 = 20,
28
+ size_24 = 24,
29
+ size_32 = 32,
30
+ size_36 = 36,
31
+ size_40 = 40,
32
+ size_44 = 44,
33
+ size_48 = 48,
34
+ size_56 = 56,
35
+ size_64 = 64,
36
+ size_80 = 80,
37
+ size_100 = 100,
38
+ size_160 = 160,
39
+ size_200 = 200
40
+ }
41
+ export declare enum AvatarFontSizes {
42
+ xSmall = "5px",
43
+ small = "10px",
44
+ normal = "14px",
45
+ medium = "18px",
46
+ large = "24px",
47
+ xLarge = "32px",
48
+ xxLarge = "42px",
49
+ xxxLarge = "48px"
50
+ }
51
+ export interface IUsernameAvatarColor {
52
+ degrees: number;
53
+ top: string;
54
+ topPercent: number;
55
+ middle?: string | null;
56
+ middlePercent?: number | null;
57
+ bottom: string;
58
+ bottomPercent: number;
59
+ }
@@ -0,0 +1,29 @@
1
+ export var AVATAR_SIZES;
2
+ (function (AVATAR_SIZES) {
3
+ AVATAR_SIZES[AVATAR_SIZES["size_16"] = 16] = "size_16";
4
+ AVATAR_SIZES[AVATAR_SIZES["size_20"] = 20] = "size_20";
5
+ AVATAR_SIZES[AVATAR_SIZES["size_24"] = 24] = "size_24";
6
+ AVATAR_SIZES[AVATAR_SIZES["size_32"] = 32] = "size_32";
7
+ AVATAR_SIZES[AVATAR_SIZES["size_36"] = 36] = "size_36";
8
+ AVATAR_SIZES[AVATAR_SIZES["size_40"] = 40] = "size_40";
9
+ AVATAR_SIZES[AVATAR_SIZES["size_44"] = 44] = "size_44";
10
+ AVATAR_SIZES[AVATAR_SIZES["size_48"] = 48] = "size_48";
11
+ AVATAR_SIZES[AVATAR_SIZES["size_56"] = 56] = "size_56";
12
+ AVATAR_SIZES[AVATAR_SIZES["size_64"] = 64] = "size_64";
13
+ AVATAR_SIZES[AVATAR_SIZES["size_80"] = 80] = "size_80";
14
+ AVATAR_SIZES[AVATAR_SIZES["size_100"] = 100] = "size_100";
15
+ AVATAR_SIZES[AVATAR_SIZES["size_160"] = 160] = "size_160";
16
+ AVATAR_SIZES[AVATAR_SIZES["size_200"] = 200] = "size_200";
17
+ })(AVATAR_SIZES || (AVATAR_SIZES = {}));
18
+ export var AvatarFontSizes;
19
+ (function (AvatarFontSizes) {
20
+ AvatarFontSizes["xSmall"] = "5px";
21
+ AvatarFontSizes["small"] = "10px";
22
+ AvatarFontSizes["normal"] = "14px";
23
+ AvatarFontSizes["medium"] = "18px";
24
+ AvatarFontSizes["large"] = "24px";
25
+ AvatarFontSizes["xLarge"] = "32px";
26
+ AvatarFontSizes["xxLarge"] = "42px";
27
+ AvatarFontSizes["xxxLarge"] = "48px";
28
+ })(AvatarFontSizes || (AvatarFontSizes = {}));
29
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/types.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAN,IAAY,YAeX;AAfD,WAAY,YAAY;IACtB,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,sDAAY,CAAA;IACZ,yDAAc,CAAA;IACd,yDAAc,CAAA;IACd,yDAAc,CAAA;AAChB,CAAC,EAfW,YAAY,KAAZ,YAAY,QAevB;AAED,MAAM,CAAN,IAAY,eASX;AATD,WAAY,eAAe;IACzB,iCAAc,CAAA;IACd,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,kCAAe,CAAA;IACf,iCAAc,CAAA;IACd,kCAAe,CAAA;IACf,mCAAgB,CAAA;IAChB,oCAAiB,CAAA;AACnB,CAAC,EATW,eAAe,KAAf,eAAe,QAS1B"}
@@ -0,0 +1,4 @@
1
+ import { IButtonProps } from './types';
2
+ import '../../styles/styles.scss';
3
+ declare const Button: ({ title, disabled, isDisabledClickable, isWaitingResponse, variant, appearance, icon, loaderIcon, width, className, styles, onClick, ...props }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Button;
@@ -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
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { useEffect, useRef } from 'react';
25
+ import classNames from 'classnames';
26
+ import { isNil } from 'lodash';
27
+ import { ReactComponent as DefaultLoaderIcon } from '../../assets/icons/button-loader.svg';
28
+ import { TButtonVariant, TButtonAppearance } from './types';
29
+ import '../../styles/styles.scss';
30
+ var Button = function (_a) {
31
+ var title = _a.title, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.isDisabledClickable, isDisabledClickable = _c === void 0 ? false : _c, _d = _a.isWaitingResponse, isWaitingResponse = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? TButtonVariant.primary : _e, _f = _a.appearance, appearance = _f === void 0 ? TButtonAppearance.accent : _f, icon = _a.icon, loaderIcon = _a.loaderIcon, _g = _a.width, width = _g === void 0 ? 100 : _g, className = _a.className, styles = _a.styles, onClick = _a.onClick, props = __rest(_a, ["title", "disabled", "isDisabledClickable", "isWaitingResponse", "variant", "appearance", "icon", "loaderIcon", "width", "className", "styles", "onClick"]);
32
+ var buttonTitleRef = useRef(null);
33
+ var buttonTitleRefCurrent = buttonTitleRef.current;
34
+ var buttonIconDivRef = useRef(null);
35
+ var buttonIconDivRefCurrent = buttonIconDivRef.current;
36
+ var changeTransitionDelay = function (_a) {
37
+ var transitionDelay = _a.transitionDelay, titleEl = _a.titleEl, iconEl = _a.iconEl;
38
+ titleEl && (titleEl.style.transitionDelay = "".concat(transitionDelay, "ms"));
39
+ iconEl && (iconEl.style.transitionDelay = "".concat(transitionDelay, "ms"));
40
+ };
41
+ var handleButtonClick = function (event) { return (!disabled || (disabled && isDisabledClickable)) && (onClick === null || onClick === void 0 ? void 0 : onClick(event)); };
42
+ useEffect(function () {
43
+ if (isWaitingResponse) {
44
+ buttonTitleRefCurrent === null || buttonTitleRefCurrent === void 0 ? void 0 : buttonTitleRefCurrent.classList.add('smartapp-button__title--hidden');
45
+ buttonIconDivRefCurrent === null || buttonIconDivRefCurrent === void 0 ? void 0 : buttonIconDivRefCurrent.classList.add('smartapp-button__icon--hidden');
46
+ setTimeout(function () { return changeTransitionDelay({ transitionDelay: 300, titleEl: buttonTitleRefCurrent, iconEl: buttonIconDivRefCurrent }); }, 150);
47
+ }
48
+ else {
49
+ buttonTitleRefCurrent === null || buttonTitleRefCurrent === void 0 ? void 0 : buttonTitleRefCurrent.classList.remove('smartapp-button__title--hidden');
50
+ buttonIconDivRefCurrent === null || buttonIconDivRefCurrent === void 0 ? void 0 : buttonIconDivRefCurrent.classList.remove('smartapp-button__icon--hidden');
51
+ setTimeout(function () { return changeTransitionDelay({ transitionDelay: 0, titleEl: buttonTitleRefCurrent, iconEl: buttonIconDivRefCurrent }); }, 150);
52
+ }
53
+ // eslint-disable-next-line
54
+ }, [isWaitingResponse]);
55
+ return (_jsxs("div", __assign({ className: classNames('smartapp-button', "smartapp-button__".concat(appearance), className), style: { width: "".concat(width, "%") } }, { children: [_jsxs("button", __assign({ className: classNames("smartapp-button__".concat(variant), "smartapp-button__".concat(variant, "--").concat(appearance), {
56
+ 'smartapp-button__disabled': disabled,
57
+ 'smartapp-button__with-icon': !isNil(icon),
58
+ }), style: styles, disabled: disabled && !isDisabledClickable, onClick: handleButtonClick }, props, { children: [icon && (_jsx("div", __assign({ ref: buttonIconDivRef, className: "smartapp-button__icon" }, { children: icon }))), _jsx("span", __assign({ ref: buttonTitleRef, className: "smartapp-button__title" }, { children: title }))] })), _jsx("div", __assign({ className: classNames('smartapp-button__loader', "smartapp-button__loader--".concat(variant), {
59
+ 'smartapp-button__loader--hidden': !isWaitingResponse,
60
+ }) }, { children: loaderIcon || _jsx(DefaultLoaderIcon, {}) }))] })));
61
+ };
62
+ export default Button;
63
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAChD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,sCAAsC,CAAA;AAC1F,OAAO,EAAgB,cAAc,EAAE,iBAAiB,EAA0B,MAAM,SAAS,CAAA;AACjG,OAAO,0BAA0B,CAAA;AAEjC,IAAM,MAAM,GAAG,UAAC,EAcD;IAbb,IAAA,KAAK,WAAA,EACL,gBAAgB,E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P,uBAAK,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAC,uBAAuB,gBAC1D,IAAI,IACD,CACP,EACD,wBAAM,GAAG,EAAE,cAAc,EAAE,SAAS,EAAC,wBAAwB,gBAC1D,KAAK,IACD,KACA,EACT,uBACE,SAAS,EAAE,UAAU,CAAC,yBAAyB,EAAE,mCAA4B,OAAO,CAAE,EAAE;oBACtF,iCAAiC,EAAE,CAAC,iBAAiB;iBACtD,CAAC,gBAED,UAAU,IAAI,KAAC,iBAAiB,KAAG,IAChC,KACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1 @@
1
+ export { default } from './Button';
@@ -0,0 +1,2 @@
1
+ export { default } from './Button';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}