@expressms/smartapp-ui 2.5.7 → 2.5.8

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 (401) hide show
  1. package/package.json +1 -1
  2. package/build/main/assets/icons/arrow-back.svg +0 -3
  3. package/build/main/assets/icons/arrow-down.svg +0 -3
  4. package/build/main/assets/icons/arrow-up.svg +0 -3
  5. package/build/main/assets/icons/attachment-loader.svg +0 -3
  6. package/build/main/assets/icons/button-loader.svg +0 -3
  7. package/build/main/assets/icons/cancel-cross.svg +0 -3
  8. package/build/main/assets/icons/check-mark.svg +0 -4
  9. package/build/main/assets/icons/clear.svg +0 -3
  10. package/build/main/assets/icons/close-stories.svg +0 -4
  11. package/build/main/assets/icons/close.svg +0 -10
  12. package/build/main/assets/icons/contact-info.svg +0 -12
  13. package/build/main/assets/icons/corporate-user.svg +0 -10
  14. package/build/main/assets/icons/crown.svg +0 -5
  15. package/build/main/assets/icons/delete-chip.svg +0 -3
  16. package/build/main/assets/icons/download.svg +0 -4
  17. package/build/main/assets/icons/error.svg +0 -5
  18. package/build/main/assets/icons/external-link.svg +0 -3
  19. package/build/main/assets/icons/eye-off.svg +0 -10
  20. package/build/main/assets/icons/eye.svg +0 -10
  21. package/build/main/assets/icons/file.svg +0 -3
  22. package/build/main/assets/icons/info.svg +0 -5
  23. package/build/main/assets/icons/loader.svg +0 -3
  24. package/build/main/assets/icons/logout.svg +0 -4
  25. package/build/main/assets/icons/magnifying-glass.svg +0 -3
  26. package/build/main/assets/icons/mail.svg +0 -3
  27. package/build/main/assets/icons/my-contact-user.svg +0 -10
  28. package/build/main/assets/icons/notification-close.svg +0 -3
  29. package/build/main/assets/icons/notification-error.svg +0 -3
  30. package/build/main/assets/icons/notification-failure.svg +0 -3
  31. package/build/main/assets/icons/notification-info.svg +0 -5
  32. package/build/main/assets/icons/notification-success.svg +0 -4
  33. package/build/main/assets/icons/notification-warning.svg +0 -5
  34. package/build/main/assets/icons/order.svg +0 -6
  35. package/build/main/assets/icons/plus.svg +0 -4
  36. package/build/main/assets/icons/refresh.svg +0 -3
  37. package/build/main/assets/icons/story-loader.svg +0 -3
  38. package/build/main/assets/icons/tick.svg +0 -10
  39. package/build/main/assets/icons/trash.svg +0 -3
  40. package/build/main/assets/storybook/index.d.ts +0 -12
  41. package/build/main/assets/storybook/index.js +0 -13
  42. package/build/main/assets/storybook/index.js.map +0 -1
  43. package/build/main/constants/constants.d.ts +0 -136
  44. package/build/main/constants/constants.js +0 -152
  45. package/build/main/constants/constants.js.map +0 -1
  46. package/build/main/constants/index.d.ts +0 -2
  47. package/build/main/constants/index.js +0 -3
  48. package/build/main/constants/index.js.map +0 -1
  49. package/build/main/constants/types.d.ts +0 -28
  50. package/build/main/constants/types.js +0 -2
  51. package/build/main/constants/types.js.map +0 -1
  52. package/build/main/helpers/index.d.ts +0 -20
  53. package/build/main/helpers/index.js +0 -80
  54. package/build/main/helpers/index.js.map +0 -1
  55. package/build/main/index.d.ts +0 -3
  56. package/build/main/index.js +0 -4
  57. package/build/main/index.js.map +0 -1
  58. package/build/main/styles/index.d.ts +0 -1
  59. package/build/main/styles/index.js +0 -2
  60. package/build/main/styles/index.js.map +0 -1
  61. package/build/main/styles/main.js +0 -0
  62. package/build/main/styles/styles.scss +0 -14
  63. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +0 -4
  64. package/build/main//321/201omponents/ActionModal/ActionModal.js +0 -56
  65. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +0 -1
  66. package/build/main//321/201omponents/ActionModal/index.d.ts +0 -1
  67. package/build/main//321/201omponents/ActionModal/index.js +0 -2
  68. package/build/main//321/201omponents/ActionModal/index.js.map +0 -1
  69. package/build/main//321/201omponents/ActionModal/types.d.ts +0 -20
  70. package/build/main//321/201omponents/ActionModal/types.js +0 -2
  71. package/build/main//321/201omponents/ActionModal/types.js.map +0 -1
  72. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +0 -8
  73. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +0 -60
  74. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +0 -1
  75. package/build/main//321/201omponents/AttachedFile/index.d.ts +0 -1
  76. package/build/main//321/201omponents/AttachedFile/index.js +0 -2
  77. package/build/main//321/201omponents/AttachedFile/index.js.map +0 -1
  78. package/build/main//321/201omponents/AttachedFile/types.d.ts +0 -23
  79. package/build/main//321/201omponents/AttachedFile/types.js +0 -2
  80. package/build/main//321/201omponents/AttachedFile/types.js.map +0 -1
  81. package/build/main//321/201omponents/Avatar/Avatar.d.ts +0 -4
  82. package/build/main//321/201omponents/Avatar/Avatar.js +0 -115
  83. package/build/main//321/201omponents/Avatar/Avatar.js.map +0 -1
  84. package/build/main//321/201omponents/Avatar/index.d.ts +0 -1
  85. package/build/main//321/201omponents/Avatar/index.js +0 -2
  86. package/build/main//321/201omponents/Avatar/index.js.map +0 -1
  87. package/build/main//321/201omponents/Avatar/types.d.ts +0 -36
  88. package/build/main//321/201omponents/Avatar/types.js +0 -9
  89. package/build/main//321/201omponents/Avatar/types.js.map +0 -1
  90. package/build/main//321/201omponents/Button/Button.d.ts +0 -4
  91. package/build/main//321/201omponents/Button/Button.js +0 -46
  92. package/build/main//321/201omponents/Button/Button.js.map +0 -1
  93. package/build/main//321/201omponents/Button/index.d.ts +0 -1
  94. package/build/main//321/201omponents/Button/index.js +0 -2
  95. package/build/main//321/201omponents/Button/index.js.map +0 -1
  96. package/build/main//321/201omponents/Button/types.d.ts +0 -23
  97. package/build/main//321/201omponents/Button/types.js +0 -11
  98. package/build/main//321/201omponents/Button/types.js.map +0 -1
  99. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +0 -4
  100. package/build/main//321/201omponents/CachedImage/CachedImage.js +0 -54
  101. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +0 -1
  102. package/build/main//321/201omponents/CachedImage/helpers.d.ts +0 -3
  103. package/build/main//321/201omponents/CachedImage/helpers.js +0 -40
  104. package/build/main//321/201omponents/CachedImage/helpers.js.map +0 -1
  105. package/build/main//321/201omponents/CachedImage/index.d.ts +0 -1
  106. package/build/main//321/201omponents/CachedImage/index.js +0 -2
  107. package/build/main//321/201omponents/CachedImage/index.js.map +0 -1
  108. package/build/main//321/201omponents/CachedImage/types.d.ts +0 -8
  109. package/build/main//321/201omponents/CachedImage/types.js +0 -2
  110. package/build/main//321/201omponents/CachedImage/types.js.map +0 -1
  111. package/build/main//321/201omponents/Calendar/Calendar.d.ts +0 -4
  112. package/build/main//321/201omponents/Calendar/Calendar.js +0 -48
  113. package/build/main//321/201omponents/Calendar/Calendar.js.map +0 -1
  114. package/build/main//321/201omponents/Calendar/index.d.ts +0 -1
  115. package/build/main//321/201omponents/Calendar/index.js +0 -2
  116. package/build/main//321/201omponents/Calendar/index.js.map +0 -1
  117. package/build/main//321/201omponents/Calendar/types.d.ts +0 -14
  118. package/build/main//321/201omponents/Calendar/types.js +0 -2
  119. package/build/main//321/201omponents/Calendar/types.js.map +0 -1
  120. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +0 -3
  121. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +0 -39
  122. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +0 -1
  123. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +0 -3
  124. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +0 -30
  125. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +0 -1
  126. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +0 -3
  127. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +0 -64
  128. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +0 -1
  129. package/build/main//321/201omponents/Charts/colors.d.ts +0 -2
  130. package/build/main//321/201omponents/Charts/colors.js +0 -3
  131. package/build/main//321/201omponents/Charts/colors.js.map +0 -1
  132. package/build/main//321/201omponents/Charts/constants.d.ts +0 -50
  133. package/build/main//321/201omponents/Charts/constants.js +0 -36
  134. package/build/main//321/201omponents/Charts/constants.js.map +0 -1
  135. package/build/main//321/201omponents/Charts/helpers.d.ts +0 -68
  136. package/build/main//321/201omponents/Charts/helpers.js +0 -91
  137. package/build/main//321/201omponents/Charts/helpers.js.map +0 -1
  138. package/build/main//321/201omponents/Charts/index.d.ts +0 -3
  139. package/build/main//321/201omponents/Charts/index.js +0 -4
  140. package/build/main//321/201omponents/Charts/index.js.map +0 -1
  141. package/build/main//321/201omponents/Charts/types.d.ts +0 -51
  142. package/build/main//321/201omponents/Charts/types.js +0 -2
  143. package/build/main//321/201omponents/Charts/types.js.map +0 -1
  144. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +0 -4
  145. package/build/main//321/201omponents/Checkbox/Checkbox.js +0 -36
  146. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +0 -1
  147. package/build/main//321/201omponents/Checkbox/index.d.ts +0 -1
  148. package/build/main//321/201omponents/Checkbox/index.js +0 -2
  149. package/build/main//321/201omponents/Checkbox/index.js.map +0 -1
  150. package/build/main//321/201omponents/Checkbox/types.d.ts +0 -9
  151. package/build/main//321/201omponents/Checkbox/types.js +0 -2
  152. package/build/main//321/201omponents/Checkbox/types.js.map +0 -1
  153. package/build/main//321/201omponents/Chip/Chip.d.ts +0 -4
  154. package/build/main//321/201omponents/Chip/Chip.js +0 -40
  155. package/build/main//321/201omponents/Chip/Chip.js.map +0 -1
  156. package/build/main//321/201omponents/Chip/index.d.ts +0 -1
  157. package/build/main//321/201omponents/Chip/index.js +0 -2
  158. package/build/main//321/201omponents/Chip/index.js.map +0 -1
  159. package/build/main//321/201omponents/Chip/types.d.ts +0 -10
  160. package/build/main//321/201omponents/Chip/types.js +0 -2
  161. package/build/main//321/201omponents/Chip/types.js.map +0 -1
  162. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +0 -4
  163. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +0 -44
  164. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +0 -1
  165. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +0 -1
  166. package/build/main//321/201omponents/ConfirmationModal/index.js +0 -2
  167. package/build/main//321/201omponents/ConfirmationModal/index.js.map +0 -1
  168. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +0 -16
  169. package/build/main//321/201omponents/ConfirmationModal/types.js +0 -2
  170. package/build/main//321/201omponents/ConfirmationModal/types.js.map +0 -1
  171. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +0 -4
  172. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +0 -55
  173. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +0 -1
  174. package/build/main//321/201omponents/ContextMenu/index.d.ts +0 -1
  175. package/build/main//321/201omponents/ContextMenu/index.js +0 -2
  176. package/build/main//321/201omponents/ContextMenu/index.js.map +0 -1
  177. package/build/main//321/201omponents/ContextMenu/types.d.ts +0 -24
  178. package/build/main//321/201omponents/ContextMenu/types.js +0 -2
  179. package/build/main//321/201omponents/ContextMenu/types.js.map +0 -1
  180. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +0 -4
  181. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +0 -172
  182. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +0 -1
  183. package/build/main//321/201omponents/CustomSelect/index.d.ts +0 -1
  184. package/build/main//321/201omponents/CustomSelect/index.js +0 -2
  185. package/build/main//321/201omponents/CustomSelect/index.js.map +0 -1
  186. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +0 -16
  187. package/build/main//321/201omponents/CustomSelect/selectStyles.js +0 -61
  188. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +0 -1
  189. package/build/main//321/201omponents/CustomSelect/types.d.ts +0 -54
  190. package/build/main//321/201omponents/CustomSelect/types.js +0 -2
  191. package/build/main//321/201omponents/CustomSelect/types.js.map +0 -1
  192. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +0 -4
  193. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +0 -57
  194. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +0 -1
  195. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +0 -1
  196. package/build/main//321/201omponents/CustomSelectProfiles/index.js +0 -2
  197. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +0 -1
  198. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +0 -12
  199. package/build/main//321/201omponents/CustomSelectProfiles/types.js +0 -2
  200. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +0 -1
  201. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +0 -4
  202. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +0 -57
  203. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +0 -1
  204. package/build/main//321/201omponents/DragAndDrop/index.d.ts +0 -1
  205. package/build/main//321/201omponents/DragAndDrop/index.js +0 -2
  206. package/build/main//321/201omponents/DragAndDrop/index.js.map +0 -1
  207. package/build/main//321/201omponents/DragAndDrop/types.d.ts +0 -24
  208. package/build/main//321/201omponents/DragAndDrop/types.js +0 -2
  209. package/build/main//321/201omponents/DragAndDrop/types.js.map +0 -1
  210. package/build/main//321/201omponents/Error/Error.d.ts +0 -4
  211. package/build/main//321/201omponents/Error/Error.js +0 -22
  212. package/build/main//321/201omponents/Error/Error.js.map +0 -1
  213. package/build/main//321/201omponents/Error/index.d.ts +0 -1
  214. package/build/main//321/201omponents/Error/index.js +0 -2
  215. package/build/main//321/201omponents/Error/index.js.map +0 -1
  216. package/build/main//321/201omponents/Error/types.d.ts +0 -7
  217. package/build/main//321/201omponents/Error/types.js +0 -2
  218. package/build/main//321/201omponents/Error/types.js.map +0 -1
  219. package/build/main//321/201omponents/Header/Header.d.ts +0 -5
  220. package/build/main//321/201omponents/Header/Header.js +0 -124
  221. package/build/main//321/201omponents/Header/Header.js.map +0 -1
  222. package/build/main//321/201omponents/Header/index.d.ts +0 -1
  223. package/build/main//321/201omponents/Header/index.js +0 -2
  224. package/build/main//321/201omponents/Header/index.js.map +0 -1
  225. package/build/main//321/201omponents/Header/types.d.ts +0 -44
  226. package/build/main//321/201omponents/Header/types.js +0 -2
  227. package/build/main//321/201omponents/Header/types.js.map +0 -1
  228. package/build/main//321/201omponents/Input/Input.d.ts +0 -4
  229. package/build/main//321/201omponents/Input/Input.js +0 -195
  230. package/build/main//321/201omponents/Input/Input.js.map +0 -1
  231. package/build/main//321/201omponents/Input/index.d.ts +0 -1
  232. package/build/main//321/201omponents/Input/index.js +0 -2
  233. package/build/main//321/201omponents/Input/index.js.map +0 -1
  234. package/build/main//321/201omponents/Input/types.d.ts +0 -35
  235. package/build/main//321/201omponents/Input/types.js +0 -2
  236. package/build/main//321/201omponents/Input/types.js.map +0 -1
  237. package/build/main//321/201omponents/ListItem/ListItem.d.ts +0 -23
  238. package/build/main//321/201omponents/ListItem/ListItem.js +0 -195
  239. package/build/main//321/201omponents/ListItem/ListItem.js.map +0 -1
  240. package/build/main//321/201omponents/ListItem/index.d.ts +0 -1
  241. package/build/main//321/201omponents/ListItem/index.js +0 -2
  242. package/build/main//321/201omponents/ListItem/index.js.map +0 -1
  243. package/build/main//321/201omponents/ListItem/types.d.ts +0 -38
  244. package/build/main//321/201omponents/ListItem/types.js +0 -2
  245. package/build/main//321/201omponents/ListItem/types.js.map +0 -1
  246. package/build/main//321/201omponents/Loader/Loader.d.ts +0 -4
  247. package/build/main//321/201omponents/Loader/Loader.js +0 -40
  248. package/build/main//321/201omponents/Loader/Loader.js.map +0 -1
  249. package/build/main//321/201omponents/Loader/index.d.ts +0 -1
  250. package/build/main//321/201omponents/Loader/index.js +0 -2
  251. package/build/main//321/201omponents/Loader/index.js.map +0 -1
  252. package/build/main//321/201omponents/Loader/types.d.ts +0 -12
  253. package/build/main//321/201omponents/Loader/types.js +0 -2
  254. package/build/main//321/201omponents/Loader/types.js.map +0 -1
  255. package/build/main//321/201omponents/Modal/Modal.d.ts +0 -4
  256. package/build/main//321/201omponents/Modal/Modal.js +0 -53
  257. package/build/main//321/201omponents/Modal/Modal.js.map +0 -1
  258. package/build/main//321/201omponents/Modal/index.d.ts +0 -1
  259. package/build/main//321/201omponents/Modal/index.js +0 -2
  260. package/build/main//321/201omponents/Modal/index.js.map +0 -1
  261. package/build/main//321/201omponents/Modal/types.d.ts +0 -15
  262. package/build/main//321/201omponents/Modal/types.js +0 -2
  263. package/build/main//321/201omponents/Modal/types.js.map +0 -1
  264. package/build/main//321/201omponents/Notification/Notification.d.ts +0 -8
  265. package/build/main//321/201omponents/Notification/Notification.js +0 -178
  266. package/build/main//321/201omponents/Notification/Notification.js.map +0 -1
  267. package/build/main//321/201omponents/Notification/index.d.ts +0 -1
  268. package/build/main//321/201omponents/Notification/index.js +0 -2
  269. package/build/main//321/201omponents/Notification/index.js.map +0 -1
  270. package/build/main//321/201omponents/Notification/types.d.ts +0 -39
  271. package/build/main//321/201omponents/Notification/types.js +0 -2
  272. package/build/main//321/201omponents/Notification/types.js.map +0 -1
  273. package/build/main//321/201omponents/Profile/Profile.d.ts +0 -4
  274. package/build/main//321/201omponents/Profile/Profile.js +0 -42
  275. package/build/main//321/201omponents/Profile/Profile.js.map +0 -1
  276. package/build/main//321/201omponents/Profile/index.d.ts +0 -1
  277. package/build/main//321/201omponents/Profile/index.js +0 -2
  278. package/build/main//321/201omponents/Profile/index.js.map +0 -1
  279. package/build/main//321/201omponents/Profile/types.d.ts +0 -14
  280. package/build/main//321/201omponents/Profile/types.js +0 -2
  281. package/build/main//321/201omponents/Profile/types.js.map +0 -1
  282. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +0 -4
  283. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +0 -66
  284. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +0 -1
  285. package/build/main//321/201omponents/ProgressBar/index.d.ts +0 -1
  286. package/build/main//321/201omponents/ProgressBar/index.js +0 -2
  287. package/build/main//321/201omponents/ProgressBar/index.js.map +0 -1
  288. package/build/main//321/201omponents/ProgressBar/types.d.ts +0 -4
  289. package/build/main//321/201omponents/ProgressBar/types.js +0 -2
  290. package/build/main//321/201omponents/ProgressBar/types.js.map +0 -1
  291. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +0 -4
  292. package/build/main//321/201omponents/RadioButton/RadioButton.js +0 -36
  293. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +0 -1
  294. package/build/main//321/201omponents/RadioButton/index.d.ts +0 -1
  295. package/build/main//321/201omponents/RadioButton/index.js +0 -2
  296. package/build/main//321/201omponents/RadioButton/index.js.map +0 -1
  297. package/build/main//321/201omponents/RadioButton/types.d.ts +0 -9
  298. package/build/main//321/201omponents/RadioButton/types.js +0 -2
  299. package/build/main//321/201omponents/RadioButton/types.js.map +0 -1
  300. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +0 -4
  301. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +0 -50
  302. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +0 -1
  303. package/build/main//321/201omponents/ScrollBar/index.d.ts +0 -1
  304. package/build/main//321/201omponents/ScrollBar/index.js +0 -2
  305. package/build/main//321/201omponents/ScrollBar/index.js.map +0 -1
  306. package/build/main//321/201omponents/ScrollBar/types.d.ts +0 -9
  307. package/build/main//321/201omponents/ScrollBar/types.js +0 -2
  308. package/build/main//321/201omponents/ScrollBar/types.js.map +0 -1
  309. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +0 -4
  310. package/build/main//321/201omponents/Skeleton/Skeleton.js +0 -66
  311. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +0 -1
  312. package/build/main//321/201omponents/Skeleton/index.d.ts +0 -1
  313. package/build/main//321/201omponents/Skeleton/index.js +0 -2
  314. package/build/main//321/201omponents/Skeleton/index.js.map +0 -1
  315. package/build/main//321/201omponents/Skeleton/types.d.ts +0 -16
  316. package/build/main//321/201omponents/Skeleton/types.js +0 -2
  317. package/build/main//321/201omponents/Skeleton/types.js.map +0 -1
  318. package/build/main//321/201omponents/Stories/Stories.d.ts +0 -4
  319. package/build/main//321/201omponents/Stories/Stories.js +0 -281
  320. package/build/main//321/201omponents/Stories/Stories.js.map +0 -1
  321. package/build/main//321/201omponents/Stories/index.d.ts +0 -1
  322. package/build/main//321/201omponents/Stories/index.js +0 -2
  323. package/build/main//321/201omponents/Stories/index.js.map +0 -1
  324. package/build/main//321/201omponents/Stories/types.d.ts +0 -54
  325. package/build/main//321/201omponents/Stories/types.js +0 -11
  326. package/build/main//321/201omponents/Stories/types.js.map +0 -1
  327. package/build/main//321/201omponents/Switcher/Switcher.d.ts +0 -4
  328. package/build/main//321/201omponents/Switcher/Switcher.js +0 -34
  329. package/build/main//321/201omponents/Switcher/Switcher.js.map +0 -1
  330. package/build/main//321/201omponents/Switcher/index.d.ts +0 -1
  331. package/build/main//321/201omponents/Switcher/index.js +0 -2
  332. package/build/main//321/201omponents/Switcher/index.js.map +0 -1
  333. package/build/main//321/201omponents/Switcher/types.d.ts +0 -8
  334. package/build/main//321/201omponents/Switcher/types.js +0 -2
  335. package/build/main//321/201omponents/Switcher/types.js.map +0 -1
  336. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +0 -5
  337. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +0 -65
  338. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +0 -1
  339. package/build/main//321/201omponents/SyncLoader/index.d.ts +0 -1
  340. package/build/main//321/201omponents/SyncLoader/index.js +0 -2
  341. package/build/main//321/201omponents/SyncLoader/index.js.map +0 -1
  342. package/build/main//321/201omponents/SyncLoader/types.d.ts +0 -7
  343. package/build/main//321/201omponents/SyncLoader/types.js +0 -2
  344. package/build/main//321/201omponents/SyncLoader/types.js.map +0 -1
  345. package/build/main//321/201omponents/Textarea/Textarea.d.ts +0 -4
  346. package/build/main//321/201omponents/Textarea/Textarea.js +0 -85
  347. package/build/main//321/201omponents/Textarea/Textarea.js.map +0 -1
  348. package/build/main//321/201omponents/Textarea/index.d.ts +0 -1
  349. package/build/main//321/201omponents/Textarea/index.js +0 -2
  350. package/build/main//321/201omponents/Textarea/index.js.map +0 -1
  351. package/build/main//321/201omponents/Textarea/types.d.ts +0 -13
  352. package/build/main//321/201omponents/Textarea/types.js +0 -2
  353. package/build/main//321/201omponents/Textarea/types.js.map +0 -1
  354. package/build/main//321/201omponents/Toggle/Toggle.d.ts +0 -4
  355. package/build/main//321/201omponents/Toggle/Toggle.js +0 -38
  356. package/build/main//321/201omponents/Toggle/Toggle.js.map +0 -1
  357. package/build/main//321/201omponents/Toggle/index.d.ts +0 -1
  358. package/build/main//321/201omponents/Toggle/index.js +0 -2
  359. package/build/main//321/201omponents/Toggle/index.js.map +0 -1
  360. package/build/main//321/201omponents/Toggle/types.d.ts +0 -9
  361. package/build/main//321/201omponents/Toggle/types.js +0 -2
  362. package/build/main//321/201omponents/Toggle/types.js.map +0 -1
  363. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +0 -4
  364. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +0 -31
  365. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +0 -1
  366. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +0 -4
  367. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +0 -70
  368. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +0 -1
  369. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +0 -4
  370. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +0 -23
  371. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +0 -1
  372. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +0 -3
  373. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +0 -76
  374. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +0 -1
  375. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +0 -3
  376. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +0 -40
  377. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +0 -1
  378. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +0 -4
  379. package/build/main//321/201omponents/UserDropdown/Option/Option.js +0 -55
  380. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +0 -1
  381. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +0 -4
  382. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +0 -386
  383. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +0 -1
  384. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +0 -87
  385. package/build/main//321/201omponents/UserDropdown/helpers.js +0 -47
  386. package/build/main//321/201omponents/UserDropdown/helpers.js.map +0 -1
  387. package/build/main//321/201omponents/UserDropdown/index.d.ts +0 -1
  388. package/build/main//321/201omponents/UserDropdown/index.js +0 -2
  389. package/build/main//321/201omponents/UserDropdown/index.js.map +0 -1
  390. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +0 -15
  391. package/build/main//321/201omponents/UserDropdown/selectStyles.js +0 -72
  392. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +0 -1
  393. package/build/main//321/201omponents/UserDropdown/types.d.ts +0 -183
  394. package/build/main//321/201omponents/UserDropdown/types.js +0 -2
  395. package/build/main//321/201omponents/UserDropdown/types.js.map +0 -1
  396. package/build/main//321/201omponents/index.d.ts +0 -32
  397. package/build/main//321/201omponents/index.js +0 -33
  398. package/build/main//321/201omponents/index.js.map +0 -1
  399. package/build/main//321/201omponents/types.d.ts +0 -2
  400. package/build/main//321/201omponents/types.js +0 -2
  401. package/build/main//321/201omponents/types.js.map +0 -1
@@ -1,4 +0,0 @@
1
- import { IActionModalProps } from './types';
2
- import '../../styles/styles.scss';
3
- declare const ActionModal: ({ isModalOpen, isClosableOutside, isCloseIconHidden, layoutType, title, buttonName, confirmButtonFunction, cancelButtonFunction, platform, placeholder, defaultValue, isWaitingResponse, isButtonDisabled, titleStyles, iconColor, buttonWidth, backgroundColor, inputFillType, }: IActionModalProps) => import("react/jsx-runtime").JSX.Element;
4
- export default ActionModal;
@@ -1,56 +0,0 @@
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 Button from '../Button';
16
- import Input from '../Input';
17
- import { getClassNames, getColor, isMobilePlatform, isModalHasFixedWidth } from '../../helpers';
18
- import { CLOSABLE_CLASS_NAME, FIXED_WIDTH_CLASS_NAME, LAYOUT_TYPE, PLATFORM } from '../../constants';
19
- import { ReactComponent as CloseIcon } from '../../assets/icons/cancel-cross.svg';
20
- import '../../styles/styles.scss';
21
- var ActionModal = function (_a) {
22
- var isModalOpen = _a.isModalOpen, _b = _a.isClosableOutside, isClosableOutside = _b === void 0 ? true : _b, _c = _a.isCloseIconHidden, isCloseIconHidden = _c === void 0 ? false : _c, _d = _a.layoutType, layoutType = _d === void 0 ? LAYOUT_TYPE.minimal : _d, title = _a.title, buttonName = _a.buttonName, confirmButtonFunction = _a.confirmButtonFunction, cancelButtonFunction = _a.cancelButtonFunction, _e = _a.platform, platform = _e === void 0 ? PLATFORM.web : _e, placeholder = _a.placeholder, _f = _a.defaultValue, defaultValue = _f === void 0 ? '' : _f, isWaitingResponse = _a.isWaitingResponse, isButtonDisabled = _a.isButtonDisabled, titleStyles = _a.titleStyles, iconColor = _a.iconColor, _g = _a.buttonWidth, buttonWidth = _g === void 0 ? 100 : _g, backgroundColor = _a.backgroundColor, inputFillType = _a.inputFillType;
23
- var additionalClassName = isModalHasFixedWidth({ layoutType: layoutType, platform: platform }) ? [platform, FIXED_WIDTH_CLASS_NAME] : [platform];
24
- var popupAdditionalClassName = isClosableOutside ? [platform, CLOSABLE_CLASS_NAME] : [platform];
25
- var ref = useRef(null);
26
- var _h = useState(defaultValue), value = _h[0], setValue = _h[1];
27
- var onConfirmClick = function () {
28
- confirmButtonFunction(value);
29
- setValue('');
30
- };
31
- var onCloseModal = function () {
32
- setValue('');
33
- cancelButtonFunction();
34
- };
35
- useEffect(function () {
36
- document.documentElement.style.setProperty('--action-modal-background', getColor(backgroundColor));
37
- }, [backgroundColor]);
38
- useEffect(function () {
39
- var checkIfClickedOutside = function (e) {
40
- if (isModalOpen && isClosableOutside && ref.current && !ref.current.contains(e.target)) {
41
- onCloseModal();
42
- }
43
- };
44
- document === null || document === void 0 ? void 0 : document.addEventListener('click', checkIfClickedOutside, true);
45
- return function () {
46
- document === null || document === void 0 ? void 0 : document.removeEventListener('click', checkIfClickedOutside, true);
47
- };
48
- // eslint-disable-next-line
49
- }, [isModalOpen, isClosableOutside, cancelButtonFunction]);
50
- var onChange = function (value) {
51
- setValue(value);
52
- };
53
- return (_jsx(Popup, __assign({ className: getClassNames({ className: 'action-modal', delimiter: '-', additionalClassName: popupAdditionalClassName }), closeOnDocumentClick: isClosableOutside, modal: true, open: isModalOpen }, { children: _jsx("div", __assign({ ref: ref, className: getClassNames({ className: 'smartapp-action-modal', delimiter: '__', additionalClassName: additionalClassName }) }, { children: _jsxs("div", __assign({ className: getClassNames({ className: 'smartapp-action-modal__content', delimiter: '--', additionalClassName: platform }) }, { children: [_jsx("p", __assign({ className: getClassNames({ className: 'smartapp-action-modal__content--title', delimiter: '__', additionalClassName: platform }), style: titleStyles }, { children: title })), isClosableOutside && !isCloseIconHidden && (_jsx("div", __assign({ onClick: onCloseModal, className: "smartapp-action-modal__content--cancel-cross" }, { children: _jsx(CloseIcon, { style: { color: getColor(iconColor) } }) }))), _jsx("div", __assign({ className: "smartapp-action-modal__content--input" }, { children: _jsx(Input, { defaultValue: value, placeholder: placeholder, fillType: inputFillType, isDisabled: isWaitingResponse, onChange: onChange }) })), isMobilePlatform(platform) && _jsx("div", { className: "smartapp-action-modal__content--delimiter" }), _jsx("div", __assign({ className: "smartapp-action-modal__content--buttons" }, { children: _jsx(Button, { width: buttonWidth, isWaitingResponse: isWaitingResponse, isDisabled: isButtonDisabled, title: buttonName, onClick: onConfirmClick }) }))] })) })) })));
54
- };
55
- export default ActionModal;
56
- //# sourceMappingURL=ActionModal.js.map
@@ -1 +0,0 @@
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,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAC/F,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAEpG,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACjF,OAAO,0BAA0B,CAAA;AAEjC,IAAM,WAAW,GAAG,UAAC,EAmBD;QAlBlB,WAAW,iBAAA,EACX,yBAAwB,EAAxB,iBAAiB,mBAAG,IAAI,KAAA,EACxB,yBAAyB,EAAzB,iBAAiB,mBAAG,KAAK,KAAA,EACzB,kBAAgC,EAAhC,UAAU,mBAAG,WAAW,CAAC,OAAO,KAAA,EAChC,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AE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EAChI,KAAK,EAAE,WAAW,gBAEjB,KAAK,IACJ,EACH,iBAAiB,IAAI,CAAC,iBAAiB,IAAI,CAC1C,uBAAK,OAAO,EAAE,YAAY,EAAE,SAAS,EAAC,8CAA8C,gBAClF,KAAC,SAAS,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAI,IAChD,CACP,EACD,uBAAK,SAAS,EAAC,uCAAuC,gBACpD,KAAC,KAAK,IAAC,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAI,IAChI,EACL,gBAAgB,CAAC,QAAQ,CAAC,IAAI,cAAK,SAAS,EAAC,2CAA2C,GAAG,EAC5F,uBAAK,SAAS,EAAC,yCAAyC,gBACtD,KAAC,MAAM,IACL,KAAK,EAAE,WAAW,EAClB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,gBAAgB,EAC5B,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,cAAc,GACvB,IACE,KACF,IACF,IACA,CACT,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
@@ -1 +0,0 @@
1
- export { default } from './ActionModal';
@@ -1,2 +0,0 @@
1
- export { default } from './ActionModal';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/ActionModal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA"}
@@ -1,20 +0,0 @@
1
- import { IntRange } from '../types';
2
- import { ICommonProps, ILayoutTypeProps, TStyles } from '../../constants';
3
- export interface IActionModalProps extends ICommonProps, ILayoutTypeProps {
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
- titleStyles?: TStyles;
16
- iconColor?: string;
17
- buttonWidth?: IntRange<1, 101>;
18
- backgroundColor?: string;
19
- inputFillType?: 'primary' | 'secondary';
20
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/ActionModal/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
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, fileColor, downloadColor, removeColor, fileIcon, onClick, onRemove, onDownload, }: IAttachedFileProps) => import("react/jsx-runtime").JSX.Element;
8
- export default AttachedFile;
@@ -1,60 +0,0 @@
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 { getColor, getDefaultGrayColorForIcon } 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, 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: { width: "".concat(width, "%") }, 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
- }), 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: getColor(fileColor, getDefaultGrayColorForIcon(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: getColor(removeColor, getDefaultGrayColorForIcon(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: getColor(downloadColor, COLORS.blue) } }) })))] }))] }))] }), weight));
58
- };
59
- export default AttachedFile;
60
- //# sourceMappingURL=AttachedFile.js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@@
1
- export { default } from './AttachedFile';
@@ -1,2 +0,0 @@
1
- export { default } from './AttachedFile';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/AttachedFile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,23 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { IntRange } from '../types';
3
- import { IThemeProps } 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
- fileColor?: string;
17
- downloadColor?: string;
18
- removeColor?: string;
19
- fileIcon?: ReactElement;
20
- onClick?: (file: any) => void;
21
- onRemove?: (file: any) => void;
22
- onDownload?: (file: any) => void;
23
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/AttachedFile/types.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import { IAvatarProps } from './types';
2
- import '../../styles/styles.scss';
3
- declare const Avatar: ({ theme, className, avatarRef, isSelected, isHighlighted, isInactive, isSpam, isCrown, size, username, initials, avatar, counter, outlineDefaultBackground, outlineDarkBackground, onClick, onMouseDown, }: IAvatarProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Avatar;
@@ -1,115 +0,0 @@
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 { getInitials, getPercentageOfValue, isDarkTheme, userNameToColor } from '../../helpers';
15
- import { AvatarFontSizes } from './types';
16
- import { COLORS, MAX_NUMBER_OF_CHARACTERS_IN_INITIALS, THEME } from '../../constants';
17
- import { ReactComponent as TickIcon } from '../../assets/icons/tick.svg';
18
- import { ReactComponent as InfoIcon } from '../../assets/icons/info.svg';
19
- import { ReactComponent as CrownIcon } from '../../assets/icons/crown.svg';
20
- import '../../styles/styles.scss';
21
- var PERCENTS;
22
- (function (PERCENTS) {
23
- PERCENTS[PERCENTS["pct_5"] = 5] = "pct_5";
24
- PERCENTS[PERCENTS["pct_10"] = 10] = "pct_10";
25
- PERCENTS[PERCENTS["pct_15"] = 15] = "pct_15";
26
- PERCENTS[PERCENTS["pct_40"] = 40] = "pct_40";
27
- PERCENTS[PERCENTS["pct_50"] = 50] = "pct_50";
28
- PERCENTS[PERCENTS["pct_57"] = 57] = "pct_57";
29
- PERCENTS[PERCENTS["pct_60"] = 60] = "pct_60";
30
- PERCENTS[PERCENTS["pct_75"] = 75] = "pct_75";
31
- })(PERCENTS || (PERCENTS = {}));
32
- var AVATAR_OPACITY = 0.5;
33
- var USER_INITIALS_OPACITY = 0.3;
34
- var Avatar = function (_a) {
35
- var _b = _a.theme, theme = _b === void 0 ? THEME.default : _b, className = _a.className, avatarRef = _a.avatarRef, isSelected = _a.isSelected, isHighlighted = _a.isHighlighted, isInactive = _a.isInactive, isSpam = _a.isSpam, isCrown = _a.isCrown, _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, _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;
36
- var inactiveOpacity = avatar ? AVATAR_OPACITY : USER_INITIALS_OPACITY;
37
- var outlineBackground = isDarkTheme(theme) ? outlineDarkBackground : outlineDefaultBackground;
38
- var outlineWidth = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
39
- var getFontSizeAvatar = function () {
40
- switch (size) {
41
- case 20:
42
- case 24: {
43
- return AvatarFontSizes.lowest;
44
- }
45
- case 32:
46
- case 40: {
47
- return AvatarFontSizes.small;
48
- }
49
- case 44:
50
- case 48: {
51
- return AvatarFontSizes.average;
52
- }
53
- case 56: {
54
- return AvatarFontSizes.high;
55
- }
56
- case 100: {
57
- return AvatarFontSizes.greatest;
58
- }
59
- }
60
- };
61
- var renderUserInitials = function () { return (initials === null || initials === void 0 ? void 0 : initials.slice(0, MAX_NUMBER_OF_CHARACTERS_IN_INITIALS).toUpperCase()) || getInitials(username); };
62
- var renderContent = function () {
63
- if (isSelected) {
64
- var tickSize = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_57 });
65
- return _jsx(TickIcon, { width: tickSize, height: tickSize });
66
- }
67
- if (isSpam) {
68
- var infoSize = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_60 });
69
- return _jsx(InfoIcon, { width: infoSize, height: infoSize });
70
- }
71
- return avatar ? _jsx("img", { src: avatar, alt: "avatar" }) : renderUserInitials();
72
- };
73
- var renderCounter = function () {
74
- var isSingleDigitNumber = counter <= 9;
75
- var counterText = isSingleDigitNumber ? counter : '9+';
76
- var width = getPercentageOfValue({ value: size, percentage: isSingleDigitNumber ? PERCENTS.pct_40 : PERCENTS.pct_50 });
77
- var height = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_40 });
78
- var fontSize = getPercentageOfValue({ value: height, percentage: PERCENTS.pct_75 });
79
- var top = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
80
- var right = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
81
- var borderWidth = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
82
- var borderRadius = isSingleDigitNumber ? '50%' : "".concat(height * 1.5625, "px");
83
- return (_jsx("div", __assign({ className: "smartapp-avatar__content--counter", style: {
84
- width: "".concat(width, "px"),
85
- height: "".concat(height, "px"),
86
- top: "-".concat(top, "px"),
87
- right: "-".concat(right, "px"),
88
- fontSize: "".concat(fontSize, "px"),
89
- border: "".concat(borderWidth, "px solid ").concat(outlineBackground),
90
- borderRadius: borderRadius,
91
- } }, { children: counterText })));
92
- };
93
- var renderCrown = function () {
94
- var bottom = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
95
- var right = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
96
- var crownSize = getPercentageOfValue({ value: size, percentage: PERCENTS.pct_50 });
97
- return (_jsx(CrownIcon, { className: "smartapp-avatar__content--crown", width: crownSize, height: crownSize, color: outlineBackground, style: { bottom: "-".concat(bottom, "px"), right: "-".concat(right, "px") } }));
98
- };
99
- var getAvatarContentStyles = function () { return ({
100
- width: "".concat(size, "px"),
101
- minWidth: "".concat(size, "px"),
102
- height: "".concat(size, "px"),
103
- fontSize: getFontSizeAvatar(),
104
- background: isInactive
105
- ? "linear-gradient(180deg, ".concat(COLORS.inactiveAvatarGradientStart, " 0%, ").concat(COLORS.inactiveAvatarGradientEnd, " 100%)")
106
- : userNameToColor(initials || username),
107
- opacity: isInactive ? inactiveOpacity : 1,
108
- }); };
109
- return (_jsx("div", __assign({ ref: avatarRef, className: classNames('smartapp-avatar', "smartapp-avatar__".concat(theme), { 'smartapp-avatar__outline': isHighlighted }, className), style: { '--avatar-outline-width': "".concat(outlineWidth, "px") }, onClick: onClick, onMouseDown: onMouseDown }, { children: _jsxs("div", __assign({ style: getAvatarContentStyles(), className: classNames('smartapp-avatar__content', {
110
- 'smartapp-avatar__content--spam': isSpam,
111
- 'smartapp-avatar__content--inactive': isInactive,
112
- }) }, { children: [!!counter && renderCounter(), renderContent(), isCrown && renderCrown()] })) })));
113
- };
114
- export default Avatar;
115
- //# sourceMappingURL=Avatar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/F,OAAO,EAAE,eAAe,EAAgB,MAAM,SAAS,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,oCAAoC,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACrF,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,0BAA0B,CAAA;AAEjC,IAAK,QASJ;AATD,WAAK,QAAQ;IACX,yCAAS,CAAA;IACT,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;AACb,CAAC,EATI,QAAQ,KAAR,QAAQ,QASZ;AAED,IAAM,cAAc,GAAG,GAAG,CAAA;AAC1B,IAAM,qBAAqB,GAAG,GAAG,CAAA;AAEjC,IAAM,MAAM,GAAG,UAAC,EAkBD;QAjBb,aAAqB,EAArB,KAAK,mBAAG,KAAK,CAAC,OAAO,KAAA,EACrB,SAAS,eAAA,EACT,SAAS,eAAA,EACT,UAAU,gBAAA,EACV,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,MAAM,YAAA,EACN,OAA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E,UAAU,CAAC,0BAA0B,EAAE;gBAChD,gCAAgC,EAAE,MAAM;gBACxC,oCAAoC,EAAE,UAAU;aACjD,CAAC,iBAED,CAAC,CAAC,OAAO,IAAI,aAAa,EAAE,EAC5B,aAAa,EAAE,EACf,OAAO,IAAI,WAAW,EAAE,KACrB,IACF,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,MAAM,CAAA"}
@@ -1 +0,0 @@
1
- export { default } from './Avatar';
@@ -1,2 +0,0 @@
1
- export { default } from './Avatar';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
@@ -1,36 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { IThemeProps } from '../../constants';
3
- export interface IAvatarProps extends IThemeProps {
4
- avatarRef?: RefObject<HTMLDivElement | null>;
5
- className?: string;
6
- isSelected?: boolean;
7
- isHighlighted?: boolean;
8
- isInactive?: boolean;
9
- isSpam?: boolean;
10
- isCrown?: boolean;
11
- size?: 20 | 24 | 32 | 40 | 44 | 48 | 56 | 100;
12
- username?: string;
13
- initials?: string;
14
- avatar?: string | null;
15
- counter?: number;
16
- outlineDefaultBackground?: string;
17
- outlineDarkBackground?: string;
18
- onClick?: () => void;
19
- onMouseDown?: () => void;
20
- }
21
- export declare enum AvatarFontSizes {
22
- lowest = "12px",
23
- small = "14px",
24
- average = "18px",
25
- high = "24px",
26
- greatest = "42px"
27
- }
28
- export interface IUsernameAvatarColor {
29
- degrees: number;
30
- top: string;
31
- topPercent: number;
32
- middle?: string | null;
33
- middlePercent?: number | null;
34
- bottom: string;
35
- bottomPercent: number;
36
- }
@@ -1,9 +0,0 @@
1
- export var AvatarFontSizes;
2
- (function (AvatarFontSizes) {
3
- AvatarFontSizes["lowest"] = "12px";
4
- AvatarFontSizes["small"] = "14px";
5
- AvatarFontSizes["average"] = "18px";
6
- AvatarFontSizes["high"] = "24px";
7
- AvatarFontSizes["greatest"] = "42px";
8
- })(AvatarFontSizes || (AvatarFontSizes = {}));
9
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/types.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,kCAAe,CAAA;IACf,iCAAc,CAAA;IACd,mCAAgB,CAAA;IAChB,gCAAa,CAAA;IACb,oCAAiB,CAAA;AACnB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B"}
@@ -1,4 +0,0 @@
1
- import { IButtonProps } from './types';
2
- import '../../styles/styles.scss';
3
- declare const Button: ({ title, isDisabled, isDisabledClickable, isWaitingResponse, type, appearance, icon, width, styles, onClick, }: IButtonProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Button;
@@ -1,46 +0,0 @@
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 { isNil } from 'lodash';
16
- import { ReactComponent as LoaderIcon } from '../../assets/icons/button-loader.svg';
17
- import { TButtonType, TButtonAppearance } from './types';
18
- import '../../styles/styles.scss';
19
- var Button = function (_a) {
20
- var title = _a.title, _b = _a.isDisabled, isDisabled = _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.type, type = _e === void 0 ? TButtonType.primary : _e, _f = _a.appearance, appearance = _f === void 0 ? TButtonAppearance.accent : _f, icon = _a.icon, _g = _a.width, width = _g === void 0 ? 100 : _g, styles = _a.styles, onClick = _a.onClick;
21
- var buttonTitleRef = useRef(null);
22
- var buttonTitleRefCurrent = buttonTitleRef.current;
23
- var changeTransitionDelay = function (transitionDelay) {
24
- return buttonTitleRefCurrent && (buttonTitleRefCurrent.style.transitionDelay = "".concat(transitionDelay, "ms"));
25
- };
26
- var handleButtonClick = function (event) { return (!isDisabled || (isDisabled && isDisabledClickable)) && onClick(event); };
27
- useEffect(function () {
28
- if (isWaitingResponse) {
29
- buttonTitleRefCurrent === null || buttonTitleRefCurrent === void 0 ? void 0 : buttonTitleRefCurrent.classList.add('smartapp-button__title--hidden');
30
- setTimeout(function () { return changeTransitionDelay(300); }, 150);
31
- }
32
- else {
33
- buttonTitleRefCurrent === null || buttonTitleRefCurrent === void 0 ? void 0 : buttonTitleRefCurrent.classList.remove('smartapp-button__title--hidden');
34
- setTimeout(function () { return changeTransitionDelay(0); }, 150);
35
- }
36
- // eslint-disable-next-line
37
- }, [isWaitingResponse]);
38
- return (_jsxs("div", __assign({ className: classNames('smartapp-button', "smartapp-button__".concat(appearance)), style: { width: "".concat(width, "%") } }, { children: [_jsxs("button", __assign({ className: classNames("smartapp-button__".concat(type), "smartapp-button__".concat(type, "--").concat(appearance), {
39
- 'smartapp-button__disabled': isDisabled,
40
- 'smartapp-button__with-icon': !isNil(icon),
41
- }), style: styles, onClick: handleButtonClick }, { children: [icon && _jsx("div", { 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(type), {
42
- 'smartapp-button__loader--hidden': !isWaitingResponse,
43
- }) }, { children: _jsx(LoaderIcon, {}) }))] })));
44
- };
45
- export default Button;
46
- //# sourceMappingURL=Button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/сomponents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,2 +0,0 @@
1
- export { default } from './Button';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA"}
@@ -1,23 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- import { IntRange } from '../types';
3
- import { TStyles } from '../../constants';
4
- export declare enum TButtonType {
5
- primary = "primary",
6
- secondary = "secondary"
7
- }
8
- export declare enum TButtonAppearance {
9
- accent = "accent",
10
- negative = "negative"
11
- }
12
- export interface IButtonProps {
13
- title: string;
14
- isDisabled?: boolean;
15
- isDisabledClickable?: boolean;
16
- isWaitingResponse?: boolean;
17
- type?: 'primary' | 'secondary';
18
- appearance?: 'accent' | 'negative';
19
- icon?: ReactElement;
20
- width?: IntRange<1, 101>;
21
- styles?: TStyles;
22
- onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
23
- }
@@ -1,11 +0,0 @@
1
- export var TButtonType;
2
- (function (TButtonType) {
3
- TButtonType["primary"] = "primary";
4
- TButtonType["secondary"] = "secondary";
5
- })(TButtonType || (TButtonType = {}));
6
- export var TButtonAppearance;
7
- (function (TButtonAppearance) {
8
- TButtonAppearance["accent"] = "accent";
9
- TButtonAppearance["negative"] = "negative";
10
- })(TButtonAppearance || (TButtonAppearance = {}));
11
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Button/types.ts"],"names":[],"mappings":"AAIA,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;AACzB,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;AACvB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B"}
@@ -1,4 +0,0 @@
1
- import { ICachedImageProps } from './types';
2
- import '../../styles/styles.scss';
3
- declare const CachedImage: ({ src, alt, className, width, height, borderRadius }: ICachedImageProps) => import("react/jsx-runtime").JSX.Element;
4
- export default CachedImage;
@@ -1,54 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useLayoutEffect, useState } from 'react';
3
- import classNames from 'classnames';
4
- import { isBlobUrl, tryToLoadImageFromCache, tryToSaveImageToCache } from './helpers';
5
- import '../../styles/styles.scss';
6
- var IMAGE_LOADING_STATE;
7
- (function (IMAGE_LOADING_STATE) {
8
- IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["pending"] = 0] = "pending";
9
- IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["success"] = 1] = "success";
10
- IMAGE_LOADING_STATE[IMAGE_LOADING_STATE["error"] = -1] = "error";
11
- })(IMAGE_LOADING_STATE || (IMAGE_LOADING_STATE = {}));
12
- var CachedImage = function (_a) {
13
- var src = _a.src, alt = _a.alt, className = _a.className, width = _a.width, height = _a.height, borderRadius = _a.borderRadius;
14
- var _b = useState(''), url = _b[0], setUrl = _b[1];
15
- var _c = useState(IMAGE_LOADING_STATE.pending), loadingState = _c[0], setLoadingState = _c[1];
16
- useLayoutEffect(function () {
17
- setUrl(src);
18
- }, [src]);
19
- // Очистка URL объекта после ошибки загрузки изображения
20
- useEffect(function () {
21
- if (loadingState === IMAGE_LOADING_STATE.error && isBlobUrl(url))
22
- URL.revokeObjectURL(url);
23
- return function () { return void 0; };
24
- }, [loadingState, url]);
25
- var isImageLoadingStatePending = function () { return loadingState === IMAGE_LOADING_STATE.pending; };
26
- // Обработчик успешной загрузки изображения
27
- var handleOnLoad = function () {
28
- if (!isImageLoadingStatePending())
29
- return;
30
- setLoadingState(IMAGE_LOADING_STATE.success);
31
- tryToSaveImageToCache(src);
32
- };
33
- // Обработчик ошибки загрузки изображения
34
- var handleOnError = function () {
35
- if (!isImageLoadingStatePending())
36
- return;
37
- setLoadingState(IMAGE_LOADING_STATE.error);
38
- tryToLoadImageFromCache(src).then(function (blobUrl) { return blobUrl && setUrl(blobUrl); });
39
- };
40
- var generateImageStyles = function () {
41
- var widthValue = width ? "".concat(width, "px") : '100%';
42
- var heightValue = height ? "".concat(height, "px") : '100%';
43
- return {
44
- minWidth: widthValue,
45
- minHeight: heightValue,
46
- width: widthValue,
47
- height: heightValue,
48
- borderRadius: "".concat(borderRadius, "px"),
49
- };
50
- };
51
- return (_jsx("img", { className: classNames('smartapp-cached-image', className), style: generateImageStyles(), src: url, alt: alt, onLoad: handleOnLoad, onError: handleOnError }));
52
- };
53
- export default CachedImage;
54
- //# sourceMappingURL=CachedImage.js.map