@true-engineering/true-react-common-ui-kit 4.0.0-alpha6 → 4.0.0-alpha62

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 (489) hide show
  1. package/README.md +12 -660
  2. package/dist/components/AccountInfo/AccountInfo.styles.d.ts +1 -1
  3. package/dist/components/AddButton/AddButton.d.ts +1 -0
  4. package/dist/components/AddButton/AddButton.styles.d.ts +1 -1
  5. package/dist/components/Button/Button.d.ts +1 -1
  6. package/dist/components/Button/Button.styles.d.ts +1 -1
  7. package/dist/components/Checkbox/Checkbox.d.ts +3 -1
  8. package/dist/components/Checkbox/Checkbox.styles.d.ts +3 -2
  9. package/dist/components/Checkbox/index.d.ts +1 -0
  10. package/dist/components/Checkbox/types.d.ts +3 -0
  11. package/dist/components/CloseButton/CloseButton.styles.d.ts +1 -1
  12. package/dist/components/ControlWrapper/ControlWrapper.d.ts +10 -3
  13. package/dist/components/ControlWrapper/ControlWrapper.styles.d.ts +3 -2
  14. package/dist/components/ControlWrapper/constants.d.ts +1 -0
  15. package/dist/components/ControlWrapper/helpers.d.ts +4 -0
  16. package/dist/components/ControlWrapper/index.d.ts +3 -0
  17. package/dist/components/ControlWrapper/types.d.ts +14 -0
  18. package/dist/components/CssBaseline/CssBaseline.styles.d.ts +1 -1
  19. package/dist/components/DateInput/DateInput.d.ts +1 -3
  20. package/dist/components/DateInput/DateInput.styles.d.ts +1 -1
  21. package/dist/components/DateInput/constants.d.ts +1 -1
  22. package/dist/components/DatePicker/DatePicker.d.ts +4 -4
  23. package/dist/components/DatePicker/DatePicker.styles.d.ts +1 -1
  24. package/dist/components/DatePicker/components/DatePickerBase/DatePickerBase.d.ts +5 -0
  25. package/dist/components/DatePicker/components/DatePickerBase/index.d.ts +1 -0
  26. package/dist/components/DatePicker/components/DatePickerHeader/DatePickerHeader.styles.d.ts +1 -1
  27. package/dist/components/DatePicker/components/PopperContainer/PopperContainer.d.ts +2 -4
  28. package/dist/components/DatePicker/components/index.d.ts +1 -0
  29. package/dist/components/DatePicker/constants.d.ts +7 -2
  30. package/dist/components/DatePicker/index.d.ts +1 -0
  31. package/dist/components/DatePicker/types.d.ts +2 -2
  32. package/dist/components/Description/Description.styles.d.ts +1 -1
  33. package/dist/components/FileInput/FileInput.d.ts +1 -1
  34. package/dist/components/FileInput/FileInput.styles.d.ts +1 -1
  35. package/dist/components/FileItem/FileItem.styles.d.ts +1 -1
  36. package/dist/components/FileItem/constants.d.ts +3 -4
  37. package/dist/components/FileItem/helpers.d.ts +3 -2
  38. package/dist/components/FileItem/types.d.ts +1 -2
  39. package/dist/components/FiltersPane/FiltersPane.d.ts +7 -3
  40. package/dist/components/FiltersPane/FiltersPane.styles.d.ts +2 -2
  41. package/dist/components/FiltersPane/components/Filter/Filter.d.ts +3 -4
  42. package/dist/components/FiltersPane/components/Filter/helpers.d.ts +4 -0
  43. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.d.ts +3 -11
  44. package/dist/components/FiltersPane/components/FilterInterval/FilterInterval.styles.d.ts +3 -6
  45. package/dist/components/FiltersPane/components/FilterMultiSelect/FilterMultiSelect.d.ts +0 -1
  46. package/dist/components/FiltersPane/components/FilterSelect/FilterSelect.styles.d.ts +3 -6
  47. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.d.ts +4 -3
  48. package/dist/components/FiltersPane/components/FilterValueView/FilterValueView.styles.d.ts +1 -1
  49. package/dist/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.d.ts +5 -11
  50. package/dist/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.styles.d.ts +1 -1
  51. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.d.ts +2 -3
  52. package/dist/components/FiltersPane/components/FilterWrapper/FilterWrapper.styles.d.ts +2 -2
  53. package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.d.ts +2 -1
  54. package/dist/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.d.ts +1 -1
  55. package/dist/components/FiltersPane/constants.d.ts +1 -1
  56. package/dist/components/FiltersPane/helpers.d.ts +1 -1
  57. package/dist/components/FiltersPane/index.d.ts +1 -0
  58. package/dist/components/FiltersPane/types.d.ts +8 -3
  59. package/dist/components/Flag/Flag.styles.d.ts +1 -1
  60. package/dist/components/FlexibleTable/FlexibleTable.d.ts +4 -2
  61. package/dist/components/FlexibleTable/FlexibleTable.styles.d.ts +2 -2
  62. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +4 -3
  63. package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.d.ts +1 -1
  64. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +2 -5
  65. package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.styles.d.ts +1 -1
  66. package/dist/components/FlexibleTable/helpers.d.ts +2 -2
  67. package/dist/components/FlexibleTable/types.d.ts +19 -11
  68. package/dist/components/FloatDocActions/FloatDocActions.d.ts +6 -0
  69. package/dist/components/FloatDocActions/FloatDocActions.styles.d.ts +8 -0
  70. package/dist/components/FloatDocActions/components/DocActions/DocActions.d.ts +12 -0
  71. package/dist/components/FloatDocActions/components/DocActions/DocActions.styles.d.ts +6 -0
  72. package/dist/components/FloatDocActions/components/DocActions/constants.d.ts +1 -0
  73. package/dist/components/FloatDocActions/components/DocActions/index.d.ts +4 -0
  74. package/dist/components/FloatDocActions/components/DocActions/types.d.ts +2 -0
  75. package/dist/components/FloatDocActions/components/index.d.ts +1 -0
  76. package/dist/components/FloatDocActions/constants.d.ts +1 -0
  77. package/dist/components/FloatDocActions/index.d.ts +3 -0
  78. package/dist/components/Icon/Icon.styles.d.ts +1 -1
  79. package/dist/components/Icon/icons/index.d.ts +31 -0
  80. package/dist/components/Icon/index.d.ts +1 -1
  81. package/dist/components/Icon/types.d.ts +7 -11
  82. package/dist/components/IconButton/IconButton.d.ts +1 -2
  83. package/dist/components/IconButton/IconButton.styles.d.ts +1 -1
  84. package/dist/components/IconButton/constants.d.ts +1 -1
  85. package/dist/components/IncrementInput/IncrementInput.styles.d.ts +1 -3
  86. package/dist/components/Input/Input.d.ts +3 -3
  87. package/dist/components/Input/Input.styles.d.ts +1 -1
  88. package/dist/components/Input/InputBase.d.ts +3 -3
  89. package/dist/components/List/List.d.ts +2 -1
  90. package/dist/components/List/List.styles.d.ts +3 -2
  91. package/dist/components/List/components/ListItem/ListItem.d.ts +2 -0
  92. package/dist/components/List/components/ListItem/ListItem.styles.d.ts +3 -2
  93. package/dist/components/List/index.d.ts +2 -1
  94. package/dist/components/List/types.d.ts +8 -0
  95. package/dist/components/Modal/Modal.d.ts +1 -1
  96. package/dist/components/Modal/Modal.styles.d.ts +1 -1
  97. package/dist/components/MoreMenu/MoreMenu.styles.d.ts +1 -1
  98. package/dist/components/MultiSelect/MultiSelect.d.ts +0 -1
  99. package/dist/components/MultiSelect/MultiSelect.styles.d.ts +1 -1
  100. package/dist/components/MultiSelect/components/MultiSelectInput/MultiSelectInput.styles.d.ts +1 -1
  101. package/dist/components/MultiSelectList/MultiSelectList.styles.d.ts +1 -1
  102. package/dist/components/MultiSelectList/constants.d.ts +1 -1
  103. package/dist/components/MultiSelectList/helpers.d.ts +1 -1
  104. package/dist/components/NewMoreMenu/NewMoreMenu.d.ts +5 -2
  105. package/dist/components/NewMoreMenu/NewMoreMenu.styles.d.ts +1 -1
  106. package/dist/components/Notification/Notification.styles.d.ts +1 -1
  107. package/dist/components/NumberInput/NumberInput.d.ts +1 -2
  108. package/dist/components/NumberInput/helpers.d.ts +2 -2
  109. package/dist/components/PhoneInput/PhoneInput.styles.d.ts +1 -1
  110. package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.styles.d.ts +1 -1
  111. package/dist/components/RadioButton/RadioButton.d.ts +3 -1
  112. package/dist/components/RadioButton/RadioButton.styles.d.ts +3 -2
  113. package/dist/components/RadioButton/index.d.ts +1 -0
  114. package/dist/components/RadioButton/types.d.ts +3 -0
  115. package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +3 -373
  116. package/dist/components/ScrollIntoViewIfNeeded/constants.d.ts +1 -1
  117. package/dist/components/SearchInput/SearchInput.d.ts +2 -3
  118. package/dist/components/Select/Select.d.ts +3 -3
  119. package/dist/components/Select/Select.styles.d.ts +12 -22
  120. package/dist/components/Select/components/SelectList/SelectList.d.ts +8 -6
  121. package/dist/components/Select/components/SelectList/SelectList.styles.d.ts +3 -2
  122. package/dist/components/Select/components/SelectListItem/SelectListItem.d.ts +4 -3
  123. package/dist/components/Select/helpers.d.ts +1 -1
  124. package/dist/components/Select/index.d.ts +1 -1
  125. package/dist/components/Select/types.d.ts +4 -0
  126. package/dist/components/Selector/Selector.d.ts +0 -1
  127. package/dist/components/Selector/Selector.styles.d.ts +1 -1
  128. package/dist/components/Skeleton/Skeleton.styles.d.ts +1 -1
  129. package/dist/components/SmartInput/SmartInput.d.ts +1 -1
  130. package/dist/components/Status/Status.styles.d.ts +3 -2
  131. package/dist/components/Status/constants.d.ts +0 -1
  132. package/dist/components/Status/index.d.ts +1 -0
  133. package/dist/components/Status/types.d.ts +5 -2
  134. package/dist/components/Switch/Switch.d.ts +3 -2
  135. package/dist/components/Switch/Switch.styles.d.ts +3 -2
  136. package/dist/components/Switch/types.d.ts +3 -0
  137. package/dist/components/TextArea/TextArea.d.ts +5 -6
  138. package/dist/components/TextArea/TextArea.styles.d.ts +5 -4
  139. package/dist/components/TextArea/index.d.ts +1 -1
  140. package/dist/components/TextArea/types.d.ts +4 -2
  141. package/dist/components/TextButton/TextButton.d.ts +1 -1
  142. package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
  143. package/dist/components/TextWithInfo/TextWithInfo.styles.d.ts +1 -1
  144. package/dist/components/TextWithTooltip/TextWithTooltip.d.ts +2 -0
  145. package/dist/components/TextWithTooltip/TextWithTooltip.styles.d.ts +1 -1
  146. package/dist/components/ThemedPreloader/ThemedPreloader.styles.d.ts +1 -1
  147. package/dist/components/ThemedPreloader/components/DotsPreloader/DotsPreloader.styles.d.ts +1 -1
  148. package/dist/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.styles.d.ts +1 -1
  149. package/dist/components/Toaster/Toaster.styles.d.ts +1 -1
  150. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  151. package/dist/components/Tooltip/Tooltip.styles.d.ts +3 -2
  152. package/dist/components/Tooltip/types.d.ts +3 -0
  153. package/dist/components/WithMessages/WithMessages.d.ts +1 -1
  154. package/dist/components/WithMessages/WithMessages.styles.d.ts +1 -1
  155. package/dist/components/WithPopup/WithPopup.d.ts +11 -3
  156. package/dist/components/WithPopup/WithPopup.styles.d.ts +1 -1
  157. package/dist/components/WithPopup/types.d.ts +4 -4
  158. package/dist/components/WithTooltip/WithTooltip.d.ts +2 -0
  159. package/dist/components/index.d.ts +1 -1
  160. package/dist/constants/phone-info.d.ts +1 -1
  161. package/dist/helpers/misc.d.ts +5 -3
  162. package/dist/helpers/phone.d.ts +1 -1
  163. package/dist/hooks/index.d.ts +8 -4
  164. package/dist/hooks/use-dropdown.d.ts +3 -3
  165. package/dist/hooks/use-intersection-ref.d.ts +9 -0
  166. package/dist/hooks/use-latest-ref.d.ts +2 -0
  167. package/dist/hooks/use-merge.d.ts +1 -0
  168. package/dist/hooks/use-mixed-styles.d.ts +3 -1
  169. package/dist/hooks/use-on-click-outside.d.ts +2 -2
  170. package/dist/hooks/use-resize-ref.d.ts +7 -0
  171. package/dist/hooks/use-tweak-styles.d.ts +8 -7
  172. package/dist/theme/Provider.d.ts +3 -10
  173. package/dist/theme/common.d.ts +34 -4
  174. package/dist/theme/helpers.d.ts +2 -9
  175. package/dist/theme/types.d.ts +13 -10
  176. package/dist/true-react-common-ui-kit.js +7874 -27363
  177. package/dist/true-react-common-ui-kit.js.map +1 -1
  178. package/dist/true-react-common-ui-kit.umd.cjs +1 -31620
  179. package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
  180. package/dist/types.d.ts +9 -2
  181. package/package.json +36 -39
  182. package/src/components/AccountInfo/AccountInfo.stories.tsx +19 -27
  183. package/src/components/AccountInfo/AccountInfo.tsx +2 -3
  184. package/src/components/AddButton/AddButton.stories.tsx +14 -17
  185. package/src/components/AddButton/AddButton.tsx +3 -5
  186. package/src/components/Button/Button.stories.tsx +8 -26
  187. package/src/components/Button/Button.tsx +76 -77
  188. package/src/components/Checkbox/Checkbox.stories.tsx +27 -16
  189. package/src/components/Checkbox/Checkbox.styles.ts +3 -1
  190. package/src/components/Checkbox/Checkbox.tsx +7 -5
  191. package/src/components/Checkbox/index.ts +1 -0
  192. package/src/components/Checkbox/types.ts +4 -0
  193. package/src/components/CloseButton/CloseButton.stories.tsx +5 -6
  194. package/src/components/CloseButton/CloseButton.tsx +2 -4
  195. package/src/components/Colors/Colors.stories.tsx +64 -3
  196. package/src/components/ControlWrapper/ControlWrapper.stories.tsx +46 -35
  197. package/src/components/ControlWrapper/ControlWrapper.styles.ts +15 -6
  198. package/src/components/ControlWrapper/ControlWrapper.tsx +73 -44
  199. package/src/components/ControlWrapper/constants.ts +11 -0
  200. package/src/components/ControlWrapper/helpers.ts +11 -0
  201. package/src/components/ControlWrapper/index.ts +3 -0
  202. package/src/components/ControlWrapper/types.ts +19 -0
  203. package/src/components/CssBaseline/CssBaseline.styles.ts +2 -0
  204. package/src/components/CssBaseline/CssBaseline.tsx +2 -3
  205. package/src/components/DateInput/DateInput.stories.tsx +13 -31
  206. package/src/components/DateInput/DateInput.tsx +61 -64
  207. package/src/components/DatePicker/DatePicker.stories.tsx +18 -42
  208. package/src/components/DatePicker/DatePicker.styles.ts +3 -1
  209. package/src/components/DatePicker/DatePicker.tsx +284 -256
  210. package/src/components/DatePicker/components/DatePickerBase/DatePickerBase.tsx +14 -0
  211. package/src/components/DatePicker/components/DatePickerBase/index.ts +1 -0
  212. package/src/components/DatePicker/components/PopperContainer/PopperContainer.tsx +4 -4
  213. package/src/components/DatePicker/components/index.ts +1 -0
  214. package/src/components/DatePicker/constants.ts +9 -3
  215. package/src/components/DatePicker/helpers.ts +1 -1
  216. package/src/components/DatePicker/index.ts +1 -0
  217. package/src/components/DatePicker/types.ts +6 -4
  218. package/src/components/Description/Description.stories.tsx +11 -16
  219. package/src/components/Description/Description.tsx +2 -3
  220. package/src/components/FileInput/FileInput.stories.tsx +59 -63
  221. package/src/components/FileInput/FileInput.tsx +87 -95
  222. package/src/components/FileItem/FileItem.stories.tsx +48 -48
  223. package/src/components/FileItem/FileItem.tsx +2 -4
  224. package/src/components/FileItem/constants.ts +3 -14
  225. package/src/components/FileItem/helpers.ts +3 -2
  226. package/src/components/FileItem/types.ts +1 -3
  227. package/src/components/FiltersPane/FiltersPane.stories.tsx +34 -28
  228. package/src/components/FiltersPane/FiltersPane.tsx +28 -19
  229. package/src/components/FiltersPane/components/Filter/Filter.tsx +36 -30
  230. package/src/components/FiltersPane/components/Filter/helpers.ts +18 -0
  231. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.styles.ts +1 -2
  232. package/src/components/FiltersPane/components/FilterInterval/FilterInterval.tsx +7 -20
  233. package/src/components/FiltersPane/components/FilterSelect/FilterSelect.styles.ts +1 -2
  234. package/src/components/FiltersPane/components/FilterSelect/FilterSelect.tsx +22 -23
  235. package/src/components/FiltersPane/components/FilterValueView/FilterValueView.tsx +8 -5
  236. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.styles.ts +3 -3
  237. package/src/components/FiltersPane/components/FilterWithDates/FilterWithDates.tsx +9 -7
  238. package/src/components/FiltersPane/components/FilterWithPeriod/FilterWithPeriod.tsx +4 -3
  239. package/src/components/FiltersPane/components/FilterWrapper/FilterWrapper.tsx +17 -12
  240. package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.styles.ts +5 -0
  241. package/src/components/FiltersPane/components/FiltersPaneSearch/FiltersPaneSearch.tsx +19 -19
  242. package/src/components/FiltersPane/helpers.ts +3 -3
  243. package/src/components/FiltersPane/index.ts +1 -0
  244. package/src/components/FiltersPane/types.ts +12 -4
  245. package/src/components/Flag/Flag.stories.tsx +15 -20
  246. package/src/components/Flag/Flag.tsx +2 -2
  247. package/src/components/FlexibleTable/FlexibleTable.stories.tsx +47 -50
  248. package/src/components/FlexibleTable/FlexibleTable.styles.ts +5 -2
  249. package/src/components/FlexibleTable/FlexibleTable.tsx +43 -64
  250. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.styles.ts +1 -0
  251. package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +13 -7
  252. package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +15 -15
  253. package/src/components/FlexibleTable/types.ts +19 -11
  254. package/src/components/FloatDocActions/FloatDocActions.stories.tsx +111 -0
  255. package/src/components/FloatDocActions/FloatDocActions.styles.ts +12 -0
  256. package/src/components/FloatDocActions/FloatDocActions.tsx +34 -0
  257. package/src/components/FloatDocActions/components/DocActions/DocActions.styles.ts +29 -0
  258. package/src/components/FloatDocActions/components/DocActions/DocActions.tsx +43 -0
  259. package/src/components/FloatDocActions/components/DocActions/constants.ts +1 -0
  260. package/src/components/FloatDocActions/components/DocActions/index.ts +4 -0
  261. package/src/components/FloatDocActions/components/DocActions/types.ts +3 -0
  262. package/src/components/FloatDocActions/components/index.ts +1 -0
  263. package/src/components/FloatDocActions/constants.ts +1 -0
  264. package/src/components/FloatDocActions/index.ts +3 -0
  265. package/src/components/Icon/Icon.stories.tsx +80 -67
  266. package/src/components/Icon/Icon.styles.ts +1 -1
  267. package/src/components/Icon/Icon.tsx +17 -12
  268. package/src/components/Icon/icons/calendar.svg +1 -0
  269. package/src/components/Icon/icons/check.svg +1 -0
  270. package/src/components/Icon/icons/chevron-down-small.svg +1 -0
  271. package/src/components/Icon/icons/chevron-down.svg +1 -0
  272. package/src/components/Icon/icons/chevron-left.svg +1 -0
  273. package/src/components/Icon/icons/chevron-right.svg +1 -0
  274. package/src/components/Icon/icons/close-large.svg +1 -0
  275. package/src/components/Icon/icons/close-window.svg +1 -0
  276. package/src/components/Icon/icons/close.svg +1 -0
  277. package/src/components/Icon/icons/filter.svg +1 -0
  278. package/src/components/Icon/icons/index.ts +62 -0
  279. package/src/components/Icon/icons/information.svg +1 -0
  280. package/src/components/Icon/icons/menu.svg +1 -0
  281. package/src/components/Icon/icons/minus.svg +1 -0
  282. package/src/components/Icon/icons/plus.svg +1 -0
  283. package/src/components/Icon/icons/search.svg +1 -0
  284. package/src/components/Icon/icons/status-error.svg +1 -0
  285. package/src/components/Icon/icons/status-info.svg +1 -0
  286. package/src/components/Icon/icons/status-not-ok.svg +1 -0
  287. package/src/components/Icon/icons/status-ok.svg +1 -0
  288. package/src/components/Icon/icons/status-warning.svg +1 -0
  289. package/src/components/Icon/icons/trash-can.svg +1 -0
  290. package/src/components/Icon/index.ts +1 -1
  291. package/src/components/Icon/types.ts +7 -13
  292. package/src/components/IconButton/IconButton.stories.tsx +7 -12
  293. package/src/components/IconButton/IconButton.styles.ts +15 -13
  294. package/src/components/IconButton/IconButton.tsx +44 -48
  295. package/src/components/IconButton/constants.ts +1 -1
  296. package/src/components/IncrementInput/IncrementInput.stories.tsx +25 -23
  297. package/src/components/IncrementInput/IncrementInput.styles.ts +31 -39
  298. package/src/components/IncrementInput/IncrementInput.tsx +28 -25
  299. package/src/components/Input/Input.stories.tsx +38 -68
  300. package/src/components/Input/Input.styles.ts +5 -2
  301. package/src/components/Input/Input.tsx +29 -26
  302. package/src/components/Input/InputBase.tsx +172 -172
  303. package/src/components/List/List.stories.tsx +34 -17
  304. package/src/components/List/List.styles.ts +4 -2
  305. package/src/components/List/List.tsx +15 -7
  306. package/src/components/List/components/ListItem/ListItem.styles.ts +2 -1
  307. package/src/components/List/components/ListItem/ListItem.tsx +7 -5
  308. package/src/components/List/index.ts +2 -1
  309. package/src/components/List/types.ts +11 -0
  310. package/src/components/Modal/Modal.stories.tsx +50 -59
  311. package/src/components/Modal/Modal.tsx +3 -5
  312. package/src/components/MoreMenu/MoreMenu.stories.tsx +24 -15
  313. package/src/components/MoreMenu/MoreMenu.tsx +2 -4
  314. package/src/components/MultiSelect/MultiSelect.stories.tsx +23 -20
  315. package/src/components/MultiSelect/MultiSelect.tsx +2 -4
  316. package/src/components/MultiSelectList/MultiSelectList.tsx +15 -11
  317. package/src/components/MultiSelectList/helpers.ts +2 -2
  318. package/src/components/NewMoreMenu/NewMoreMenu.stories.tsx +51 -39
  319. package/src/components/NewMoreMenu/NewMoreMenu.tsx +29 -22
  320. package/src/components/Notification/Notification.stories.tsx +35 -34
  321. package/src/components/Notification/Notification.tsx +2 -3
  322. package/src/components/NumberInput/NumberInput.stories.tsx +32 -28
  323. package/src/components/NumberInput/NumberInput.tsx +91 -93
  324. package/src/components/PhoneInput/PhoneInput.stories.tsx +29 -55
  325. package/src/components/PhoneInput/PhoneInput.tsx +3 -4
  326. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.tsx +5 -11
  327. package/src/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.tsx +1 -4
  328. package/src/components/RadioButton/RadioButton.stories.tsx +31 -21
  329. package/src/components/RadioButton/RadioButton.styles.ts +2 -1
  330. package/src/components/RadioButton/RadioButton.tsx +12 -5
  331. package/src/components/RadioButton/index.ts +1 -0
  332. package/src/components/RadioButton/types.ts +4 -0
  333. package/src/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.ts +15 -9
  334. package/src/components/SearchInput/SearchInput.stories.tsx +19 -14
  335. package/src/components/SearchInput/SearchInput.styles.ts +6 -12
  336. package/src/components/SearchInput/SearchInput.tsx +21 -24
  337. package/src/components/Select/CustomSelect.stories.tsx +29 -32
  338. package/src/components/Select/MultiSelect.stories.tsx +45 -45
  339. package/src/components/Select/Select.stories.tsx +45 -44
  340. package/src/components/Select/Select.styles.ts +5 -40
  341. package/src/components/Select/Select.tsx +62 -52
  342. package/src/components/Select/components/SelectList/SelectList.styles.ts +2 -1
  343. package/src/components/Select/components/SelectList/SelectList.tsx +13 -7
  344. package/src/components/Select/components/SelectListItem/SelectListItem.tsx +5 -2
  345. package/src/components/Select/index.ts +1 -1
  346. package/src/components/Select/types.ts +3 -0
  347. package/src/components/Selector/Selector.stories.tsx +25 -27
  348. package/src/components/Selector/Selector.tsx +5 -8
  349. package/src/components/Skeleton/Skeleton.stories.tsx +13 -12
  350. package/src/components/SmartInput/SmartInput.stories.tsx +23 -23
  351. package/src/components/SmartInput/SmartInput.tsx +85 -87
  352. package/src/components/Status/Status.stories.tsx +79 -28
  353. package/src/components/Status/Status.styles.ts +2 -37
  354. package/src/components/Status/Status.tsx +5 -4
  355. package/src/components/Status/constants.ts +0 -10
  356. package/src/components/Status/index.ts +1 -1
  357. package/src/components/Status/types.ts +7 -3
  358. package/src/components/Switch/Switch.stories.tsx +19 -26
  359. package/src/components/Switch/Switch.styles.ts +21 -13
  360. package/src/components/Switch/Switch.tsx +11 -6
  361. package/src/components/Switch/types.ts +5 -0
  362. package/src/components/TextArea/TextArea.stories.tsx +37 -26
  363. package/src/components/TextArea/TextArea.styles.ts +15 -8
  364. package/src/components/TextArea/TextArea.tsx +114 -83
  365. package/src/components/TextArea/index.ts +1 -1
  366. package/src/components/TextArea/types.ts +5 -5
  367. package/src/components/TextButton/TextButton.stories.tsx +8 -19
  368. package/src/components/TextButton/TextButton.styles.ts +1 -0
  369. package/src/components/TextButton/TextButton.tsx +68 -69
  370. package/src/components/TextWithInfo/TextWithInfo.stories.tsx +13 -21
  371. package/src/components/TextWithInfo/TextWithInfo.tsx +2 -4
  372. package/src/components/TextWithTooltip/TextWithTooltip.stories.tsx +26 -25
  373. package/src/components/TextWithTooltip/TextWithTooltip.tsx +7 -6
  374. package/src/components/ThemedPreloader/ThemedPreloader.stories.tsx +12 -23
  375. package/src/components/ThemedPreloader/ThemedPreloader.tsx +2 -4
  376. package/src/components/ThemedPreloader/components/SvgPreloader/SvgPreloader.tsx +4 -4
  377. package/src/components/Toaster/Toaster.stories.tsx +16 -14
  378. package/src/components/Toaster/Toaster.tsx +2 -4
  379. package/src/components/Tooltip/Tooltip.stories.tsx +15 -4
  380. package/src/components/Tooltip/Tooltip.styles.ts +2 -1
  381. package/src/components/Tooltip/Tooltip.tsx +12 -5
  382. package/src/components/Tooltip/types.ts +5 -0
  383. package/src/components/WithMessages/WithMessages.stories.tsx +16 -20
  384. package/src/components/WithMessages/WithMessages.tsx +41 -40
  385. package/src/components/WithPopup/WithPopup.stories.tsx +27 -26
  386. package/src/components/WithPopup/WithPopup.tsx +36 -15
  387. package/src/components/WithTooltip/WithTooltip.stories.tsx +28 -28
  388. package/src/components/WithTooltip/WithTooltip.tsx +4 -0
  389. package/src/components/index.ts +1 -1
  390. package/src/helpers/misc.ts +15 -7
  391. package/src/helpers/popper-helpers.ts +0 -1
  392. package/src/hooks/index.ts +8 -4
  393. package/src/hooks/use-intersection-ref.ts +48 -0
  394. package/src/hooks/use-latest-ref.ts +11 -0
  395. package/src/hooks/use-merge.ts +8 -0
  396. package/src/hooks/use-mixed-styles.ts +9 -11
  397. package/src/hooks/use-on-click-outside.ts +22 -14
  398. package/src/hooks/use-resize-ref.ts +35 -0
  399. package/src/hooks/use-tweak-styles.ts +18 -33
  400. package/src/theme/Provider.tsx +5 -17
  401. package/src/theme/common.ts +33 -36
  402. package/src/theme/helpers.ts +60 -50
  403. package/src/theme/types.ts +19 -15
  404. package/src/types.ts +17 -6
  405. package/dist/components/AccountInfo/AccountInfo.stories.d.ts +0 -6
  406. package/dist/components/AddButton/AddButton.stories.d.ts +0 -6
  407. package/dist/components/Button/Button.stories.d.ts +0 -6
  408. package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -8
  409. package/dist/components/CloseButton/CloseButton.stories.d.ts +0 -5
  410. package/dist/components/Colors/Colors.d.ts +0 -2
  411. package/dist/components/Colors/Colors.stories.d.ts +0 -5
  412. package/dist/components/Colors/Colors.styles.d.ts +0 -1
  413. package/dist/components/Colors/index.d.ts +0 -1
  414. package/dist/components/ControlWrapper/ControlWrapper.stories.d.ts +0 -6
  415. package/dist/components/DateInput/DateInput.stories.d.ts +0 -7
  416. package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -7
  417. package/dist/components/Description/Description.stories.d.ts +0 -16
  418. package/dist/components/FileInput/FileInput.stories.d.ts +0 -7
  419. package/dist/components/FileItem/FileItem.stories.d.ts +0 -8
  420. package/dist/components/FiltersPane/FiltersPane.stories.d.ts +0 -31
  421. package/dist/components/Flag/Flag.stories.d.ts +0 -12
  422. package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +0 -19
  423. package/dist/components/Icon/Icon.stories.d.ts +0 -6
  424. package/dist/components/Icon/complexIcons/icons.d.ts +0 -10
  425. package/dist/components/Icon/complexIcons/index.d.ts +0 -1
  426. package/dist/components/Icon/components/ComplexIconBoilerplate/ComplexIconBoilerplate.d.ts +0 -6
  427. package/dist/components/Icon/components/ComplexIconBoilerplate/index.d.ts +0 -1
  428. package/dist/components/Icon/components/IconBolerplate/IconBoilerplate.d.ts +0 -6
  429. package/dist/components/Icon/components/IconBolerplate/index.d.ts +0 -1
  430. package/dist/components/Icon/components/index.d.ts +0 -2
  431. package/dist/components/Icon/helpers.d.ts +0 -6
  432. package/dist/components/Icon/icons-list.d.ts +0 -1
  433. package/dist/components/IconButton/IconButton.stories.d.ts +0 -6
  434. package/dist/components/IncrementInput/IncrementInput.stories.d.ts +0 -6
  435. package/dist/components/Input/Input.stories.d.ts +0 -25
  436. package/dist/components/List/List.stories.d.ts +0 -5
  437. package/dist/components/Modal/Modal.stories.d.ts +0 -29
  438. package/dist/components/MoreMenu/MoreMenu.stories.d.ts +0 -6
  439. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -13
  440. package/dist/components/NewMoreMenu/NewMoreMenu.stories.d.ts +0 -12
  441. package/dist/components/Notification/Notification.stories.d.ts +0 -8
  442. package/dist/components/NumberInput/NumberInput.stories.d.ts +0 -7
  443. package/dist/components/PhoneInput/PhoneInput.stories.d.ts +0 -28
  444. package/dist/components/PhoneInput/components/PhoneInputCountryList/PhoneInputCountryList.stories.d.ts +0 -5
  445. package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -7
  446. package/dist/components/SearchInput/SearchInput.stories.d.ts +0 -7
  447. package/dist/components/Select/CustomSelect.stories.d.ts +0 -11
  448. package/dist/components/Select/MultiSelect.stories.d.ts +0 -15
  449. package/dist/components/Select/Select.stories.d.ts +0 -15
  450. package/dist/components/Selector/Selector.stories.d.ts +0 -7
  451. package/dist/components/Skeleton/Skeleton.stories.d.ts +0 -6
  452. package/dist/components/SmartInput/SmartInput.stories.d.ts +0 -18
  453. package/dist/components/Status/Status.stories.d.ts +0 -6
  454. package/dist/components/Switch/Switch.stories.d.ts +0 -16
  455. package/dist/components/TextArea/TextArea.stories.d.ts +0 -17
  456. package/dist/components/TextButton/TextButton.stories.d.ts +0 -6
  457. package/dist/components/TextWithInfo/TextWithInfo.stories.d.ts +0 -12
  458. package/dist/components/TextWithTooltip/TextWithTooltip.stories.d.ts +0 -24
  459. package/dist/components/ThemedPreloader/ThemedPreloader.stories.d.ts +0 -17
  460. package/dist/components/Toaster/Toaster.stories.d.ts +0 -5
  461. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -5
  462. package/dist/components/WithMessages/WithMessages.stories.d.ts +0 -7
  463. package/dist/components/WithPopup/WithPopup.stories.d.ts +0 -16
  464. package/dist/components/WithTooltip/WithTooltip.stories.d.ts +0 -6
  465. package/dist/style.css +0 -820
  466. package/src/components/Colors/Colors.styles.ts +0 -36
  467. package/src/components/Colors/Colors.tsx +0 -26
  468. package/src/components/Colors/index.ts +0 -1
  469. package/src/components/Flag/augment.d.ts +0 -1
  470. package/src/components/Flag/customFlags/augment.d.ts +0 -1
  471. package/src/components/Icon/complexIcons/augment.d.ts +0 -1
  472. package/src/components/Icon/complexIcons/icons.ts +0 -19
  473. package/src/components/Icon/complexIcons/index.ts +0 -1
  474. package/src/components/Icon/components/ComplexIconBoilerplate/ComplexIconBoilerplate.tsx +0 -16
  475. package/src/components/Icon/components/ComplexIconBoilerplate/index.ts +0 -1
  476. package/src/components/Icon/components/IconBolerplate/IconBoilerplate.tsx +0 -43
  477. package/src/components/Icon/components/IconBolerplate/index.ts +0 -1
  478. package/src/components/Icon/components/index.ts +0 -2
  479. package/src/components/Icon/helpers.tsx +0 -9
  480. package/src/components/Icon/icons-list.ts +0 -855
  481. package/src/vite-env.d.ts +0 -1
  482. /package/src/components/Icon/{complexIcons/avatarGreen.svg → icons/avatar.svg} +0 -0
  483. /package/src/components/Icon/{complexIcons/fileExcel.svg → icons/file-excel.svg} +0 -0
  484. /package/src/components/Icon/{complexIcons/fileImage.svg → icons/file-image.svg} +0 -0
  485. /package/src/components/Icon/{complexIcons/fileOther.svg → icons/file-other.svg} +0 -0
  486. /package/src/components/Icon/{complexIcons/filePdf.svg → icons/file-pdf.svg} +0 -0
  487. /package/src/components/Icon/{complexIcons/fileWord.svg → icons/file-word.svg} +0 -0
  488. /package/src/components/Icon/{complexIcons/fileXml.svg → icons/file-xml.svg} +0 -0
  489. /package/src/components/Icon/{complexIcons/fileZip.svg → icons/file-zip.svg} +0 -0
@@ -0,0 +1,3 @@
1
+ import { DOC_ACTIONS_VIEWS } from './constants';
2
+
3
+ export type IDocActionsView = (typeof DOC_ACTIONS_VIEWS)[number];
@@ -0,0 +1 @@
1
+ export * from './DocActions';
@@ -0,0 +1 @@
1
+ export const DEFAULT_TIMEOUT = 150;
@@ -0,0 +1,3 @@
1
+ export * from './FloatDocActions';
2
+ export * from './components';
3
+ export type { IFloatDocActionsStyles } from './FloatDocActions.styles';
@@ -1,86 +1,99 @@
1
+ import { FC } from 'react';
2
+ import { isArrayNotEmpty, isEmpty } from '@true-engineering/true-react-platform-helpers';
3
+ import { useTheme } from '../../theme';
1
4
  import { Icon } from './Icon';
2
- import { complexIcons } from './complexIcons';
3
- import { iconsList } from './icons-list';
5
+ import { iconsMap } from './icons';
4
6
  import { IIconType } from './types';
5
7
 
6
- const types: IIconType[] = [...Object.keys(iconsList), ...Object.keys(complexIcons)] as IIconType[];
7
-
8
- export default {
9
- title: 'Data Display/Icon',
10
- };
11
-
12
- export const Default = () => (
8
+ const GalleryIcon: FC<{ type: IIconType }> = ({ type }) => (
13
9
  <div
10
+ key={type}
14
11
  style={{
15
- border: '1px dotted rgba(0,0,0,.2)',
16
- // color: color('Container color', colors.GREEN_FOCUS),
12
+ width: 100,
13
+ height: 100,
14
+ margin: 1,
15
+ background: '#f7f7f7',
17
16
  display: 'flex',
18
- // width: number('Container width', 40, {
19
- // range: true,
20
- // min: 0,
21
- // max: 200,
22
- // step: 10,
23
- // }),
24
- // height: number('Container height', 40, {
25
- // range: true,
26
- // min: 0,
27
- // max: 200,
28
- // step: 10,
29
- // }),
17
+ alignItems: 'center',
18
+ justifyContent: 'center',
19
+ flexDirection: 'column',
30
20
  }}
31
21
  >
32
- {/* <Icon type={select('type', types, types[0])} /> */}
22
+ <div
23
+ style={{
24
+ width: 32,
25
+ height: 32,
26
+ margin: '10px 0',
27
+ display: 'flex',
28
+ alignItems: 'center',
29
+ color: '#888',
30
+ }}
31
+ >
32
+ <Icon type={type} />
33
+ </div>
34
+ <div
35
+ style={{
36
+ fontFamily: 'Arial',
37
+ fontSize: 13,
38
+ color: '#747679',
39
+ overflow: 'hidden',
40
+ padding: '0 5px',
41
+ }}
42
+ >
43
+ {type}
44
+ </div>
33
45
  </div>
34
46
  );
35
47
 
36
- export const Gallery = () => (
37
- <div
38
- style={{
39
- display: 'flex',
40
- alignItems: 'center',
41
- justifyContent: 'center',
42
- flexWrap: 'wrap',
43
- width: '80vw',
44
- }}
45
- >
46
- {types.map((type) => (
47
- <div
48
- key={type}
49
- style={{
50
- width: 100,
51
- height: 100,
52
- margin: 1,
53
- background: '#f7f7f7',
54
- display: 'flex',
55
- alignItems: 'center',
56
- justifyContent: 'center',
57
- flexDirection: 'column',
58
- }}
59
- >
48
+ const Story: FC = () => {
49
+ const theme = useTheme();
50
+ const notCustomizedIcons = Object.keys(iconsMap).filter((icon) =>
51
+ isEmpty(theme.icons?.[icon]),
52
+ ) as IIconType[];
53
+ const customizedIcons = Object.keys(theme.icons ?? {}) as IIconType[];
54
+
55
+ return (
56
+ <div>
57
+ {isArrayNotEmpty(notCustomizedIcons) && (
58
+ <div>
59
+ <h1>Китовые иконки</h1>
60
+ <div
61
+ style={{
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ flexWrap: 'wrap',
65
+ width: '80vw',
66
+ }}
67
+ >
68
+ {notCustomizedIcons.map((type) => (
69
+ <GalleryIcon type={type} key={type} />
70
+ ))}
71
+ </div>
72
+ </div>
73
+ )}
74
+ <div>
75
+ <h1>Кастомизированные иконки</h1>
60
76
  <div
61
77
  style={{
62
- width: 32,
63
- height: 32,
64
- margin: '10px 0',
65
78
  display: 'flex',
66
79
  alignItems: 'center',
67
- color: '#888',
80
+ flexWrap: 'wrap',
81
+ width: '80vw',
68
82
  }}
69
83
  >
70
- <Icon type={type} />
71
- </div>
72
- <div
73
- style={{
74
- fontFamily: 'Arial',
75
- fontSize: 13,
76
- color: '#747679',
77
- overflow: 'hidden',
78
- padding: '0 5px',
79
- }}
80
- >
81
- {type}
84
+ {customizedIcons.map((type) => (
85
+ <GalleryIcon type={type} key={type} />
86
+ ))}
82
87
  </div>
83
88
  </div>
84
- ))}
85
- </div>
86
- );
89
+ </div>
90
+ );
91
+ };
92
+
93
+ const meta = {
94
+ title: 'Data Display/Icon',
95
+ component: Story,
96
+ };
97
+
98
+ export default meta;
99
+ export const Default = {};
@@ -1,4 +1,4 @@
1
- import { ITweakStyles, createThemedStyles } from '../../theme';
1
+ import { createThemedStyles, ITweakStyles } from '../../theme';
2
2
 
3
3
  export const useStyles = createThemedStyles('Icon', {
4
4
  root: {
@@ -1,11 +1,10 @@
1
1
  import { FC } from 'react';
2
- import { addDataTestId } from '@true-engineering/true-react-platform-helpers';
3
- import { addDataAttributes } from '../../helpers';
2
+ import { addDataAttributes, isEmpty } from '@true-engineering/true-react-platform-helpers';
3
+ import { useTheme } from '../../theme';
4
4
  import { ICommonProps } from '../../types';
5
- import { ComplexIconBoilerplate, IconBoilerplate } from './components';
6
- import { isComplexIcon } from './helpers';
5
+ import { iconsMap } from './icons';
7
6
  import { IIconType } from './types';
8
- import { useStyles, IIconStyles } from './Icon.styles';
7
+ import { IIconStyles, useStyles } from './Icon.styles';
9
8
 
10
9
  export interface IIconProps extends ICommonProps<IIconStyles> {
11
10
  type: IIconType;
@@ -13,14 +12,20 @@ export interface IIconProps extends ICommonProps<IIconStyles> {
13
12
 
14
13
  export const Icon: FC<IIconProps> = ({ type, data, testId, tweakStyles }) => {
15
14
  const classes = useStyles({ theme: tweakStyles });
15
+ const theme = useTheme();
16
+
17
+ const icon = theme.icons?.[type] ?? iconsMap[type];
18
+
19
+ if (isEmpty(icon)) {
20
+ console.error(`Иконки ${type} не существует`);
21
+ return null;
22
+ }
16
23
 
17
24
  return (
18
- <div className={classes.root} {...addDataTestId(testId)} {...addDataAttributes(data)}>
19
- {isComplexIcon(type) ? (
20
- <ComplexIconBoilerplate type={type} />
21
- ) : (
22
- <IconBoilerplate type={type} />
23
- )}
24
- </div>
25
+ <div
26
+ className={classes.root}
27
+ {...addDataAttributes(data, testId)}
28
+ dangerouslySetInnerHTML={{ __html: icon }}
29
+ />
25
30
  );
26
31
  };
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6 12h3V9H6v3zm-2 4V7h12l.002 9H4zM16 4h-1V3c0-.552-.448-1-1-1s-1 .448-1 1v1H7V3c0-.552-.448-1-1-1s-1 .448-1 1v1H4c-1.103 0-2 .897-2 2v10c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6c0-1.103-.897-2-2-2z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="m7.5 13.086 7.793-7.793a1 1 0 1 1 1.414 1.414l-8.5 8.5a1 1 0 0 1-1.414 0l-3.5-3.5a1 1 0 1 1 1.414-1.414L7.5 13.086Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.24512 8.84751L11.038 6.05461C11.4285 5.66409 12.0617 5.66409 12.4522 6.05461C12.8427 6.44514 12.8427 7.0783 12.4522 7.46883L8.95222 10.9688C8.5617 11.3593 7.92853 11.3593 7.53801 10.9688L4.03801 7.46883C3.64749 7.0783 3.64749 6.44514 4.03801 6.05461C4.42853 5.66409 5.0617 5.66409 5.45222 6.05461L8.24512 8.84751Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10.0029 11.6053L5.71004 7.31242C5.31951 6.9219 4.68635 6.9219 4.29582 7.31242C3.9053 7.70295 3.9053 8.33611 4.29582 8.72664L9.29582 13.7266C9.68635 14.1172 10.3195 14.1172 10.71 13.7266L15.71 8.72664C16.1006 8.33611 16.1006 7.70295 15.71 7.31242C15.3195 6.9219 14.6863 6.9219 14.2958 7.31242L10.0029 11.6053Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M8.41421 10L12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L6.29289 9.29289C5.90237 9.68342 5.90237 10.3166 6.29289 10.7071L11.2929 15.7071C11.6834 16.0976 12.3166 16.0976 12.7071 15.7071C13.0976 15.3166 13.0976 14.6834 12.7071 14.2929L8.41421 10Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.5858 10L7.29289 5.70711C6.90237 5.31658 6.90237 4.68342 7.29289 4.29289C7.68342 3.90237 8.31658 3.90237 8.70711 4.29289L13.7071 9.29289C14.0976 9.68342 14.0976 10.3166 13.7071 10.7071L8.70711 15.7071C8.31658 16.0976 7.68342 16.0976 7.29289 15.7071C6.90237 15.3166 6.90237 14.6834 7.29289 14.2929L11.5858 10Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M6.102 4.709c-.446-.36-1.055-.373-1.415-.012-.39.39-.342 1.072.108 1.523l3.783 3.782-3.783 3.782-.096.108c-.36.446-.373 1.055-.012 1.415.39.391 1.072.342 1.523-.108l3.782-3.783 3.782 3.783.108.097c.446.358 1.055.372 1.415.011.39-.39.342-1.072-.108-1.523l-3.783-3.782L15.19 6.22l.097-.108c.358-.446.372-1.055.011-1.415-.39-.39-1.072-.342-1.523.108L9.992 8.588 6.21 4.805l-.108-.096Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="currentColor" d="M4.5 4.5l11 11m0-11l-11 11" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M11.985 10l2.407-2.293c.41-.39.41-1.023 0-1.414-.41-.39-1.074-.39-1.485 0L10.5 8.586 8.093 6.293c-.411-.39-1.075-.39-1.485 0-.41.391-.41 1.023 0 1.414L9.015 10l-2.407 2.293c-.41.391-.41 1.023 0 1.414.205.195.473.293.742.293s.538-.098.743-.293l2.407-2.293 2.407 2.293c.205.195.474.293.743.293s.537-.098.742-.293c.41-.391.41-1.023 0-1.414L11.985 10z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M12 11c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1h-2.17c-.412 1.165-1.524 2-2.83 2s-2.418-.835-2.83-2H3c-.552 0-1-.448-1-1s.448-1 1-1h6.171c.412-1.166 1.523-2 2.829-2zM5 3c1.306 0 2.417.834 2.829 2H17c.552 0 1 .448 1 1s-.448 1-1 1H7.83C7.417 8.165 6.305 9 5 9 3.343 9 2 7.657 2 6s1.343-3 3-3z"></path></svg>
@@ -0,0 +1,62 @@
1
+ import type { ISvgIcon } from '../types';
2
+ import avatar from './avatar.svg?raw';
3
+ import calendar from './calendar.svg?raw';
4
+ import check from './check.svg?raw';
5
+ import chevronDownSmall from './chevron-down-small.svg?raw';
6
+ import chevronDown from './chevron-down.svg?raw';
7
+ import chevronLeft from './chevron-left.svg?raw';
8
+ import chevronRight from './chevron-right.svg?raw';
9
+ import closeLarge from './close-large.svg?raw';
10
+ import closeWindow from './close-window.svg?raw';
11
+ import close from './close.svg?raw';
12
+ import fileExcel from './file-excel.svg?raw';
13
+ import fileImage from './file-image.svg?raw';
14
+ import fileOther from './file-other.svg?raw';
15
+ import filePdf from './file-pdf.svg?raw';
16
+ import fileWord from './file-word.svg?raw';
17
+ import fileXml from './file-xml.svg?raw';
18
+ import fileZip from './file-zip.svg?raw';
19
+ import filter from './filter.svg?raw';
20
+ import information from './information.svg?raw';
21
+ import menu from './menu.svg?raw';
22
+ import minus from './minus.svg?raw';
23
+ import plus from './plus.svg?raw';
24
+ import search from './search.svg?raw';
25
+ import statusError from './status-error.svg?raw';
26
+ import statusInfo from './status-info.svg?raw';
27
+ import statusNotOk from './status-not-ok.svg?raw';
28
+ import statusOk from './status-ok.svg?raw';
29
+ import statusWarning from './status-warning.svg?raw';
30
+ import trashCan from './trash-can.svg?raw';
31
+
32
+ export const iconsMap = {
33
+ avatar,
34
+ calendar,
35
+ check,
36
+ 'chevron-down-small': chevronDownSmall,
37
+ 'chevron-down': chevronDown,
38
+ 'chevron-left': chevronLeft,
39
+ 'chevron-right': chevronRight,
40
+ 'close-large': closeLarge,
41
+ 'close-window': closeWindow,
42
+ close,
43
+ 'file-excel': fileExcel,
44
+ 'file-image': fileImage,
45
+ 'file-other': fileOther,
46
+ 'file-pdf': filePdf,
47
+ 'file-word': fileWord,
48
+ 'file-xml': fileXml,
49
+ 'file-zip': fileZip,
50
+ filter,
51
+ information,
52
+ menu,
53
+ minus,
54
+ plus,
55
+ search,
56
+ 'status-error': statusError,
57
+ 'status-info': statusInfo,
58
+ 'status-not-ok': statusNotOk,
59
+ 'status-ok': statusOk,
60
+ 'status-warning': statusWarning,
61
+ 'trash-can': trashCan,
62
+ } satisfies Record<string, ISvgIcon>;
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 8c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm0 8c3.307 0 6-2.693 6-6 0-3.308-2.693-6-6-6-3.308 0-6 2.692-6 6 0 3.307 2.692 6 6 6zm0-14c2.122 0 4.157.843 5.657 2.343S18 7.878 18 10s-.843 4.157-2.343 5.657S12.122 18 10 18s-4.157-.843-5.657-2.343S2 12.122 2 10c0-4.418 3.582-8 8-8zm0 12c-.552 0-1-.448-1-1v-3c0-.552.448-1 1-1s1 .448 1 1v3c0 .552-.448 1-1 1z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="1 1 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M5.08154 9.02148C5.08154 8.77083 5.16211 8.55778 5.32324 8.38232C5.48438 8.20687 5.70817 8.11914 5.99463 8.11914C6.28109 8.11914 6.50667 8.20687 6.67139 8.38232C6.8361 8.55778 6.91846 8.77083 6.91846 9.02148C6.91846 9.27214 6.8361 9.47803 6.67139 9.63916C6.50667 9.80029 6.28109 9.88086 5.99463 9.88086C5.70817 9.88086 5.48438 9.80029 5.32324 9.63916C5.16211 9.47803 5.08154 9.27214 5.08154 9.02148ZM8.08154 9.02148C8.08154 8.77083 8.16211 8.55778 8.32324 8.38232C8.48438 8.20687 8.70817 8.11914 8.99463 8.11914C9.28109 8.11914 9.50667 8.20687 9.67139 8.38232C9.8361 8.55778 9.91846 8.77083 9.91846 9.02148C9.91846 9.27214 9.8361 9.47803 9.67139 9.63916C9.50667 9.80029 9.28109 9.88086 8.99463 9.88086C8.70817 9.88086 8.48438 9.80029 8.32324 9.63916C8.16211 9.47803 8.08154 9.27214 8.08154 9.02148ZM11.0815 9.02148C11.0815 8.77083 11.1621 8.55778 11.3232 8.38232C11.4844 8.20687 11.7082 8.11914 11.9946 8.11914C12.2811 8.11914 12.5067 8.20687 12.6714 8.38232C12.8361 8.55778 12.9185 8.77083 12.9185 9.02148C12.9185 9.27214 12.8361 9.47803 12.6714 9.63916C12.5067 9.80029 12.2811 9.88086 11.9946 9.88086C11.7082 9.88086 11.4844 9.80029 11.3232 9.63916C11.1621 9.47803 11.0815 9.27214 11.0815 9.02148Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11H4a1 1 0 1 1 0-2h12a1 1 0 1 1 0 2Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 11h-5v5a1 1 0 1 1-2 0v-5H4a1 1 0 1 1 0-2h5V4a1 1 0 0 1 2 0v5h5a1 1 0 1 1 0 2Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M9 2c3.866 0 7 3.134 7 7 0 1.7-.606 3.259-1.614 4.472l2.589 2.59c.39.39.39 1.023 0 1.414-.39.39-1.024.39-1.414 0l-2.662-2.661C11.785 15.563 10.443 16 9 16c-3.866 0-7-3.134-7-7s3.134-7 7-7zm0 2C6.239 4 4 6.239 4 9s2.239 5 5 5 5-2.239 5-5-2.239-5-5-5z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M14 11H6c-.552 0-1-.448-1-1s.448-1 1-1h8c.552 0 1 .448 1 1s-.448 1-1 1z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 15c-.552 0-1-.448-1-1v-4c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1zM10 7c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M11.414 10l2.293-2.293c.391-.391.391-1.023 0-1.414-.39-.391-1.023-.391-1.414 0L10 8.586 7.707 6.293c-.39-.391-1.023-.391-1.414 0-.39.391-.39 1.023 0 1.414L8.586 10l-2.293 2.293c-.39.391-.39 1.023 0 1.414.195.195.451.293.707.293.256 0 .512-.098.707-.293L10 11.414l2.293 2.293c.195.195.451.293.707.293.256 0 .512-.098.707-.293.391-.391.391-1.023 0-1.414L11.414 10z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M8.333 11.252l4.96-4.96c.39-.39 1.024-.39 1.414 0 .39.391.39 1.025 0 1.415L9.04 13.374c-.39.39-1.023.39-1.414 0L5.293 11.04c-.39-.39-.39-1.023 0-1.414.39-.39 1.024-.39 1.414 0l1.626 1.626z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M10 0C4.48 0 0 4.48 0 10s4.48 10 10 10 10-4.48 10-10S15.52 0 10 0z"></path><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" stroke="none" d="M10 5c-.552 0-1 .448-1 1v4c0 .552.448 1 1 1s1-.448 1-1V6c0-.552-.448-1-1-1zM10 13c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="100%" height="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" stroke="none" d="M16 6v10c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6h12zM8 8c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm4 0c-.552 0-1 .448-1 1v6c0 .552.448 1 1 1s1-.448 1-1V9c0-.552-.448-1-1-1zm0-6l1 1h3c.552 0 1 .448 1 1s-.448 1-1 1H4c-.552 0-1-.448-1-1s.448-1 1-1h3l1-1h4z"></path></svg>
@@ -1,5 +1,5 @@
1
1
  export * from './Icon';
2
2
  export * from './types';
3
- export { iconsList } from './icons-list';
3
+ export * from './icons';
4
4
  export type { IIconStyles } from './Icon.styles';
5
5
  export * from './snippet';
@@ -1,18 +1,12 @@
1
- import { ReactElement, SVGAttributes } from 'react';
2
- import { complexIcons } from './complexIcons';
3
- import { iconsList } from './icons-list';
1
+ import { ReactElement } from 'react';
2
+ import { iconsMap } from './icons';
4
3
 
5
- export interface ISvgIcon {
6
- viewBox?: string;
7
- paths?: Array<SVGAttributes<never>>;
8
- circles?: Array<SVGAttributes<never>>;
9
- rects?: Array<SVGAttributes<never>>;
10
- }
4
+ export type ISvgIcon = string;
11
5
 
12
- export type ICommonIcon = keyof typeof iconsList;
6
+ type IUiKitIconsMap = typeof iconsMap;
7
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
8
+ export interface IIconsMap extends IUiKitIconsMap {}
13
9
 
14
- export type IComplexIcon = keyof typeof complexIcons;
15
-
16
- export type IIconType = ICommonIcon | IComplexIcon;
10
+ export type IIconType = keyof IIconsMap;
17
11
 
18
12
  export type IIcon = IIconType | ReactElement;
@@ -1,12 +1,11 @@
1
- import { ComponentMeta, ComponentStory } from '@storybook/react';
2
- import { iconsList, IIconType } from '../Icon';
3
- import { complexIcons } from '../Icon/complexIcons';
1
+ import { type Meta } from '@storybook/react';
2
+ import { iconsMap, IIconType } from '../Icon';
4
3
  import { IconButton } from './IconButton';
5
4
  import { ICON_BUTTON_SIZES, ICON_BUTTON_VIEWS } from './constants';
6
5
 
7
- const icons = [...Object.keys(iconsList), ...Object.keys(complexIcons)] as IIconType[];
6
+ const icons = Object.keys(iconsMap) as IIconType[];
8
7
 
9
- export default {
8
+ const meta: Meta<typeof IconButton> = {
10
9
  title: 'Buttons/IconButton',
11
10
  component: IconButton,
12
11
  args: {
@@ -22,11 +21,7 @@ export default {
22
21
  size: { options: ICON_BUTTON_SIZES, control: 'inline-radio' },
23
22
  view: { options: ICON_BUTTON_VIEWS, control: 'inline-radio' },
24
23
  },
25
- parameters: {
26
- controls: {
27
- exclude: ['tweakStyles', 'testId', 'data'],
28
- },
29
- },
30
- } as ComponentMeta<typeof IconButton>;
24
+ };
31
25
 
32
- export const Default: ComponentStory<typeof IconButton> = (args) => <IconButton {...args} />;
26
+ export default meta;
27
+ export const Default = {};
@@ -1,9 +1,5 @@
1
1
  import { ITweakStyles, animations, createThemedStyles } from '../../theme';
2
2
 
3
- const BUTTON_SIZE_S = 24;
4
- const BUTTON_SIZE_M = 32;
5
- const ICON_SIZE = 20;
6
-
7
3
  export const useStyles = createThemedStyles('IconButton', {
8
4
  root: {
9
5
  display: 'flex',
@@ -13,7 +9,7 @@ export const useStyles = createThemedStyles('IconButton', {
13
9
  outline: 'none',
14
10
  boxSizing: 'border-box',
15
11
  transition: animations.defaultTransition,
16
- transitionProperty: 'background-color, color, border-color',
12
+ transitionProperty: 'background-color, color, border-color, opacity, visibility',
17
13
  border: 'none',
18
14
  position: 'relative',
19
15
  boxShadow: 'none',
@@ -29,6 +25,10 @@ export const useStyles = createThemedStyles('IconButton', {
29
25
  '&:active': {
30
26
  extend: 'active',
31
27
  },
28
+
29
+ width: 'var(--icon-button-size)',
30
+ height: 'var(--icon-button-size)',
31
+ '--icon-button-icon-size': '20px',
32
32
  },
33
33
 
34
34
  'cancel-light': {},
@@ -55,8 +55,8 @@ export const useStyles = createThemedStyles('IconButton', {
55
55
  icon: {
56
56
  display: 'flex',
57
57
  alignItems: 'center',
58
- width: ICON_SIZE,
59
- height: ICON_SIZE,
58
+ width: 'var(--icon-button-icon-size)',
59
+ height: 'var(--icon-button-icon-size)',
60
60
  },
61
61
 
62
62
  loader: {
@@ -66,18 +66,20 @@ export const useStyles = createThemedStyles('IconButton', {
66
66
  top: '50%',
67
67
  transform: 'translate(-50%, -50%)',
68
68
 
69
- width: ICON_SIZE,
70
- height: ICON_SIZE,
69
+ width: 'var(--icon-button-icon-size)',
70
+ height: 'var(--icon-button-icon-size)',
71
71
  },
72
72
 
73
73
  s: {
74
- width: BUTTON_SIZE_S,
75
- height: BUTTON_SIZE_S,
74
+ '--icon-button-size': '24px',
76
75
  },
77
76
 
78
77
  m: {
79
- width: BUTTON_SIZE_M,
80
- height: BUTTON_SIZE_M,
78
+ '--icon-button-size': '32px',
79
+ },
80
+
81
+ l: {
82
+ '--icon-button-size': '40px',
81
83
  },
82
84
  });
83
85
 
@@ -1,7 +1,6 @@
1
1
  import { forwardRef } from 'react';
2
2
  import clsx from 'clsx';
3
- import { addDataTestId } from '@true-engineering/true-react-platform-helpers';
4
- import { addDataAttributes } from '../../helpers';
3
+ import { addDataAttributes } from '@true-engineering/true-react-platform-helpers';
5
4
  import { ICommonProps } from '../../types';
6
5
  import { renderIcon, IIcon } from '../Icon';
7
6
  import { ThemedPreloader } from '../ThemedPreloader';
@@ -24,51 +23,48 @@ export interface IIconButtonProps
24
23
  isLoading?: boolean;
25
24
  }
26
25
 
27
- export const IconButton = forwardRef<HTMLButtonElement, IIconButtonProps>(
28
- (
29
- {
30
- icon,
31
- size = 'm',
32
- view = 'cancel-light',
33
- isDisabled = false,
34
- isActive = false,
35
- isLoading = false,
36
- type = 'button',
37
- testId,
38
- tweakStyles,
39
- data,
40
- onClick,
41
- ...restProps
42
- },
43
- ref,
44
- ) => {
45
- const classes = useStyles({ theme: tweakStyles });
26
+ export const IconButton = forwardRef<HTMLButtonElement, IIconButtonProps>(function IconButton(
27
+ {
28
+ icon,
29
+ size = 'm',
30
+ view = 'cancel-light',
31
+ isDisabled = false,
32
+ isActive = false,
33
+ isLoading = false,
34
+ type = 'button',
35
+ testId,
36
+ tweakStyles,
37
+ data,
38
+ onClick,
39
+ ...restProps
40
+ },
41
+ ref,
42
+ ) {
43
+ const classes = useStyles({ theme: tweakStyles });
46
44
 
47
- const hasNoAction = isDisabled || isLoading;
45
+ const hasNoAction = isDisabled || isLoading;
48
46
 
49
- return (
50
- <button
51
- ref={ref}
52
- className={clsx(classes.root, classes[view], classes[size], {
53
- [classes.disabled]: isDisabled,
54
- [classes.active]: isActive,
55
- [classes.loading]: isLoading,
56
- })}
57
- type={type}
58
- disabled={isDisabled}
59
- onClick={hasNoAction ? undefined : onClick}
60
- {...restProps}
61
- {...addDataTestId(testId)}
62
- {...addDataAttributes(data)}
63
- >
64
- {isLoading ? (
65
- <span className={classes.loader}>
66
- <ThemedPreloader type="default" useCurrentColor />
67
- </span>
68
- ) : (
69
- <span className={classes.icon}>{renderIcon(icon)}</span>
70
- )}
71
- </button>
72
- );
73
- },
74
- );
47
+ return (
48
+ <button
49
+ ref={ref}
50
+ className={clsx(classes.root, classes[view], classes[size], {
51
+ [classes.disabled]: isDisabled,
52
+ [classes.active]: isActive,
53
+ [classes.loading]: isLoading,
54
+ })}
55
+ type={type}
56
+ disabled={isDisabled}
57
+ onClick={hasNoAction ? undefined : onClick}
58
+ {...restProps}
59
+ {...addDataAttributes(data, testId)}
60
+ >
61
+ {isLoading ? (
62
+ <span className={classes.loader}>
63
+ <ThemedPreloader type="default" useCurrentColor />
64
+ </span>
65
+ ) : (
66
+ <span className={classes.icon}>{renderIcon(icon)}</span>
67
+ )}
68
+ </button>
69
+ );
70
+ });
@@ -1,3 +1,3 @@
1
- export const ICON_BUTTON_SIZES = ['s', 'm'] as const;
1
+ export const ICON_BUTTON_SIZES = ['s', 'm', 'l'] as const;
2
2
 
3
3
  export const ICON_BUTTON_VIEWS = ['cancel', 'cancel-light', 'main', 'custom'] as const;