@expressms/smartapp-ui 2.9.0 → 2.9.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 (443) 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/more.svg +0 -3
  28. package/build/main/assets/icons/my-contact-user.svg +0 -10
  29. package/build/main/assets/icons/notification-close.svg +0 -3
  30. package/build/main/assets/icons/notification-error.svg +0 -3
  31. package/build/main/assets/icons/notification-failure.svg +0 -3
  32. package/build/main/assets/icons/notification-info.svg +0 -5
  33. package/build/main/assets/icons/notification-success.svg +0 -4
  34. package/build/main/assets/icons/notification-warning.svg +0 -5
  35. package/build/main/assets/icons/order.svg +0 -6
  36. package/build/main/assets/icons/plus.svg +0 -4
  37. package/build/main/assets/icons/private.svg +0 -12
  38. package/build/main/assets/icons/refresh.svg +0 -3
  39. package/build/main/assets/icons/story-loader.svg +0 -3
  40. package/build/main/assets/icons/tick.svg +0 -10
  41. package/build/main/assets/icons/trash.svg +0 -3
  42. package/build/main/assets/icons/unread-mails.svg +0 -4
  43. package/build/main/assets/storybook/index.d.ts +0 -21
  44. package/build/main/assets/storybook/index.js +0 -22
  45. package/build/main/assets/storybook/index.js.map +0 -1
  46. package/build/main/constants/constants.d.ts +0 -152
  47. package/build/main/constants/constants.js +0 -172
  48. package/build/main/constants/constants.js.map +0 -1
  49. package/build/main/constants/index.d.ts +0 -2
  50. package/build/main/constants/index.js +0 -3
  51. package/build/main/constants/index.js.map +0 -1
  52. package/build/main/constants/types.d.ts +0 -24
  53. package/build/main/constants/types.js +0 -2
  54. package/build/main/constants/types.js.map +0 -1
  55. package/build/main/helpers/index.d.ts +0 -22
  56. package/build/main/helpers/index.js +0 -89
  57. package/build/main/helpers/index.js.map +0 -1
  58. package/build/main/hooks/useModal.d.ts +0 -21
  59. package/build/main/hooks/useModal.js +0 -60
  60. package/build/main/hooks/useModal.js.map +0 -1
  61. package/build/main/index.d.ts +0 -36
  62. package/build/main/index.js +0 -37
  63. package/build/main/index.js.map +0 -1
  64. package/build/main/styles/index.d.ts +0 -1
  65. package/build/main/styles/index.js +0 -2
  66. package/build/main/styles/index.js.map +0 -1
  67. package/build/main/styles/main.js +0 -0
  68. package/build/main/styles/styles.scss +0 -14
  69. package/build/main//321/201omponents/ActionModal/ActionModal.d.ts +0 -4
  70. package/build/main//321/201omponents/ActionModal/ActionModal.js +0 -55
  71. package/build/main//321/201omponents/ActionModal/ActionModal.js.map +0 -1
  72. package/build/main//321/201omponents/ActionModal/index.d.ts +0 -1
  73. package/build/main//321/201omponents/ActionModal/index.js +0 -2
  74. package/build/main//321/201omponents/ActionModal/index.js.map +0 -1
  75. package/build/main//321/201omponents/ActionModal/types.d.ts +0 -24
  76. package/build/main//321/201omponents/ActionModal/types.js +0 -2
  77. package/build/main//321/201omponents/ActionModal/types.js.map +0 -1
  78. package/build/main//321/201omponents/AttachedFile/AttachedFile.d.ts +0 -8
  79. package/build/main//321/201omponents/AttachedFile/AttachedFile.js +0 -60
  80. package/build/main//321/201omponents/AttachedFile/AttachedFile.js.map +0 -1
  81. package/build/main//321/201omponents/AttachedFile/index.d.ts +0 -1
  82. package/build/main//321/201omponents/AttachedFile/index.js +0 -2
  83. package/build/main//321/201omponents/AttachedFile/index.js.map +0 -1
  84. package/build/main//321/201omponents/AttachedFile/types.d.ts +0 -25
  85. package/build/main//321/201omponents/AttachedFile/types.js +0 -2
  86. package/build/main//321/201omponents/AttachedFile/types.js.map +0 -1
  87. package/build/main//321/201omponents/Avatar/Avatar.d.ts +0 -4
  88. package/build/main//321/201omponents/Avatar/Avatar.js +0 -135
  89. package/build/main//321/201omponents/Avatar/Avatar.js.map +0 -1
  90. package/build/main//321/201omponents/Avatar/index.d.ts +0 -1
  91. package/build/main//321/201omponents/Avatar/index.js +0 -2
  92. package/build/main//321/201omponents/Avatar/index.js.map +0 -1
  93. package/build/main//321/201omponents/Avatar/types.d.ts +0 -58
  94. package/build/main//321/201omponents/Avatar/types.js +0 -29
  95. package/build/main//321/201omponents/Avatar/types.js.map +0 -1
  96. package/build/main//321/201omponents/Button/Button.d.ts +0 -4
  97. package/build/main//321/201omponents/Button/Button.js +0 -63
  98. package/build/main//321/201omponents/Button/Button.js.map +0 -1
  99. package/build/main//321/201omponents/Button/index.d.ts +0 -1
  100. package/build/main//321/201omponents/Button/index.js +0 -2
  101. package/build/main//321/201omponents/Button/index.js.map +0 -1
  102. package/build/main//321/201omponents/Button/types.d.ts +0 -28
  103. package/build/main//321/201omponents/Button/types.js +0 -11
  104. package/build/main//321/201omponents/Button/types.js.map +0 -1
  105. package/build/main//321/201omponents/CachedImage/CachedImage.d.ts +0 -4
  106. package/build/main//321/201omponents/CachedImage/CachedImage.js +0 -59
  107. package/build/main//321/201omponents/CachedImage/CachedImage.js.map +0 -1
  108. package/build/main//321/201omponents/CachedImage/helpers.d.ts +0 -3
  109. package/build/main//321/201omponents/CachedImage/helpers.js +0 -40
  110. package/build/main//321/201omponents/CachedImage/helpers.js.map +0 -1
  111. package/build/main//321/201omponents/CachedImage/index.d.ts +0 -1
  112. package/build/main//321/201omponents/CachedImage/index.js +0 -2
  113. package/build/main//321/201omponents/CachedImage/index.js.map +0 -1
  114. package/build/main//321/201omponents/CachedImage/types.d.ts +0 -10
  115. package/build/main//321/201omponents/CachedImage/types.js +0 -2
  116. package/build/main//321/201omponents/CachedImage/types.js.map +0 -1
  117. package/build/main//321/201omponents/Calendar/Calendar.d.ts +0 -4
  118. package/build/main//321/201omponents/Calendar/Calendar.js +0 -97
  119. package/build/main//321/201omponents/Calendar/Calendar.js.map +0 -1
  120. package/build/main//321/201omponents/Calendar/index.d.ts +0 -1
  121. package/build/main//321/201omponents/Calendar/index.js +0 -2
  122. package/build/main//321/201omponents/Calendar/index.js.map +0 -1
  123. package/build/main//321/201omponents/Calendar/types.d.ts +0 -13
  124. package/build/main//321/201omponents/Calendar/types.js +0 -2
  125. package/build/main//321/201omponents/Calendar/types.js.map +0 -1
  126. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.d.ts +0 -4
  127. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js +0 -46
  128. package/build/main//321/201omponents/Charts/ChartBar/ChartBar.js.map +0 -1
  129. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.d.ts +0 -4
  130. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js +0 -71
  131. package/build/main//321/201omponents/Charts/ChartLegend/ChartLegend.js.map +0 -1
  132. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.d.ts +0 -4
  133. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js +0 -41
  134. package/build/main//321/201omponents/Charts/ChartLine/ChartLine.js.map +0 -1
  135. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.d.ts +0 -4
  136. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js +0 -63
  137. package/build/main//321/201omponents/Charts/ChartPie/ChartPie.js.map +0 -1
  138. package/build/main//321/201omponents/Charts/colors.d.ts +0 -3
  139. package/build/main//321/201omponents/Charts/colors.js +0 -4
  140. package/build/main//321/201omponents/Charts/colors.js.map +0 -1
  141. package/build/main//321/201omponents/Charts/constants.d.ts +0 -46
  142. package/build/main//321/201omponents/Charts/constants.js +0 -43
  143. package/build/main//321/201omponents/Charts/constants.js.map +0 -1
  144. package/build/main//321/201omponents/Charts/helpers.d.ts +0 -17
  145. package/build/main//321/201omponents/Charts/helpers.js +0 -73
  146. package/build/main//321/201omponents/Charts/helpers.js.map +0 -1
  147. package/build/main//321/201omponents/Charts/index.d.ts +0 -3
  148. package/build/main//321/201omponents/Charts/index.js +0 -4
  149. package/build/main//321/201omponents/Charts/index.js.map +0 -1
  150. package/build/main//321/201omponents/Charts/types.d.ts +0 -88
  151. package/build/main//321/201omponents/Charts/types.js +0 -2
  152. package/build/main//321/201omponents/Charts/types.js.map +0 -1
  153. package/build/main//321/201omponents/Charts/useEvents.d.ts +0 -5
  154. package/build/main//321/201omponents/Charts/useEvents.js +0 -45
  155. package/build/main//321/201omponents/Charts/useEvents.js.map +0 -1
  156. package/build/main//321/201omponents/Charts/usePieEvents.d.ts +0 -6
  157. package/build/main//321/201omponents/Charts/usePieEvents.js +0 -57
  158. package/build/main//321/201omponents/Charts/usePieEvents.js.map +0 -1
  159. package/build/main//321/201omponents/Checkbox/Checkbox.d.ts +0 -4
  160. package/build/main//321/201omponents/Checkbox/Checkbox.js +0 -38
  161. package/build/main//321/201omponents/Checkbox/Checkbox.js.map +0 -1
  162. package/build/main//321/201omponents/Checkbox/index.d.ts +0 -1
  163. package/build/main//321/201omponents/Checkbox/index.js +0 -2
  164. package/build/main//321/201omponents/Checkbox/index.js.map +0 -1
  165. package/build/main//321/201omponents/Checkbox/types.d.ts +0 -12
  166. package/build/main//321/201omponents/Checkbox/types.js +0 -2
  167. package/build/main//321/201omponents/Checkbox/types.js.map +0 -1
  168. package/build/main//321/201omponents/Chip/Chip.d.ts +0 -4
  169. package/build/main//321/201omponents/Chip/Chip.js +0 -35
  170. package/build/main//321/201omponents/Chip/Chip.js.map +0 -1
  171. package/build/main//321/201omponents/Chip/index.d.ts +0 -1
  172. package/build/main//321/201omponents/Chip/index.js +0 -2
  173. package/build/main//321/201omponents/Chip/index.js.map +0 -1
  174. package/build/main//321/201omponents/Chip/types.d.ts +0 -13
  175. package/build/main//321/201omponents/Chip/types.js +0 -2
  176. package/build/main//321/201omponents/Chip/types.js.map +0 -1
  177. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.d.ts +0 -4
  178. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js +0 -70
  179. package/build/main//321/201omponents/ConfirmationModal/ConfirmationModal.js.map +0 -1
  180. package/build/main//321/201omponents/ConfirmationModal/index.d.ts +0 -1
  181. package/build/main//321/201omponents/ConfirmationModal/index.js +0 -2
  182. package/build/main//321/201omponents/ConfirmationModal/index.js.map +0 -1
  183. package/build/main//321/201omponents/ConfirmationModal/types.d.ts +0 -28
  184. package/build/main//321/201omponents/ConfirmationModal/types.js +0 -2
  185. package/build/main//321/201omponents/ConfirmationModal/types.js.map +0 -1
  186. package/build/main//321/201omponents/ContextMenu/ContextMenu.d.ts +0 -4
  187. package/build/main//321/201omponents/ContextMenu/ContextMenu.js +0 -82
  188. package/build/main//321/201omponents/ContextMenu/ContextMenu.js.map +0 -1
  189. package/build/main//321/201omponents/ContextMenu/index.d.ts +0 -1
  190. package/build/main//321/201omponents/ContextMenu/index.js +0 -2
  191. package/build/main//321/201omponents/ContextMenu/index.js.map +0 -1
  192. package/build/main//321/201omponents/ContextMenu/types.d.ts +0 -32
  193. package/build/main//321/201omponents/ContextMenu/types.js +0 -2
  194. package/build/main//321/201omponents/ContextMenu/types.js.map +0 -1
  195. package/build/main//321/201omponents/CustomSelect/CustomSelect.d.ts +0 -12
  196. package/build/main//321/201omponents/CustomSelect/CustomSelect.js +0 -243
  197. package/build/main//321/201omponents/CustomSelect/CustomSelect.js.map +0 -1
  198. package/build/main//321/201omponents/CustomSelect/index.d.ts +0 -1
  199. package/build/main//321/201omponents/CustomSelect/index.js +0 -2
  200. package/build/main//321/201omponents/CustomSelect/index.js.map +0 -1
  201. package/build/main//321/201omponents/CustomSelect/selectStyles.d.ts +0 -16
  202. package/build/main//321/201omponents/CustomSelect/selectStyles.js +0 -67
  203. package/build/main//321/201omponents/CustomSelect/selectStyles.js.map +0 -1
  204. package/build/main//321/201omponents/CustomSelect/types.d.ts +0 -64
  205. package/build/main//321/201omponents/CustomSelect/types.js +0 -2
  206. package/build/main//321/201omponents/CustomSelect/types.js.map +0 -1
  207. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.d.ts +0 -4
  208. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js +0 -57
  209. package/build/main//321/201omponents/CustomSelectProfiles/CustomSelectProfiles.js.map +0 -1
  210. package/build/main//321/201omponents/CustomSelectProfiles/index.d.ts +0 -1
  211. package/build/main//321/201omponents/CustomSelectProfiles/index.js +0 -2
  212. package/build/main//321/201omponents/CustomSelectProfiles/index.js.map +0 -1
  213. package/build/main//321/201omponents/CustomSelectProfiles/types.d.ts +0 -12
  214. package/build/main//321/201omponents/CustomSelectProfiles/types.js +0 -2
  215. package/build/main//321/201omponents/CustomSelectProfiles/types.js.map +0 -1
  216. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.d.ts +0 -4
  217. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js +0 -57
  218. package/build/main//321/201omponents/DragAndDrop/DragAndDrop.js.map +0 -1
  219. package/build/main//321/201omponents/DragAndDrop/index.d.ts +0 -1
  220. package/build/main//321/201omponents/DragAndDrop/index.js +0 -2
  221. package/build/main//321/201omponents/DragAndDrop/index.js.map +0 -1
  222. package/build/main//321/201omponents/DragAndDrop/types.d.ts +0 -24
  223. package/build/main//321/201omponents/DragAndDrop/types.js +0 -2
  224. package/build/main//321/201omponents/DragAndDrop/types.js.map +0 -1
  225. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.d.ts +0 -4
  226. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js +0 -223
  227. package/build/main//321/201omponents/DraggablePopup/DraggablePopup.js.map +0 -1
  228. package/build/main//321/201omponents/DraggablePopup/index.d.ts +0 -1
  229. package/build/main//321/201omponents/DraggablePopup/index.js +0 -2
  230. package/build/main//321/201omponents/DraggablePopup/index.js.map +0 -1
  231. package/build/main//321/201omponents/DraggablePopup/types.d.ts +0 -87
  232. package/build/main//321/201omponents/DraggablePopup/types.js +0 -2
  233. package/build/main//321/201omponents/DraggablePopup/types.js.map +0 -1
  234. package/build/main//321/201omponents/Error/Error.d.ts +0 -4
  235. package/build/main//321/201omponents/Error/Error.js +0 -23
  236. package/build/main//321/201omponents/Error/Error.js.map +0 -1
  237. package/build/main//321/201omponents/Error/index.d.ts +0 -1
  238. package/build/main//321/201omponents/Error/index.js +0 -2
  239. package/build/main//321/201omponents/Error/index.js.map +0 -1
  240. package/build/main//321/201omponents/Error/types.d.ts +0 -10
  241. package/build/main//321/201omponents/Error/types.js +0 -2
  242. package/build/main//321/201omponents/Error/types.js.map +0 -1
  243. package/build/main//321/201omponents/Flex/Flex.d.ts +0 -2
  244. package/build/main//321/201omponents/Flex/Flex.js +0 -49
  245. package/build/main//321/201omponents/Flex/Flex.js.map +0 -1
  246. package/build/main//321/201omponents/Flex/HFlex/HFlex.d.ts +0 -5
  247. package/build/main//321/201omponents/Flex/HFlex/HFlex.js +0 -16
  248. package/build/main//321/201omponents/Flex/HFlex/HFlex.js.map +0 -1
  249. package/build/main//321/201omponents/Flex/HFlex/index.d.ts +0 -1
  250. package/build/main//321/201omponents/Flex/HFlex/index.js +0 -2
  251. package/build/main//321/201omponents/Flex/HFlex/index.js.map +0 -1
  252. package/build/main//321/201omponents/Flex/VFlex/VFlex.d.ts +0 -5
  253. package/build/main//321/201omponents/Flex/VFlex/VFlex.js +0 -16
  254. package/build/main//321/201omponents/Flex/VFlex/VFlex.js.map +0 -1
  255. package/build/main//321/201omponents/Flex/VFlex/index.d.ts +0 -1
  256. package/build/main//321/201omponents/Flex/VFlex/index.js +0 -2
  257. package/build/main//321/201omponents/Flex/VFlex/index.js.map +0 -1
  258. package/build/main//321/201omponents/Flex/index.d.ts +0 -3
  259. package/build/main//321/201omponents/Flex/index.js +0 -4
  260. package/build/main//321/201omponents/Flex/index.js.map +0 -1
  261. package/build/main//321/201omponents/Flex/types.d.ts +0 -15
  262. package/build/main//321/201omponents/Flex/types.js +0 -2
  263. package/build/main//321/201omponents/Flex/types.js.map +0 -1
  264. package/build/main//321/201omponents/Header/Header.d.ts +0 -5
  265. package/build/main//321/201omponents/Header/Header.js +0 -124
  266. package/build/main//321/201omponents/Header/Header.js.map +0 -1
  267. package/build/main//321/201omponents/Header/index.d.ts +0 -1
  268. package/build/main//321/201omponents/Header/index.js +0 -2
  269. package/build/main//321/201omponents/Header/index.js.map +0 -1
  270. package/build/main//321/201omponents/Header/types.d.ts +0 -46
  271. package/build/main//321/201omponents/Header/types.js +0 -2
  272. package/build/main//321/201omponents/Header/types.js.map +0 -1
  273. package/build/main//321/201omponents/Input/Input.d.ts +0 -4
  274. package/build/main//321/201omponents/Input/Input.js +0 -207
  275. package/build/main//321/201omponents/Input/Input.js.map +0 -1
  276. package/build/main//321/201omponents/Input/index.d.ts +0 -1
  277. package/build/main//321/201omponents/Input/index.js +0 -2
  278. package/build/main//321/201omponents/Input/index.js.map +0 -1
  279. package/build/main//321/201omponents/Input/types.d.ts +0 -29
  280. package/build/main//321/201omponents/Input/types.js +0 -2
  281. package/build/main//321/201omponents/Input/types.js.map +0 -1
  282. package/build/main//321/201omponents/ListItem/ListItem.d.ts +0 -23
  283. package/build/main//321/201omponents/ListItem/ListItem.js +0 -208
  284. package/build/main//321/201omponents/ListItem/ListItem.js.map +0 -1
  285. package/build/main//321/201omponents/ListItem/index.d.ts +0 -1
  286. package/build/main//321/201omponents/ListItem/index.js +0 -2
  287. package/build/main//321/201omponents/ListItem/index.js.map +0 -1
  288. package/build/main//321/201omponents/ListItem/types.d.ts +0 -42
  289. package/build/main//321/201omponents/ListItem/types.js +0 -2
  290. package/build/main//321/201omponents/ListItem/types.js.map +0 -1
  291. package/build/main//321/201omponents/Loader/Loader.d.ts +0 -4
  292. package/build/main//321/201omponents/Loader/Loader.js +0 -44
  293. package/build/main//321/201omponents/Loader/Loader.js.map +0 -1
  294. package/build/main//321/201omponents/Loader/index.d.ts +0 -1
  295. package/build/main//321/201omponents/Loader/index.js +0 -2
  296. package/build/main//321/201omponents/Loader/index.js.map +0 -1
  297. package/build/main//321/201omponents/Loader/types.d.ts +0 -18
  298. package/build/main//321/201omponents/Loader/types.js +0 -2
  299. package/build/main//321/201omponents/Loader/types.js.map +0 -1
  300. package/build/main//321/201omponents/Modal/Modal.d.ts +0 -4
  301. package/build/main//321/201omponents/Modal/Modal.js +0 -143
  302. package/build/main//321/201omponents/Modal/Modal.js.map +0 -1
  303. package/build/main//321/201omponents/Modal/index.d.ts +0 -1
  304. package/build/main//321/201omponents/Modal/index.js +0 -2
  305. package/build/main//321/201omponents/Modal/index.js.map +0 -1
  306. package/build/main//321/201omponents/Modal/types.d.ts +0 -34
  307. package/build/main//321/201omponents/Modal/types.js +0 -2
  308. package/build/main//321/201omponents/Modal/types.js.map +0 -1
  309. package/build/main//321/201omponents/Notification/Notification.d.ts +0 -8
  310. package/build/main//321/201omponents/Notification/Notification.js +0 -217
  311. package/build/main//321/201omponents/Notification/Notification.js.map +0 -1
  312. package/build/main//321/201omponents/Notification/index.d.ts +0 -1
  313. package/build/main//321/201omponents/Notification/index.js +0 -2
  314. package/build/main//321/201omponents/Notification/index.js.map +0 -1
  315. package/build/main//321/201omponents/Notification/types.d.ts +0 -45
  316. package/build/main//321/201omponents/Notification/types.js +0 -2
  317. package/build/main//321/201omponents/Notification/types.js.map +0 -1
  318. package/build/main//321/201omponents/Profile/Profile.d.ts +0 -4
  319. package/build/main//321/201omponents/Profile/Profile.js +0 -42
  320. package/build/main//321/201omponents/Profile/Profile.js.map +0 -1
  321. package/build/main//321/201omponents/Profile/index.d.ts +0 -1
  322. package/build/main//321/201omponents/Profile/index.js +0 -2
  323. package/build/main//321/201omponents/Profile/index.js.map +0 -1
  324. package/build/main//321/201omponents/Profile/types.d.ts +0 -14
  325. package/build/main//321/201omponents/Profile/types.js +0 -2
  326. package/build/main//321/201omponents/Profile/types.js.map +0 -1
  327. package/build/main//321/201omponents/ProgressBar/ProgressBar.d.ts +0 -4
  328. package/build/main//321/201omponents/ProgressBar/ProgressBar.js +0 -66
  329. package/build/main//321/201omponents/ProgressBar/ProgressBar.js.map +0 -1
  330. package/build/main//321/201omponents/ProgressBar/index.d.ts +0 -1
  331. package/build/main//321/201omponents/ProgressBar/index.js +0 -2
  332. package/build/main//321/201omponents/ProgressBar/index.js.map +0 -1
  333. package/build/main//321/201omponents/ProgressBar/types.d.ts +0 -7
  334. package/build/main//321/201omponents/ProgressBar/types.js +0 -2
  335. package/build/main//321/201omponents/ProgressBar/types.js.map +0 -1
  336. package/build/main//321/201omponents/RadioButton/RadioButton.d.ts +0 -4
  337. package/build/main//321/201omponents/RadioButton/RadioButton.js +0 -37
  338. package/build/main//321/201omponents/RadioButton/RadioButton.js.map +0 -1
  339. package/build/main//321/201omponents/RadioButton/index.d.ts +0 -1
  340. package/build/main//321/201omponents/RadioButton/index.js +0 -2
  341. package/build/main//321/201omponents/RadioButton/index.js.map +0 -1
  342. package/build/main//321/201omponents/RadioButton/types.d.ts +0 -12
  343. package/build/main//321/201omponents/RadioButton/types.js +0 -2
  344. package/build/main//321/201omponents/RadioButton/types.js.map +0 -1
  345. package/build/main//321/201omponents/ScrollBar/ScrollBar.d.ts +0 -5
  346. package/build/main//321/201omponents/ScrollBar/ScrollBar.js +0 -63
  347. package/build/main//321/201omponents/ScrollBar/ScrollBar.js.map +0 -1
  348. package/build/main//321/201omponents/ScrollBar/index.d.ts +0 -1
  349. package/build/main//321/201omponents/ScrollBar/index.js +0 -2
  350. package/build/main//321/201omponents/ScrollBar/index.js.map +0 -1
  351. package/build/main//321/201omponents/ScrollBar/types.d.ts +0 -20
  352. package/build/main//321/201omponents/ScrollBar/types.js +0 -2
  353. package/build/main//321/201omponents/ScrollBar/types.js.map +0 -1
  354. package/build/main//321/201omponents/Skeleton/Skeleton.d.ts +0 -4
  355. package/build/main//321/201omponents/Skeleton/Skeleton.js +0 -59
  356. package/build/main//321/201omponents/Skeleton/Skeleton.js.map +0 -1
  357. package/build/main//321/201omponents/Skeleton/index.d.ts +0 -1
  358. package/build/main//321/201omponents/Skeleton/index.js +0 -2
  359. package/build/main//321/201omponents/Skeleton/index.js.map +0 -1
  360. package/build/main//321/201omponents/Skeleton/types.d.ts +0 -17
  361. package/build/main//321/201omponents/Skeleton/types.js +0 -2
  362. package/build/main//321/201omponents/Skeleton/types.js.map +0 -1
  363. package/build/main//321/201omponents/Stories/Stories.d.ts +0 -4
  364. package/build/main//321/201omponents/Stories/Stories.js +0 -300
  365. package/build/main//321/201omponents/Stories/Stories.js.map +0 -1
  366. package/build/main//321/201omponents/Stories/index.d.ts +0 -1
  367. package/build/main//321/201omponents/Stories/index.js +0 -2
  368. package/build/main//321/201omponents/Stories/index.js.map +0 -1
  369. package/build/main//321/201omponents/Stories/types.d.ts +0 -70
  370. package/build/main//321/201omponents/Stories/types.js +0 -16
  371. package/build/main//321/201omponents/Stories/types.js.map +0 -1
  372. package/build/main//321/201omponents/Switcher/Switcher.d.ts +0 -4
  373. package/build/main//321/201omponents/Switcher/Switcher.js +0 -34
  374. package/build/main//321/201omponents/Switcher/Switcher.js.map +0 -1
  375. package/build/main//321/201omponents/Switcher/index.d.ts +0 -1
  376. package/build/main//321/201omponents/Switcher/index.js +0 -2
  377. package/build/main//321/201omponents/Switcher/index.js.map +0 -1
  378. package/build/main//321/201omponents/Switcher/types.d.ts +0 -8
  379. package/build/main//321/201omponents/Switcher/types.js +0 -2
  380. package/build/main//321/201omponents/Switcher/types.js.map +0 -1
  381. package/build/main//321/201omponents/SyncLoader/SyncLoader.d.ts +0 -5
  382. package/build/main//321/201omponents/SyncLoader/SyncLoader.js +0 -65
  383. package/build/main//321/201omponents/SyncLoader/SyncLoader.js.map +0 -1
  384. package/build/main//321/201omponents/SyncLoader/index.d.ts +0 -1
  385. package/build/main//321/201omponents/SyncLoader/index.js +0 -2
  386. package/build/main//321/201omponents/SyncLoader/index.js.map +0 -1
  387. package/build/main//321/201omponents/SyncLoader/types.d.ts +0 -9
  388. package/build/main//321/201omponents/SyncLoader/types.js +0 -2
  389. package/build/main//321/201omponents/SyncLoader/types.js.map +0 -1
  390. package/build/main//321/201omponents/Textarea/Textarea.d.ts +0 -4
  391. package/build/main//321/201omponents/Textarea/Textarea.js +0 -96
  392. package/build/main//321/201omponents/Textarea/Textarea.js.map +0 -1
  393. package/build/main//321/201omponents/Textarea/index.d.ts +0 -1
  394. package/build/main//321/201omponents/Textarea/index.js +0 -2
  395. package/build/main//321/201omponents/Textarea/index.js.map +0 -1
  396. package/build/main//321/201omponents/Textarea/types.d.ts +0 -12
  397. package/build/main//321/201omponents/Textarea/types.js +0 -2
  398. package/build/main//321/201omponents/Textarea/types.js.map +0 -1
  399. package/build/main//321/201omponents/Toggle/Toggle.d.ts +0 -4
  400. package/build/main//321/201omponents/Toggle/Toggle.js +0 -38
  401. package/build/main//321/201omponents/Toggle/Toggle.js.map +0 -1
  402. package/build/main//321/201omponents/Toggle/index.d.ts +0 -1
  403. package/build/main//321/201omponents/Toggle/index.js +0 -2
  404. package/build/main//321/201omponents/Toggle/index.js.map +0 -1
  405. package/build/main//321/201omponents/Toggle/types.d.ts +0 -12
  406. package/build/main//321/201omponents/Toggle/types.js +0 -2
  407. package/build/main//321/201omponents/Toggle/types.js.map +0 -1
  408. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.d.ts +0 -4
  409. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js +0 -31
  410. package/build/main//321/201omponents/UserDropdown/ContactBottomSheet/ContactBottomSheet.js.map +0 -1
  411. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.d.ts +0 -4
  412. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js +0 -82
  413. package/build/main//321/201omponents/UserDropdown/ContactInfo/ContactInfo.js.map +0 -1
  414. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.d.ts +0 -4
  415. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js +0 -23
  416. package/build/main//321/201omponents/UserDropdown/LoadingMessage/LoadingMessage.js.map +0 -1
  417. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.d.ts +0 -4
  418. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js +0 -121
  419. package/build/main//321/201omponents/UserDropdown/MenuList/MenuList.js.map +0 -1
  420. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.d.ts +0 -3
  421. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js +0 -100
  422. package/build/main//321/201omponents/UserDropdown/MultiValueLabel/MultiValueLabel.js.map +0 -1
  423. package/build/main//321/201omponents/UserDropdown/Option/Option.d.ts +0 -4
  424. package/build/main//321/201omponents/UserDropdown/Option/Option.js +0 -91
  425. package/build/main//321/201omponents/UserDropdown/Option/Option.js.map +0 -1
  426. package/build/main//321/201omponents/UserDropdown/UserDropdown.d.ts +0 -5
  427. package/build/main//321/201omponents/UserDropdown/UserDropdown.js +0 -447
  428. package/build/main//321/201omponents/UserDropdown/UserDropdown.js.map +0 -1
  429. package/build/main//321/201omponents/UserDropdown/helpers.d.ts +0 -98
  430. package/build/main//321/201omponents/UserDropdown/helpers.js +0 -93
  431. package/build/main//321/201omponents/UserDropdown/helpers.js.map +0 -1
  432. package/build/main//321/201omponents/UserDropdown/index.d.ts +0 -1
  433. package/build/main//321/201omponents/UserDropdown/index.js +0 -2
  434. package/build/main//321/201omponents/UserDropdown/index.js.map +0 -1
  435. package/build/main//321/201omponents/UserDropdown/selectStyles.d.ts +0 -15
  436. package/build/main//321/201omponents/UserDropdown/selectStyles.js +0 -80
  437. package/build/main//321/201omponents/UserDropdown/selectStyles.js.map +0 -1
  438. package/build/main//321/201omponents/UserDropdown/types.d.ts +0 -200
  439. package/build/main//321/201omponents/UserDropdown/types.js +0 -2
  440. package/build/main//321/201omponents/UserDropdown/types.js.map +0 -1
  441. package/build/main//321/201omponents/types.d.ts +0 -2
  442. package/build/main//321/201omponents/types.js +0 -2
  443. 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, 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;
@@ -1,55 +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 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
@@ -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,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,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CAAC,EAAE,KAAK,EAAE,MAAM,gBACrF,wBAAK,SAAS,EAAC,gCAAgC,iBAC7C,0BACG,CAAC,oBAAoB,IAAI,CACxB,cAAK,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE,EAAE,4BAA4B,EAAE,wBAAwB,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAI,CACzH,EACD,qBACE,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,kBAAkB,CAAC,EAAE,SAAS,EAAE,uCAAuC,EAAE,SAAS,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,CAAC,EACrI,KAAK,EAAE,WAAW,gBAEjB,KAAK,IACJ,IACA,EACL,CAAC,oBAAoB,IAAI,CACxB,uBAAK,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAC,8CAA8C,gBACtF,KAAC,SAAS,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"}
@@ -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,24 +0,0 @@
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
- }
@@ -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, className, styles, 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 { 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
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttachedFile.js","sourceRoot":"","sources":["../../../../src/сomponents/AttachedFile/AttachedFile.tsx"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,EAAE,cAAc,IAAI,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,EAAE,cAAc,IAAI,UAAU,EAAE,MAAM,0CAA0C,CAAA;AACvF,OAAO,EAAE,aAAa,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,0BAA0B,CAAA;AAEjC,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,iCAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,IAAM,YAAY,GAAG,UAAC,EAsBD;QArBnB,aAAqB,EAArB,KAAK,mBAAG,KAAK,CAAC,OAAO,KAAA,EACrB,QAAQ,cAAA,EACR,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,mCAAmC,EAAnC,2BAA2B,mBAAG,KAAK,KAAA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,IAAI,CACjB,uBACE,OAAO,EAAE,wBAAwB,EACjC,SAAS,EAAE,UAAU,CAAC,gDAAgD,EAAE;oCACtE,0DAA0D,EAAE,UAAU;oCACtE,yDAAyD,EAAE,SAAS;iCACrE,CAAC,gBAEF,KAAC,YAAY,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,GAAI,IACzE,CACP,KACG,KACF,MA9DD,MAAM,CA+DP,CACP,CAAA;AACH,CAAC,CAAA;AAED,eAAe,YAAY,CAAA"}
@@ -1 +0,0 @@
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,25 +0,0 @@
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
- }
@@ -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, styles, avatarRef, isSelected, isHighlighted, isInactive, isSpam, isCrown, isEye, size, username, initials, avatar, counter, icon, outlineDefaultBackground, outlineDarkBackground, onClick, onMouseDown, }: IAvatarProps) => import("react/jsx-runtime").JSX.Element;
4
- export default Avatar;
@@ -1,135 +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 { calculatePercentageOfValue, createInitials, isDarkTheme, userNameToColor } from '../../helpers';
15
- import { AVATAR_SIZES, 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 { ReactComponent as PrivateIcon } from '../../assets/icons/private.svg';
21
- import '../../styles/styles.scss';
22
- var PERCENTS;
23
- (function (PERCENTS) {
24
- PERCENTS[PERCENTS["pct_5"] = 5] = "pct_5";
25
- PERCENTS[PERCENTS["pct_8"] = 8] = "pct_8";
26
- PERCENTS[PERCENTS["pct_10"] = 10] = "pct_10";
27
- PERCENTS[PERCENTS["pct_15"] = 15] = "pct_15";
28
- PERCENTS[PERCENTS["pct_25"] = 25] = "pct_25";
29
- PERCENTS[PERCENTS["pct_40"] = 40] = "pct_40";
30
- PERCENTS[PERCENTS["pct_50"] = 50] = "pct_50";
31
- PERCENTS[PERCENTS["pct_57"] = 57] = "pct_57";
32
- PERCENTS[PERCENTS["pct_60"] = 60] = "pct_60";
33
- PERCENTS[PERCENTS["pct_62_5"] = 62.5] = "pct_62_5";
34
- PERCENTS[PERCENTS["pct_65"] = 65] = "pct_65";
35
- PERCENTS[PERCENTS["pct_75"] = 75] = "pct_75";
36
- })(PERCENTS || (PERCENTS = {}));
37
- var AVATAR_OPACITY = 0.5;
38
- var USER_INITIALS_OPACITY = 0.3;
39
- var Avatar = function (_a) {
40
- 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, 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;
41
- var inactiveOpacity = avatar ? AVATAR_OPACITY : USER_INITIALS_OPACITY;
42
- var outlineBackground = isDarkTheme(theme) ? outlineDarkBackground : outlineDefaultBackground;
43
- var outlineWidth = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
44
- var generateFontSizeAvatar = function () {
45
- switch (size) {
46
- case AVATAR_SIZES.size_16:
47
- return AvatarFontSizes.xSmall;
48
- case AVATAR_SIZES.size_20:
49
- case AVATAR_SIZES.size_24:
50
- return AvatarFontSizes.small;
51
- case AVATAR_SIZES.size_32:
52
- case AVATAR_SIZES.size_36:
53
- case AVATAR_SIZES.size_40:
54
- return AvatarFontSizes.normal;
55
- case AVATAR_SIZES.size_44:
56
- case AVATAR_SIZES.size_48:
57
- return AvatarFontSizes.medium;
58
- case AVATAR_SIZES.size_56:
59
- case AVATAR_SIZES.size_64:
60
- case AVATAR_SIZES.size_80:
61
- return AvatarFontSizes.large;
62
- case AVATAR_SIZES.size_100:
63
- return AvatarFontSizes.xLarge;
64
- case AVATAR_SIZES.size_160:
65
- return AvatarFontSizes.xxLarge;
66
- case AVATAR_SIZES.size_200:
67
- return AvatarFontSizes.xxxLarge;
68
- }
69
- };
70
- var renderUserInitials = function () { return (initials === null || initials === void 0 ? void 0 : initials.slice(0, MAX_NUMBER_OF_CHARACTERS_IN_INITIALS).toUpperCase()) || createInitials(username); };
71
- var renderContent = function () {
72
- if (isSelected) {
73
- var tickSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_57 });
74
- return _jsx(TickIcon, { width: tickSize, height: tickSize });
75
- }
76
- if (isSpam) {
77
- var infoSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_60 });
78
- return _jsx(InfoIcon, { width: infoSize, height: infoSize });
79
- }
80
- if (icon) {
81
- var iconSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_62_5 });
82
- var iconSizeInPx = "".concat(iconSize, "px");
83
- return (_jsx("div", __assign({ className: "smartapp-avatar__content--icon", style: { width: iconSizeInPx, height: iconSizeInPx } }, { children: icon })));
84
- }
85
- return avatar ? _jsx("img", { src: avatar, alt: "avatar" }) : renderUserInitials();
86
- };
87
- var renderCounter = function () {
88
- var isSingleDigitNumber = counter <= 9;
89
- var counterText = isSingleDigitNumber ? counter : '9+';
90
- var width = calculatePercentageOfValue({ value: size, percentage: isSingleDigitNumber ? PERCENTS.pct_40 : PERCENTS.pct_50 });
91
- var height = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_40 });
92
- var fontSize = calculatePercentageOfValue({ value: height, percentage: PERCENTS.pct_75 });
93
- var top = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
94
- var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
95
- var borderWidth = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_5, shouldBeRounded: false });
96
- var borderRadius = isSingleDigitNumber ? '50%' : "".concat(height * 1.5625, "px");
97
- return (_jsx("div", __assign({ className: "smartapp-avatar__content--counter", style: {
98
- width: "".concat(width, "px"),
99
- height: "".concat(height, "px"),
100
- top: "-".concat(top, "px"),
101
- right: "-".concat(right, "px"),
102
- fontSize: "".concat(fontSize, "px"),
103
- border: "".concat(borderWidth, "px solid ").concat(outlineBackground),
104
- borderRadius: borderRadius,
105
- } }, { children: counterText })));
106
- };
107
- var renderEye = function () {
108
- var top = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_8 });
109
- var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_25 });
110
- var eyeSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_65 });
111
- return (_jsx(PrivateIcon, { className: "smartapp-avatar__content--eye", width: eyeSize, height: eyeSize, color: outlineBackground, style: { top: "-".concat(top, "px"), right: "-".concat(right, "px") } }));
112
- };
113
- var renderCrown = function () {
114
- var bottom = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_10 });
115
- var right = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_15 });
116
- var crownSize = calculatePercentageOfValue({ value: size, percentage: PERCENTS.pct_50 });
117
- return (_jsx(CrownIcon, { className: "smartapp-avatar__content--crown", width: crownSize, height: crownSize, color: outlineBackground, style: { bottom: "-".concat(bottom, "px"), right: "-".concat(right, "px") } }));
118
- };
119
- var generateAvatarContentStyles = function () { return ({
120
- width: "".concat(size, "px"),
121
- minWidth: "".concat(size, "px"),
122
- height: "".concat(size, "px"),
123
- fontSize: generateFontSizeAvatar(),
124
- background: isInactive
125
- ? "linear-gradient(180deg, ".concat(COLORS.inactiveAvatarGradientStart, " 0%, ").concat(COLORS.inactiveAvatarGradientEnd, " 100%)")
126
- : userNameToColor(initials || username),
127
- opacity: isInactive ? inactiveOpacity : 1,
128
- }); };
129
- 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', {
130
- 'smartapp-avatar__content--spam': isSpam,
131
- 'smartapp-avatar__content--inactive': isInactive,
132
- }) }, { children: [!!counter && renderCounter(), isEye && renderEye(), renderContent(), isCrown && renderCrown()] })) })));
133
- };
134
- export default Avatar;
135
- //# 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,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,cAAc,IAAI,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,EAAE,cAAc,IAAI,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EAAE,cAAc,IAAI,WAAW,EAAE,MAAM,gCAAgC,CAAA;AAC9E,OAAO,0BAA0B,CAAA;AAEjC,IAAK,QAaJ;AAbD,WAAK,QAAQ;IACX,yCAAS,CAAA;IACT,yCAAS,CAAA;IACT,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CAAA;IACX,4CAAW,CA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UAAU;YACpB,CAAC,CAAC,kCAA2B,MAAM,CAAC,2BAA2B,kBAAQ,MAAM,CAAC,yBAAyB,WAAQ;YAC/G,CAAC,CAAC,eAAe,CAAC,QAAQ,IAAI,QAAQ,CAAC;QACzC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;KAC1C,CAAC,EATwC,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"}
@@ -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,58 +0,0 @@
1
- import { 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
- isEye?: boolean;
13
- size?: 16 | 20 | 24 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 100 | 160 | 200;
14
- username?: string;
15
- initials?: string;
16
- avatar?: string | null;
17
- counter?: number;
18
- icon?: ReactNode;
19
- outlineDefaultBackground?: string;
20
- outlineDarkBackground?: string;
21
- onClick?: () => void;
22
- onMouseDown?: () => void;
23
- }
24
- export declare enum AVATAR_SIZES {
25
- size_16 = 16,
26
- size_20 = 20,
27
- size_24 = 24,
28
- size_32 = 32,
29
- size_36 = 36,
30
- size_40 = 40,
31
- size_44 = 44,
32
- size_48 = 48,
33
- size_56 = 56,
34
- size_64 = 64,
35
- size_80 = 80,
36
- size_100 = 100,
37
- size_160 = 160,
38
- size_200 = 200
39
- }
40
- export declare enum AvatarFontSizes {
41
- xSmall = "5px",
42
- small = "10px",
43
- normal = "14px",
44
- medium = "18px",
45
- large = "24px",
46
- xLarge = "32px",
47
- xxLarge = "42px",
48
- xxxLarge = "48px"
49
- }
50
- export interface IUsernameAvatarColor {
51
- degrees: number;
52
- top: string;
53
- topPercent: number;
54
- middle?: string | null;
55
- middlePercent?: number | null;
56
- bottom: string;
57
- bottomPercent: number;
58
- }
@@ -1,29 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/сomponents/Avatar/types.ts"],"names":[],"mappings":"AAyBA,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"}
@@ -1,4 +0,0 @@
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;
@@ -1,63 +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
- 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
@@ -1 +0,0 @@
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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I,IAAI,CACP,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"}
@@ -1 +0,0 @@
1
- export { default } from './Button';
@@ -1,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"}