@skbkontur/react-ui 6.4.1 → 6.4.2-static-css.0

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 (679) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +97 -0
  3. package/components/Autocomplete/Autocomplete.d.ts +0 -1
  4. package/components/Autocomplete/Autocomplete.js +13 -4
  5. package/components/Autocomplete/Autocomplete.js.map +1 -1
  6. package/components/Autocomplete/Autocomplete.styles.d.ts +4 -4
  7. package/components/Autocomplete/Autocomplete.styles.js +5 -16
  8. package/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  9. package/components/Button/Button.d.ts +15 -1
  10. package/components/Button/Button.js +162 -76
  11. package/components/Button/Button.js.map +1 -1
  12. package/components/Button/Button.styles.d.ts +107 -91
  13. package/components/Button/Button.styles.js +108 -255
  14. package/components/Button/Button.styles.js.map +1 -1
  15. package/components/Button/ButtonArrow.d.ts +2 -3
  16. package/components/Button/ButtonArrow.js +8 -10
  17. package/components/Button/ButtonArrow.js.map +1 -1
  18. package/components/Button/ButtonIcon.js +7 -17
  19. package/components/Button/ButtonIcon.js.map +1 -1
  20. package/components/Button/ButtonIcon.styles.d.ts +15 -15
  21. package/components/Button/ButtonIcon.styles.js +16 -51
  22. package/components/Button/ButtonIcon.styles.js.map +1 -1
  23. package/components/Calendar/Calendar.d.ts +0 -1
  24. package/components/Calendar/Calendar.js +3 -3
  25. package/components/Calendar/Calendar.js.map +1 -1
  26. package/components/Calendar/Calendar.styles.d.ts +5 -5
  27. package/components/Calendar/Calendar.styles.js +6 -20
  28. package/components/Calendar/Calendar.styles.js.map +1 -1
  29. package/components/Calendar/CalendarDay.js +11 -7
  30. package/components/Calendar/CalendarDay.js.map +1 -1
  31. package/components/Calendar/DayCellView.js +1 -3
  32. package/components/Calendar/DayCellView.js.map +1 -1
  33. package/components/Calendar/DayCellView.styles.d.ts +10 -8
  34. package/components/Calendar/DayCellView.styles.js +11 -29
  35. package/components/Calendar/DayCellView.styles.js.map +1 -1
  36. package/components/Calendar/Month.js +6 -10
  37. package/components/Calendar/Month.js.map +1 -1
  38. package/components/Calendar/MonthView.js +7 -7
  39. package/components/Calendar/MonthView.js.map +1 -1
  40. package/components/Calendar/MonthView.styles.d.ts +12 -12
  41. package/components/Calendar/MonthView.styles.js +13 -45
  42. package/components/Calendar/MonthView.styles.js.map +1 -1
  43. package/components/Center/Center.d.ts +0 -1
  44. package/components/Center/Center.js +1 -1
  45. package/components/Center/Center.js.map +1 -1
  46. package/components/Center/Center.styles.d.ts +7 -6
  47. package/components/Center/Center.styles.js +8 -25
  48. package/components/Center/Center.styles.js.map +1 -1
  49. package/components/Checkbox/Checkbox.d.ts +8 -1
  50. package/components/Checkbox/Checkbox.js +57 -26
  51. package/components/Checkbox/Checkbox.js.map +1 -1
  52. package/components/Checkbox/Checkbox.styles.d.ts +33 -30
  53. package/components/Checkbox/Checkbox.styles.js +35 -95
  54. package/components/Checkbox/Checkbox.styles.js.map +1 -1
  55. package/components/DateInput/DateFragmentsView.d.ts +0 -2
  56. package/components/DateInput/DateFragmentsView.js +10 -7
  57. package/components/DateInput/DateFragmentsView.js.map +1 -1
  58. package/components/DateInput/DateFragmentsView.styles.d.ts +8 -6
  59. package/components/DateInput/DateFragmentsView.styles.js +9 -26
  60. package/components/DateInput/DateFragmentsView.styles.js.map +1 -1
  61. package/components/DateInput/DateInput.d.ts +0 -2
  62. package/components/DateInput/DateInput.js +6 -8
  63. package/components/DateInput/DateInput.js.map +1 -1
  64. package/components/DateInput/DateInput.styles.d.ts +10 -11
  65. package/components/DateInput/DateInput.styles.js +11 -28
  66. package/components/DateInput/DateInput.styles.js.map +1 -1
  67. package/components/DatePicker/DatePicker.d.ts +0 -1
  68. package/components/DatePicker/DatePicker.js +2 -2
  69. package/components/DatePicker/DatePicker.js.map +1 -1
  70. package/components/DatePicker/DatePicker.styles.d.ts +4 -4
  71. package/components/DatePicker/DatePicker.styles.js +5 -16
  72. package/components/DatePicker/DatePicker.styles.js.map +1 -1
  73. package/components/DatePicker/MobilePicker.styles.d.ts +3 -2
  74. package/components/DatePicker/MobilePicker.styles.js +4 -13
  75. package/components/DatePicker/MobilePicker.styles.js.map +1 -1
  76. package/components/DatePicker/getMobilePickerTheme.js +27 -9
  77. package/components/DatePicker/getMobilePickerTheme.js.map +1 -1
  78. package/components/DateRangePicker/DateRangePicker.d.ts +4 -4
  79. package/components/DateRangePicker/DateRangePicker.js +26 -28
  80. package/components/DateRangePicker/DateRangePicker.js.map +1 -1
  81. package/components/DateRangePicker/DateRangePicker.styles.d.ts +20 -14
  82. package/components/DateRangePicker/DateRangePicker.styles.js +25 -49
  83. package/components/DateRangePicker/DateRangePicker.styles.js.map +1 -1
  84. package/components/DateRangePicker/DateRangePickerTheme.js +30 -10
  85. package/components/DateRangePicker/DateRangePickerTheme.js.map +1 -1
  86. package/components/Dropdown/getDropdownTheme.d.ts +11 -0
  87. package/components/Dropdown/getDropdownTheme.js +23 -4
  88. package/components/Dropdown/getDropdownTheme.js.map +1 -1
  89. package/components/DropdownMenu/getDropdownMenuTheme.js +9 -2
  90. package/components/DropdownMenu/getDropdownMenuTheme.js.map +1 -1
  91. package/components/FileUploader/FileUploader.d.ts +2 -1
  92. package/components/FileUploader/FileUploader.js +50 -45
  93. package/components/FileUploader/FileUploader.js.map +1 -1
  94. package/components/FileUploader/FileUploader.styles.d.ts +69 -68
  95. package/components/FileUploader/FileUploader.styles.js +71 -214
  96. package/components/FileUploader/FileUploader.styles.js.map +1 -1
  97. package/components/FileUploader/FileUploaderFile.js +28 -30
  98. package/components/FileUploader/FileUploaderFile.js.map +1 -1
  99. package/components/FileUploader/FileUploaderFile.styles.d.ts +57 -57
  100. package/components/FileUploader/FileUploaderFile.styles.js +58 -180
  101. package/components/FileUploader/FileUploaderFile.styles.js.map +1 -1
  102. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js +17 -19
  103. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
  104. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.d.ts +31 -31
  105. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js +32 -99
  106. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js.map +1 -1
  107. package/components/FileUploader/FileUploaderFileStatusIcon.js +2 -4
  108. package/components/FileUploader/FileUploaderFileStatusIcon.js.map +1 -1
  109. package/components/FileUploader/FileUploaderFileTypeIcon.js +47 -52
  110. package/components/FileUploader/FileUploaderFileTypeIcon.js.map +1 -1
  111. package/components/FileUploader/FileUploaderFileTypeIcon.styles.d.ts +14 -0
  112. package/components/FileUploader/FileUploaderFileTypeIcon.styles.js +16 -0
  113. package/components/FileUploader/FileUploaderFileTypeIcon.styles.js.map +1 -0
  114. package/components/FxInput/FxInput.d.ts +1 -1
  115. package/components/FxInput/FxInput.js +6 -2
  116. package/components/FxInput/FxInput.js.map +1 -1
  117. package/components/FxInput/FxInput.styles.d.ts +4 -0
  118. package/components/FxInput/FxInput.styles.js +6 -0
  119. package/components/FxInput/FxInput.styles.js.map +1 -0
  120. package/components/FxInput/FxInputRestoreBtn.js +23 -15
  121. package/components/FxInput/FxInputRestoreBtn.js.map +1 -1
  122. package/components/FxInput/FxInputRestoreBtn.styles.d.ts +6 -0
  123. package/components/FxInput/FxInputRestoreBtn.styles.js +8 -0
  124. package/components/FxInput/FxInputRestoreBtn.styles.js.map +1 -0
  125. package/components/GlobalLoader/GlobalLoaderView.js +30 -14
  126. package/components/GlobalLoader/GlobalLoaderView.js.map +1 -1
  127. package/components/GlobalLoader/GlobalLoaderView.styles.d.ts +22 -16
  128. package/components/GlobalLoader/GlobalLoaderView.styles.js +22 -67
  129. package/components/GlobalLoader/GlobalLoaderView.styles.js.map +1 -1
  130. package/components/Group/Group.d.ts +0 -1
  131. package/components/Group/Group.js +2 -3
  132. package/components/Group/Group.js.map +1 -1
  133. package/components/Group/Group.styles.d.ts +7 -7
  134. package/components/Group/Group.styles.js +8 -28
  135. package/components/Group/Group.styles.js.map +1 -1
  136. package/components/Hint/Hint.d.ts +10 -2
  137. package/components/Hint/Hint.js +47 -19
  138. package/components/Hint/Hint.js.map +1 -1
  139. package/components/Hint/Hint.styles.d.ts +4 -4
  140. package/components/Hint/Hint.styles.js +5 -16
  141. package/components/Hint/Hint.styles.js.map +1 -1
  142. package/components/Hint/HintDelayController.d.ts +11 -0
  143. package/components/Hint/HintDelayController.js +50 -0
  144. package/components/Hint/HintDelayController.js.map +1 -0
  145. package/components/Input/Input.d.ts +0 -1
  146. package/components/Input/Input.js +13 -13
  147. package/components/Input/Input.js.map +1 -1
  148. package/components/Input/Input.styles.d.ts +20 -20
  149. package/components/Input/Input.styles.js +21 -66
  150. package/components/Input/Input.styles.js.map +1 -1
  151. package/components/Input/InputLayout/InputLayout.styles.d.ts +26 -17
  152. package/components/Input/InputLayout/InputLayout.styles.js +27 -57
  153. package/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
  154. package/components/Input/InputLayout/InputLayoutAsideCounter.js +8 -8
  155. package/components/Input/InputLayout/InputLayoutAsideCounter.js.map +1 -1
  156. package/components/Input/InputLayout/InputLayoutAsideIcon.js +19 -25
  157. package/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
  158. package/components/Input/InputLayout/InputLayoutAsideText.js +4 -4
  159. package/components/Input/InputLayout/InputLayoutAsideText.js.map +1 -1
  160. package/components/Kebab/Kebab.d.ts +0 -1
  161. package/components/Kebab/Kebab.js +2 -2
  162. package/components/Kebab/Kebab.js.map +1 -1
  163. package/components/Kebab/Kebab.styles.d.ts +10 -10
  164. package/components/Kebab/Kebab.styles.js +11 -34
  165. package/components/Kebab/Kebab.styles.js.map +1 -1
  166. package/components/Link/Link.d.ts +0 -1
  167. package/components/Link/Link.js +23 -18
  168. package/components/Link/Link.js.map +1 -1
  169. package/components/Link/Link.styles.d.ts +23 -23
  170. package/components/Link/Link.styles.js +25 -81
  171. package/components/Link/Link.styles.js.map +1 -1
  172. package/components/Link/LinkIcon.js +4 -6
  173. package/components/Link/LinkIcon.js.map +1 -1
  174. package/components/Loader/Loader.d.ts +0 -2
  175. package/components/Loader/Loader.js +2 -3
  176. package/components/Loader/Loader.js.map +1 -1
  177. package/components/Loader/Loader.styles.d.ts +7 -7
  178. package/components/Loader/Loader.styles.js +8 -25
  179. package/components/Loader/Loader.styles.js.map +1 -1
  180. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js +15 -21
  181. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js.map +1 -1
  182. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.d.ts +3 -2
  183. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js +5 -13
  184. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js.map +1 -1
  185. package/components/MaskedInput/MaskedInput.styles.d.ts +3 -3
  186. package/components/MaskedInput/MaskedInput.styles.js +5 -14
  187. package/components/MaskedInput/MaskedInput.styles.js.map +1 -1
  188. package/components/MaskedInput/MaskedInputLegacy.js +4 -6
  189. package/components/MaskedInput/MaskedInputLegacy.js.map +1 -1
  190. package/components/MaskedInputV2/MaskedInputV2.js +4 -6
  191. package/components/MaskedInputV2/MaskedInputV2.js.map +1 -1
  192. package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +3 -3
  193. package/components/MaskedInputV2/MaskedInputV2.styles.js +5 -14
  194. package/components/MaskedInputV2/MaskedInputV2.styles.js.map +1 -1
  195. package/components/MaskedInputV2/internal/MaskOverlay.js +8 -8
  196. package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -1
  197. package/components/MaskedInputV2/internal/MaskedCore.js +7 -5
  198. package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -1
  199. package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +7 -7
  200. package/components/MaskedInputV2/internal/MaskedInternal.styles.js +9 -25
  201. package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +1 -1
  202. package/components/MenuFooter/MenuFooter.js +10 -12
  203. package/components/MenuFooter/MenuFooter.js.map +1 -1
  204. package/components/MenuFooter/MenuFooter.styles.d.ts +9 -9
  205. package/components/MenuFooter/MenuFooter.styles.js +10 -32
  206. package/components/MenuFooter/MenuFooter.styles.js.map +1 -1
  207. package/components/MenuHeader/MenuHeader.js +9 -11
  208. package/components/MenuHeader/MenuHeader.js.map +1 -1
  209. package/components/MenuHeader/MenuHeader.styles.d.ts +9 -9
  210. package/components/MenuHeader/MenuHeader.styles.js +10 -32
  211. package/components/MenuHeader/MenuHeader.styles.js.map +1 -1
  212. package/components/MenuItem/MenuItem.d.ts +0 -1
  213. package/components/MenuItem/MenuItem.js +21 -21
  214. package/components/MenuItem/MenuItem.js.map +1 -1
  215. package/components/MenuItem/MenuItem.mixins.d.ts +6 -0
  216. package/components/MenuItem/MenuItem.mixins.js +7 -1
  217. package/components/MenuItem/MenuItem.mixins.js.map +1 -1
  218. package/components/MenuItem/MenuItem.styles.d.ts +26 -26
  219. package/components/MenuItem/MenuItem.styles.js +28 -85
  220. package/components/MenuItem/MenuItem.styles.js.map +1 -1
  221. package/components/MenuSeparator/MenuSeparator.js +4 -6
  222. package/components/MenuSeparator/MenuSeparator.js.map +1 -1
  223. package/components/MenuSeparator/MenuSeparator.styles.d.ts +4 -4
  224. package/components/MenuSeparator/MenuSeparator.styles.js +5 -16
  225. package/components/MenuSeparator/MenuSeparator.styles.js.map +1 -1
  226. package/components/MiniModal/MiniModal.styles.d.ts +10 -10
  227. package/components/MiniModal/MiniModal.styles.js +11 -35
  228. package/components/MiniModal/MiniModal.styles.js.map +1 -1
  229. package/components/MiniModal/MiniModalBody.js +3 -3
  230. package/components/MiniModal/MiniModalBody.js.map +1 -1
  231. package/components/MiniModal/MiniModalFooter.js +4 -6
  232. package/components/MiniModal/MiniModalFooter.js.map +1 -1
  233. package/components/MiniModal/MiniModalHeader.js +4 -6
  234. package/components/MiniModal/MiniModalHeader.js.map +1 -1
  235. package/components/MiniModal/MiniModalIndent.js +2 -4
  236. package/components/MiniModal/MiniModalIndent.js.map +1 -1
  237. package/components/MiniModal/getMiniModalTheme.js +39 -13
  238. package/components/MiniModal/getMiniModalTheme.js.map +1 -1
  239. package/components/Modal/Modal.d.ts +0 -1
  240. package/components/Modal/Modal.js +8 -8
  241. package/components/Modal/Modal.js.map +1 -1
  242. package/components/Modal/Modal.styles.d.ts +50 -50
  243. package/components/Modal/Modal.styles.js +52 -161
  244. package/components/Modal/Modal.styles.js.map +1 -1
  245. package/components/Modal/ModalBody.d.ts +0 -1
  246. package/components/Modal/ModalBody.js +7 -7
  247. package/components/Modal/ModalBody.js.map +1 -1
  248. package/components/Modal/ModalClose.js +7 -9
  249. package/components/Modal/ModalClose.js.map +1 -1
  250. package/components/Modal/ModalFooter.js +3 -3
  251. package/components/Modal/ModalFooter.js.map +1 -1
  252. package/components/Modal/ModalHeader.js +3 -3
  253. package/components/Modal/ModalHeader.js.map +1 -1
  254. package/components/Modal/ModalSeparator.js +4 -6
  255. package/components/Modal/ModalSeparator.js.map +1 -1
  256. package/components/Paging/Paging.d.ts +0 -2
  257. package/components/Paging/Paging.js +32 -37
  258. package/components/Paging/Paging.js.map +1 -1
  259. package/components/Paging/Paging.styles.d.ts +31 -31
  260. package/components/Paging/Paging.styles.js +32 -97
  261. package/components/Paging/Paging.styles.js.map +1 -1
  262. package/components/PasswordInput/PasswordInput.d.ts +0 -2
  263. package/components/PasswordInput/PasswordInput.js +6 -11
  264. package/components/PasswordInput/PasswordInput.js.map +1 -1
  265. package/components/PasswordInput/PasswordInput.styles.d.ts +10 -10
  266. package/components/PasswordInput/PasswordInput.styles.js +11 -34
  267. package/components/PasswordInput/PasswordInput.styles.js.map +1 -1
  268. package/components/Radio/Radio.d.ts +8 -1
  269. package/components/Radio/Radio.js +59 -28
  270. package/components/Radio/Radio.js.map +1 -1
  271. package/components/Radio/Radio.styles.d.ts +33 -30
  272. package/components/Radio/Radio.styles.js +35 -95
  273. package/components/Radio/Radio.styles.js.map +1 -1
  274. package/components/RadioGroup/RadioGroup.d.ts +0 -1
  275. package/components/RadioGroup/RadioGroup.js +1 -2
  276. package/components/RadioGroup/RadioGroup.js.map +1 -1
  277. package/components/RadioGroup/RadioGroup.styles.d.ts +5 -5
  278. package/components/RadioGroup/RadioGroup.styles.js +6 -22
  279. package/components/RadioGroup/RadioGroup.styles.js.map +1 -1
  280. package/components/ScrollContainer/ScrollBar.d.ts +1 -3
  281. package/components/ScrollContainer/ScrollBar.js +9 -14
  282. package/components/ScrollContainer/ScrollBar.js.map +1 -1
  283. package/components/ScrollContainer/ScrollContainer.d.ts +0 -1
  284. package/components/ScrollContainer/ScrollContainer.js +1 -1
  285. package/components/ScrollContainer/ScrollContainer.js.map +1 -1
  286. package/components/ScrollContainer/ScrollContainer.styles.d.ts +13 -13
  287. package/components/ScrollContainer/ScrollContainer.styles.js +15 -43
  288. package/components/ScrollContainer/ScrollContainer.styles.js.map +1 -1
  289. package/components/Select/Select.d.ts +0 -1
  290. package/components/Select/Select.js +12 -12
  291. package/components/Select/Select.js.map +1 -1
  292. package/components/Select/Select.styles.d.ts +17 -17
  293. package/components/Select/Select.styles.js +18 -55
  294. package/components/Select/Select.styles.js.map +1 -1
  295. package/components/Select/selectTheme.js +31 -7
  296. package/components/Select/selectTheme.js.map +1 -1
  297. package/components/SidePage/SidePage.d.ts +0 -2
  298. package/components/SidePage/SidePage.js +8 -10
  299. package/components/SidePage/SidePage.js.map +1 -1
  300. package/components/SidePage/SidePage.styles.d.ts +49 -49
  301. package/components/SidePage/SidePage.styles.js +50 -156
  302. package/components/SidePage/SidePage.styles.js.map +1 -1
  303. package/components/SidePage/SidePageBody.d.ts +0 -1
  304. package/components/SidePage/SidePageBody.js +7 -8
  305. package/components/SidePage/SidePageBody.js.map +1 -1
  306. package/components/SidePage/SidePageCloseButton.js +6 -8
  307. package/components/SidePage/SidePageCloseButton.js.map +1 -1
  308. package/components/SidePage/SidePageContainer.d.ts +0 -2
  309. package/components/SidePage/SidePageContainer.js +11 -13
  310. package/components/SidePage/SidePageContainer.js.map +1 -1
  311. package/components/SidePage/SidePageFooter.d.ts +0 -2
  312. package/components/SidePage/SidePageFooter.js +11 -13
  313. package/components/SidePage/SidePageFooter.js.map +1 -1
  314. package/components/SidePage/SidePageHeader.d.ts +0 -1
  315. package/components/SidePage/SidePageHeader.js +10 -10
  316. package/components/SidePage/SidePageHeader.js.map +1 -1
  317. package/components/Spinner/Spinner.d.ts +0 -2
  318. package/components/Spinner/Spinner.js +7 -10
  319. package/components/Spinner/Spinner.js.map +1 -1
  320. package/components/Spinner/Spinner.styles.d.ts +12 -12
  321. package/components/Spinner/Spinner.styles.js +13 -41
  322. package/components/Spinner/Spinner.styles.js.map +1 -1
  323. package/components/Sticky/Sticky.d.ts +0 -1
  324. package/components/Sticky/Sticky.js +1 -1
  325. package/components/Sticky/Sticky.js.map +1 -1
  326. package/components/Sticky/Sticky.styles.d.ts +7 -6
  327. package/components/Sticky/Sticky.styles.js +8 -25
  328. package/components/Sticky/Sticky.styles.js.map +1 -1
  329. package/components/Switcher/Switcher.d.ts +0 -1
  330. package/components/Switcher/Switcher.js +6 -6
  331. package/components/Switcher/Switcher.js.map +1 -1
  332. package/components/Switcher/Switcher.styles.d.ts +11 -11
  333. package/components/Switcher/Switcher.styles.js +12 -37
  334. package/components/Switcher/Switcher.styles.js.map +1 -1
  335. package/components/Switcher/switcherTheme.js +12 -4
  336. package/components/Switcher/switcherTheme.js.map +1 -1
  337. package/components/Tabs/Indicator.d.ts +0 -1
  338. package/components/Tabs/Indicator.js +2 -2
  339. package/components/Tabs/Indicator.js.map +1 -1
  340. package/components/Tabs/Indicator.styles.d.ts +7 -7
  341. package/components/Tabs/Indicator.styles.js +8 -25
  342. package/components/Tabs/Indicator.styles.js.map +1 -1
  343. package/components/Tabs/Tab.d.ts +0 -2
  344. package/components/Tabs/Tab.js +19 -24
  345. package/components/Tabs/Tab.js.map +1 -1
  346. package/components/Tabs/Tab.styles.d.ts +27 -27
  347. package/components/Tabs/Tab.styles.js +30 -99
  348. package/components/Tabs/Tab.styles.js.map +1 -1
  349. package/components/Tabs/Tabs.d.ts +0 -2
  350. package/components/Tabs/Tabs.js +24 -29
  351. package/components/Tabs/Tabs.js.map +1 -1
  352. package/components/Tabs/Tabs.styles.d.ts +6 -6
  353. package/components/Tabs/Tabs.styles.js +8 -25
  354. package/components/Tabs/Tabs.styles.js.map +1 -1
  355. package/components/Textarea/Textarea.d.ts +0 -2
  356. package/components/Textarea/Textarea.js +17 -24
  357. package/components/Textarea/Textarea.js.map +1 -1
  358. package/components/Textarea/Textarea.styles.d.ts +26 -22
  359. package/components/Textarea/Textarea.styles.js +27 -71
  360. package/components/Textarea/Textarea.styles.js.map +1 -1
  361. package/components/Textarea/TextareaCounter.js +22 -14
  362. package/components/Textarea/TextareaCounter.js.map +1 -1
  363. package/components/TimePicker/TimePicker.styles.d.ts +11 -11
  364. package/components/TimePicker/TimePicker.styles.js +12 -37
  365. package/components/TimePicker/TimePicker.styles.js.map +1 -1
  366. package/components/TimePicker/TimePickerItems.js +6 -6
  367. package/components/TimePicker/TimePickerItems.js.map +1 -1
  368. package/components/TimePicker/TimePickerPopup.js +1 -1
  369. package/components/TimePicker/TimePickerPopup.js.map +1 -1
  370. package/components/Toast/Toast.d.ts +0 -1
  371. package/components/Toast/Toast.js +9 -6
  372. package/components/Toast/Toast.js.map +1 -1
  373. package/components/Toast/Toast.styles.d.ts +6 -5
  374. package/components/Toast/Toast.styles.js +7 -22
  375. package/components/Toast/Toast.styles.js.map +1 -1
  376. package/components/Toast/ToastView.d.ts +0 -1
  377. package/components/Toast/ToastView.js +9 -17
  378. package/components/Toast/ToastView.js.map +1 -1
  379. package/components/Toast/ToastView.styles.d.ts +19 -17
  380. package/components/Toast/ToastView.styles.js +20 -65
  381. package/components/Toast/ToastView.styles.js.map +1 -1
  382. package/components/Toggle/Toggle.d.ts +1 -1
  383. package/components/Toggle/Toggle.js +55 -39
  384. package/components/Toggle/Toggle.js.map +1 -1
  385. package/components/Toggle/Toggle.styles.d.ts +47 -46
  386. package/components/Toggle/Toggle.styles.js +48 -143
  387. package/components/Toggle/Toggle.styles.js.map +1 -1
  388. package/components/Token/Token.d.ts +0 -2
  389. package/components/Token/Token.js +5 -10
  390. package/components/Token/Token.js.map +1 -1
  391. package/components/Token/Token.styles.d.ts +20 -19
  392. package/components/Token/Token.styles.js +22 -62
  393. package/components/Token/Token.styles.js.map +1 -1
  394. package/components/Token/TokenView.js +8 -10
  395. package/components/Token/TokenView.js.map +1 -1
  396. package/components/TokenInput/TextWidthHelper.d.ts +0 -1
  397. package/components/TokenInput/TextWidthHelper.js +4 -4
  398. package/components/TokenInput/TextWidthHelper.js.map +1 -1
  399. package/components/TokenInput/TokenInput.d.ts +1 -2
  400. package/components/TokenInput/TokenInput.js +20 -22
  401. package/components/TokenInput/TokenInput.js.map +1 -1
  402. package/components/TokenInput/TokenInput.styles.d.ts +21 -20
  403. package/components/TokenInput/TokenInput.styles.js +22 -66
  404. package/components/TokenInput/TokenInput.styles.js.map +1 -1
  405. package/components/Tooltip/Tooltip.d.ts +0 -1
  406. package/components/Tooltip/Tooltip.js +12 -12
  407. package/components/Tooltip/Tooltip.js.map +1 -1
  408. package/components/Tooltip/Tooltip.styles.d.ts +11 -10
  409. package/components/Tooltip/Tooltip.styles.js +12 -34
  410. package/components/Tooltip/Tooltip.styles.js.map +1 -1
  411. package/index.d.ts +4 -0
  412. package/index.js +12 -0
  413. package/index.js.map +1 -1
  414. package/internal/ClearCrossIcon/ClearCrossIcon.js +7 -9
  415. package/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
  416. package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +11 -12
  417. package/internal/ClearCrossIcon/ClearCrossIcon.styles.js +12 -35
  418. package/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
  419. package/internal/CloseButtonIcon/CloseButtonIcon.d.ts +21 -11
  420. package/internal/CloseButtonIcon/CloseButtonIcon.js +28 -13
  421. package/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
  422. package/internal/CloseButtonIcon/CloseButtonIcon.styles.d.ts +8 -8
  423. package/internal/CloseButtonIcon/CloseButtonIcon.styles.js +9 -23
  424. package/internal/CloseButtonIcon/CloseButtonIcon.styles.js.map +1 -1
  425. package/internal/CommonWrapper/CommonWrapper.d.ts +5 -1
  426. package/internal/CommonWrapper/CommonWrapper.js +107 -6
  427. package/internal/CommonWrapper/CommonWrapper.js.map +1 -1
  428. package/internal/CustomComboBox/ComboBoxView.d.ts +1 -2
  429. package/internal/CustomComboBox/ComboBoxView.js +8 -7
  430. package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  431. package/internal/CustomComboBox/CustomComboBox.styles.d.ts +5 -3
  432. package/internal/CustomComboBox/CustomComboBox.styles.js +6 -16
  433. package/internal/CustomComboBox/CustomComboBox.styles.js.map +1 -1
  434. package/internal/DateSelect/DateSelect.d.ts +0 -1
  435. package/internal/DateSelect/DateSelect.js +2 -2
  436. package/internal/DateSelect/DateSelect.js.map +1 -1
  437. package/internal/DateSelect/DateSelect.styles.d.ts +5 -5
  438. package/internal/DateSelect/DateSelect.styles.js +7 -19
  439. package/internal/DateSelect/DateSelect.styles.js.map +1 -1
  440. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.d.ts +15 -1
  441. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js +36 -15
  442. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
  443. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.d.ts +5 -0
  444. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js +7 -0
  445. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js.map +1 -0
  446. package/internal/InputLikeText/InputLikeText.d.ts +0 -1
  447. package/internal/InputLikeText/InputLikeText.js +21 -17
  448. package/internal/InputLikeText/InputLikeText.js.map +1 -1
  449. package/internal/InputLikeText/InputLikeText.styles.d.ts +7 -7
  450. package/internal/InputLikeText/InputLikeText.styles.js +8 -28
  451. package/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
  452. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +0 -1
  453. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +14 -14
  454. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -1
  455. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -2
  456. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +4 -13
  457. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -1
  458. package/internal/MaskCharLowLine/MaskCharLowLine.styles.d.ts +3 -2
  459. package/internal/MaskCharLowLine/MaskCharLowLine.styles.js +4 -13
  460. package/internal/MaskCharLowLine/MaskCharLowLine.styles.js.map +1 -1
  461. package/internal/Menu/Menu.d.ts +0 -1
  462. package/internal/Menu/Menu.js +9 -9
  463. package/internal/Menu/Menu.js.map +1 -1
  464. package/internal/Menu/Menu.styles.d.ts +15 -15
  465. package/internal/Menu/Menu.styles.js +16 -49
  466. package/internal/Menu/Menu.styles.js.map +1 -1
  467. package/internal/MenuMessage/MenuMessage.js +10 -10
  468. package/internal/MenuMessage/MenuMessage.js.map +1 -1
  469. package/internal/MenuMessage/MenuMessage.styles.d.ts +10 -10
  470. package/internal/MenuMessage/MenuMessage.styles.js +11 -39
  471. package/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
  472. package/internal/MobilePopup/MobilePopup.d.ts +0 -1
  473. package/internal/MobilePopup/MobilePopup.js +23 -11
  474. package/internal/MobilePopup/MobilePopup.js.map +1 -1
  475. package/internal/MobilePopup/MobilePopup.styles.d.ts +16 -16
  476. package/internal/MobilePopup/MobilePopup.styles.js +17 -55
  477. package/internal/MobilePopup/MobilePopup.styles.js.map +1 -1
  478. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +0 -1
  479. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +5 -5
  480. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -1
  481. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +6 -6
  482. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +7 -23
  483. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -1
  484. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.d.ts +0 -1
  485. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js +10 -10
  486. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js.map +1 -1
  487. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.d.ts +13 -13
  488. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js +14 -45
  489. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js.map +1 -1
  490. package/internal/NativeDateInput/NativeDateInput.d.ts +0 -1
  491. package/internal/NativeDateInput/NativeDateInput.js +1 -1
  492. package/internal/NativeDateInput/NativeDateInput.js.map +1 -1
  493. package/internal/NativeDateInput/NativeDateInput.styles.d.ts +3 -2
  494. package/internal/NativeDateInput/NativeDateInput.styles.js +4 -13
  495. package/internal/NativeDateInput/NativeDateInput.styles.js.map +1 -1
  496. package/internal/NativeTimeInput/NativeTimeInput.js +1 -2
  497. package/internal/NativeTimeInput/NativeTimeInput.js.map +1 -1
  498. package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +3 -2
  499. package/internal/NativeTimeInput/NativeTimeInput.styles.js +4 -13
  500. package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +1 -1
  501. package/internal/Popup/Popup.d.ts +0 -1
  502. package/internal/Popup/Popup.js +5 -5
  503. package/internal/Popup/Popup.js.map +1 -1
  504. package/internal/Popup/Popup.styles.d.ts +21 -21
  505. package/internal/Popup/Popup.styles.js +22 -67
  506. package/internal/Popup/Popup.styles.js.map +1 -1
  507. package/internal/Popup/PopupPin.d.ts +0 -1
  508. package/internal/Popup/PopupPin.js +1 -1
  509. package/internal/Popup/PopupPin.js.map +1 -1
  510. package/internal/Popup/PopupPin.styles.d.ts +9 -8
  511. package/internal/Popup/PopupPin.styles.js +10 -31
  512. package/internal/Popup/PopupPin.styles.js.map +1 -1
  513. package/internal/PopupMenu/PopupMenu.d.ts +0 -1
  514. package/internal/PopupMenu/PopupMenu.js +1 -1
  515. package/internal/PopupMenu/PopupMenu.js.map +1 -1
  516. package/internal/PopupMenu/PopupMenu.styles.d.ts +4 -3
  517. package/internal/PopupMenu/PopupMenu.styles.js +5 -16
  518. package/internal/PopupMenu/PopupMenu.styles.js.map +1 -1
  519. package/internal/RenderContainer/RenderInnerContainer.js +4 -2
  520. package/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
  521. package/internal/ResizeDetector/ResizeDetector.d.ts +0 -1
  522. package/internal/ResizeDetector/ResizeDetector.js +1 -1
  523. package/internal/ResizeDetector/ResizeDetector.js.map +1 -1
  524. package/internal/ResizeDetector/ResizeDetector.styles.d.ts +7 -6
  525. package/internal/ResizeDetector/ResizeDetector.styles.js +8 -25
  526. package/internal/ResizeDetector/ResizeDetector.styles.js.map +1 -1
  527. package/internal/SpinnerIcon/SpinnerIcon.js +2 -2
  528. package/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
  529. package/internal/SpinnerIcon/SpinnerIcon.styles.d.ts +6 -5
  530. package/internal/SpinnerIcon/SpinnerIcon.styles.js +7 -22
  531. package/internal/SpinnerIcon/SpinnerIcon.styles.js.map +1 -1
  532. package/internal/TextWidthHelper/TextWidthHelper.d.ts +0 -1
  533. package/internal/TextWidthHelper/TextWidthHelper.js +1 -1
  534. package/internal/TextWidthHelper/TextWidthHelper.js.map +1 -1
  535. package/internal/TextWidthHelper/TextWidthHelper.styles.d.ts +4 -3
  536. package/internal/TextWidthHelper/TextWidthHelper.styles.js +5 -16
  537. package/internal/TextWidthHelper/TextWidthHelper.styles.js.map +1 -1
  538. package/internal/TimeInput/TimeFragments.js +19 -15
  539. package/internal/TimeInput/TimeFragments.js.map +1 -1
  540. package/internal/TimeInput/TimeFragments.styles.d.ts +19 -31
  541. package/internal/TimeInput/TimeFragments.styles.js +20 -76
  542. package/internal/TimeInput/TimeFragments.styles.js.map +1 -1
  543. package/internal/TimeInput/TimeInput.js +4 -4
  544. package/internal/TimeInput/TimeInput.js.map +1 -1
  545. package/internal/TimeInput/TimeInput.styles.d.ts +6 -6
  546. package/internal/TimeInput/TimeInput.styles.js +7 -22
  547. package/internal/TimeInput/TimeInput.styles.js.map +1 -1
  548. package/internal/icons2022/BaseIcon.js +8 -1
  549. package/internal/icons2022/BaseIcon.js.map +1 -1
  550. package/internal/icons2022/BaseIcon.styles.d.ts +5 -2
  551. package/internal/icons2022/BaseIcon.styles.js +6 -14
  552. package/internal/icons2022/BaseIcon.styles.js.map +1 -1
  553. package/internal/icons2022/LoadingIcon.js +3 -5
  554. package/internal/icons2022/LoadingIcon.js.map +1 -1
  555. package/internal/themes/BasicTheme.d.ts +10 -0
  556. package/internal/themes/BasicTheme.js +17 -6
  557. package/internal/themes/BasicTheme.js.map +1 -1
  558. package/internal/themes/DarkTheme6_0.js +62 -342
  559. package/internal/themes/DarkTheme6_0.js.map +1 -1
  560. package/internal/themes/DarkTheme6_1.js +11 -3
  561. package/internal/themes/DarkTheme6_1.js.map +1 -1
  562. package/internal/themes/DarkTheme6_4.js +11 -1
  563. package/internal/themes/DarkTheme6_4.js.map +1 -1
  564. package/lib/Upgrades.d.ts +12 -2
  565. package/lib/Upgrades.js +12 -16
  566. package/lib/Upgrades.js.map +1 -1
  567. package/lib/classNames.generated.d.ts +1235 -0
  568. package/lib/classNames.generated.js +1233 -0
  569. package/lib/classNames.generated.js.map +1 -0
  570. package/lib/globalObject.js +4 -1
  571. package/lib/globalObject.js.map +1 -1
  572. package/lib/renderEnvironment/RenderEnvironmentContext.d.ts +38 -6
  573. package/lib/renderEnvironment/RenderEnvironmentContext.js +21 -19
  574. package/lib/renderEnvironment/RenderEnvironmentContext.js.map +1 -1
  575. package/lib/renderEnvironment/RenderEnvironmentDecorator.js +6 -3
  576. package/lib/renderEnvironment/RenderEnvironmentDecorator.js.map +1 -1
  577. package/lib/styles/baselineCompensation.d.ts +63 -0
  578. package/lib/styles/baselineCompensation.js +122 -0
  579. package/lib/styles/baselineCompensation.js.map +1 -0
  580. package/lib/theming/Emotion.d.ts +43 -9
  581. package/lib/theming/Emotion.js +70 -35
  582. package/lib/theming/Emotion.js.map +1 -1
  583. package/lib/theming/declaredTheme.d.ts +43 -0
  584. package/lib/theming/declaredTheme.js +56 -0
  585. package/lib/theming/declaredTheme.js.map +1 -0
  586. package/lib/theming/hashString.d.ts +19 -0
  587. package/lib/theming/hashString.js +52 -0
  588. package/lib/theming/hashString.js.map +1 -0
  589. package/lib/theming/staticStyles.d.ts +17 -0
  590. package/lib/theming/staticStyles.js +8 -0
  591. package/lib/theming/staticStyles.js.map +1 -0
  592. package/lib/theming/staticThemeDelta.d.ts +17 -0
  593. package/lib/theming/staticThemeDelta.js +37 -0
  594. package/lib/theming/staticThemeDelta.js.map +1 -0
  595. package/lib/theming/staticThemeVars.d.ts +21 -0
  596. package/lib/theming/staticThemeVars.js +35 -0
  597. package/lib/theming/staticThemeVars.js.map +1 -0
  598. package/lib/theming/themeCssVarsClass.d.ts +89 -0
  599. package/lib/theming/themeCssVarsClass.js +253 -0
  600. package/lib/theming/themeCssVarsClass.js.map +1 -0
  601. package/lib/theming/themeCssVarsDelta.d.ts +13 -0
  602. package/lib/theming/themeCssVarsDelta.js +67 -0
  603. package/lib/theming/themeCssVarsDelta.js.map +1 -0
  604. package/lib/theming/themeToCssVars.d.ts +47 -0
  605. package/lib/theming/themeToCssVars.js +861 -0
  606. package/lib/theming/themeToCssVars.js.map +1 -0
  607. package/package.json +47 -6
  608. package/react-ui-tailwind.css +544 -0
  609. package/react-ui-themes.css +8628 -0
  610. package/react-ui-token-map.json +9029 -0
  611. package/react-ui.css +7776 -0
  612. package/react-ui.layer.css +7778 -0
  613. package/themes/dark-6-0.css +1439 -0
  614. package/themes/dark-6-0.scoped.css +1439 -0
  615. package/themes/dark-6-1.css +1439 -0
  616. package/themes/dark-6-1.scoped.css +1439 -0
  617. package/themes/dark.css +1439 -0
  618. package/themes/dark.scoped.css +1439 -0
  619. package/themes/light-6-0.css +1437 -0
  620. package/themes/light-6-0.scoped.css +1437 -0
  621. package/themes/light-6-1.css +1437 -0
  622. package/themes/light-6-1.scoped.css +1437 -0
  623. package/themes/light.css +1437 -0
  624. package/themes/light.scoped.css +1437 -0
  625. package/components/Button/Button.mixins.d.ts +0 -4
  626. package/components/Button/Button.mixins.js +0 -21
  627. package/components/Button/Button.mixins.js.map +0 -1
  628. package/components/Checkbox/Checkbox.mixins.d.ts +0 -4
  629. package/components/Checkbox/Checkbox.mixins.js +0 -18
  630. package/components/Checkbox/Checkbox.mixins.js.map +0 -1
  631. package/components/FileUploader/FileUploader.mixins.d.ts +0 -1
  632. package/components/FileUploader/FileUploader.mixins.js +0 -4
  633. package/components/FileUploader/FileUploader.mixins.js.map +0 -1
  634. package/components/Link/Link.mixins.d.ts +0 -2
  635. package/components/Link/Link.mixins.js +0 -7
  636. package/components/Link/Link.mixins.js.map +0 -1
  637. package/components/MenuFooter/MenuFooter.mixins.d.ts +0 -2
  638. package/components/MenuFooter/MenuFooter.mixins.js +0 -8
  639. package/components/MenuFooter/MenuFooter.mixins.js.map +0 -1
  640. package/components/MenuHeader/MenuHeader.mixins.d.ts +0 -2
  641. package/components/MenuHeader/MenuHeader.mixins.js +0 -8
  642. package/components/MenuHeader/MenuHeader.mixins.js.map +0 -1
  643. package/components/Radio/Radio.mixins.d.ts +0 -7
  644. package/components/Radio/Radio.mixins.js +0 -30
  645. package/components/Radio/Radio.mixins.js.map +0 -1
  646. package/components/Tabs/helpers.d.ts +0 -6
  647. package/components/Tabs/helpers.js +0 -25
  648. package/components/Tabs/helpers.js.map +0 -1
  649. package/components/Textarea/Textarea.mixins.d.ts +0 -2
  650. package/components/Textarea/Textarea.mixins.js +0 -7
  651. package/components/Textarea/Textarea.mixins.js.map +0 -1
  652. package/components/Toggle/Toggle.mixins.d.ts +0 -8
  653. package/components/Toggle/Toggle.mixins.js +0 -32
  654. package/components/Toggle/Toggle.mixins.js.map +0 -1
  655. package/components/Token/Token.mixins.d.ts +0 -1
  656. package/components/Token/Token.mixins.js +0 -4
  657. package/components/Token/Token.mixins.js.map +0 -1
  658. package/components/TokenInput/TokenInput.mixins.d.ts +0 -2
  659. package/components/TokenInput/TokenInput.mixins.js +0 -7
  660. package/components/TokenInput/TokenInput.mixins.js.map +0 -1
  661. package/lib/chars.d.ts +0 -8
  662. package/lib/chars.js +0 -9
  663. package/lib/chars.js.map +0 -1
  664. package/lib/styles/Mixins.d.ts +0 -2
  665. package/lib/styles/Mixins.js +0 -7
  666. package/lib/styles/Mixins.js.map +0 -1
  667. package/lib/styles/UiFont.d.ts +0 -3
  668. package/lib/styles/UiFont.js +0 -18
  669. package/lib/styles/UiFont.js.map +0 -1
  670. package/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +0 -1
  671. package/lib/styles/getLabGrotesqueBaselineCompensation.js +0 -10
  672. package/lib/styles/getLabGrotesqueBaselineCompensation.js.map +0 -1
  673. package/lib/theming/AnimationKeyframes.d.ts +0 -7
  674. package/lib/theming/AnimationKeyframes.js +0 -24
  675. package/lib/theming/AnimationKeyframes.js.map +0 -1
  676. package/lib/theming/useTheme.d.ts +0 -2
  677. package/lib/theming/useTheme.js +0 -6
  678. package/lib/theming/useTheme.js.map +0 -1
  679. package/typings/stylis-plugin-extra-scope.d.ts +0 -3
@@ -21,8 +21,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
21
21
  import React, { useContext, useRef, useState } from 'react';
22
22
  import { LocaleContext } from '../../../lib/locale/index.js';
23
23
  import { pluralize } from '../../../lib/pluralize.js';
24
- import { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';
25
- import { ThemeContext } from '../../../lib/theming/ThemeContext.js';
24
+ import { useStyles } from '../../../lib/renderEnvironment/index.js';
25
+ import { concatClassNames as cx } from '../../../lib/theming/Emotion.js';
26
26
  import { FileUploaderControlContext } from '../FileUploaderControlContext.js';
27
27
  import { FileUploaderFileStatus } from '../fileUtils.js';
28
28
  import { useControlLocale } from '../hooks/useControlLocale.js';
@@ -34,11 +34,9 @@ export var FileUploaderFileDataTids = {
34
34
  export var FileUploaderFileList = function (props) {
35
35
  var renderFile = props.renderFile, size = props.size, _a = props.view, view = _a === void 0 ? 'row' : _a, _b = props.validationSummary, validationSummary = _b === void 0 ? 'auto' : _b, _c = props.validationSummaryStart, validationSummaryStart = _c === void 0 ? 5 : _c, withValidationTooltip = props.withValidationTooltip, validationTooltipPosition = props.validationTooltipPosition, withWarningIcon = props.withWarningIcon, _d = props.disabled, disabled = _d === void 0 ? false : _d, onRemove = props.onRemove;
36
36
  var files = useContext(FileUploaderControlContext).files;
37
- var cx = useEmotion().cx;
38
37
  var jsStyles = useStyles(getJsStyles);
39
38
  var jsRowStyles = useStyles(getJsRowStyles);
40
39
  var jsTileStyles = useStyles(getJsTileStyles);
41
- var theme = useContext(ThemeContext);
42
40
  var locale = useControlLocale();
43
41
  var langCode = useContext(LocaleContext).langCode;
44
42
  var _e = useState(null), focusedByTab = _e[0], setFocusedByTab = _e[1];
@@ -67,14 +65,14 @@ export var FileUploaderFileList = function (props) {
67
65
  var isTileView = view === 'tile';
68
66
  var jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;
69
67
  var fileWrapperClass = useFileUploaderSize(size, {
70
- small: jsViewStyles.fileWrapperSmall(theme),
71
- medium: jsViewStyles.fileWrapperMedium(theme),
72
- large: jsViewStyles.fileWrapperLarge(theme),
68
+ small: jsViewStyles.fileWrapperSmall(),
69
+ medium: jsViewStyles.fileWrapperMedium(),
70
+ large: jsViewStyles.fileWrapperLarge(),
73
71
  });
74
72
  var summaryClass = useFileUploaderSize(size, {
75
- small: jsStyles.summarySmall(theme),
76
- medium: jsStyles.summaryMedium(theme),
77
- large: jsStyles.summaryLarge(theme),
73
+ small: jsStyles.summarySmall(),
74
+ medium: jsStyles.summaryMedium(),
75
+ large: jsStyles.summaryLarge(),
78
76
  });
79
77
  var renderSummary = function () {
80
78
  if (validationSummary === 'disabled') {
@@ -88,17 +86,17 @@ export var FileUploaderFileList = function (props) {
88
86
  if (!(warningLength + errorLength)) {
89
87
  return null;
90
88
  }
91
- return (React.createElement("div", { className: cx(jsStyles.summary(theme), summaryClass) },
92
- errorLength > 0 && (React.createElement("span", { className: jsStyles.summaryErrorText(theme) },
89
+ return (React.createElement("div", { className: cx(jsStyles.summary(), summaryClass) },
90
+ errorLength > 0 && (React.createElement("span", { className: jsStyles.summaryErrorText() },
93
91
  errorLength,
94
92
  "\u00A0",
95
93
  pluralize.apply(void 0, __spreadArray([langCode, errorLength], locale.errors, false)))),
96
- warningLength > 0 && (React.createElement("span", { className: jsStyles.summaryWarningText(theme) },
94
+ warningLength > 0 && (React.createElement("span", { className: jsStyles.summaryWarningText() },
97
95
  warningLength,
98
96
  "\u00A0",
99
97
  pluralize.apply(void 0, __spreadArray([langCode, warningLength], locale.warnings, false))))));
100
98
  };
101
- return (React.createElement("div", { "data-tid": FileUploaderFileDataTids.fileList, className: jsViewStyles.fileListWrapper(theme) },
99
+ return (React.createElement("div", { "data-tid": FileUploaderFileDataTids.fileList, className: jsViewStyles.fileListWrapper() },
102
100
  renderSummary(),
103
101
  files.map(function (file, idx) {
104
102
  var _a, _b, _c, _d, _e;
@@ -107,16 +105,16 @@ export var FileUploaderFileList = function (props) {
107
105
  var hasHover = hovered === file.id;
108
106
  var hasError = file.status === FileUploaderFileStatus.Error;
109
107
  var hasWarning = file.status === FileUploaderFileStatus.Warning;
110
- var fileWrapperClassNames = cx(jsStyles.fileWrapper(theme), fileWrapperClass, __assign(__assign(__assign(__assign((_a = {}, _a[jsStyles.fileWrapperFocus(theme)] = hasFocus, _a[jsStyles.fileWrapperHover(theme)] = hasHover, _a), (hasError && (_b = {},
111
- _b[jsStyles.errorFile(theme)] = !isTileView || hasHover,
112
- _b[jsViewStyles.errorFileFocus(theme)] = hasFocus,
108
+ var fileWrapperClassNames = cx(jsStyles.fileWrapper(), fileWrapperClass, __assign(__assign(__assign(__assign((_a = {}, _a[jsStyles.fileWrapperFocus()] = hasFocus, _a[jsStyles.fileWrapperHover()] = hasHover, _a), (hasError && (_b = {},
109
+ _b[jsStyles.errorFile()] = !isTileView || hasHover,
110
+ _b[jsViewStyles.errorFileFocus()] = hasFocus,
113
111
  _b))), (!isTileView &&
114
112
  hasError && (_c = {},
115
113
  _c[jsStyles.removeBorderTopRadius()] = ((_f = files[idx - 1]) === null || _f === void 0 ? void 0 : _f.status) === FileUploaderFileStatus.Error,
116
114
  _c[jsStyles.removeBorderBottomRadius()] = ((_g = files[idx + 1]) === null || _g === void 0 ? void 0 : _g.status) === FileUploaderFileStatus.Error,
117
115
  _c))), (hasWarning && (_d = {},
118
- _d[jsStyles.warningFile(theme)] = !isTileView || hasHover,
119
- _d[jsViewStyles.warningFileFocus(theme)] = hasFocus,
116
+ _d[jsStyles.warningFile()] = !isTileView || hasHover,
117
+ _d[jsViewStyles.warningFileFocus()] = hasFocus,
120
118
  _d))), (!isTileView &&
121
119
  hasWarning && (_e = {},
122
120
  _e[jsStyles.removeBorderTopRadius()] = ((_h = files[idx - 1]) === null || _h === void 0 ? void 0 : _h.status) === FileUploaderFileStatus.Warning,
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderFileList.js","sourceRoot":"","sources":["FileUploaderFileList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAA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UAAU,CAAC,SAAS,CAAC,CAAC;YAE1C,OAAO,CACL,6BACE,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,SAAS,EAAE,qBAAqB,EAChC,YAAY,EAAE,cAAM,OAAA,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAzB,CAAyB,EAC7C,YAAY,EAAE,cAAM,OAAA,gBAAgB,EAAE,EAAlB,CAAkB,EACtC,OAAO,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,EAAxB,CAAwB,EACvC,MAAM,EAAE,cAAM,OAAA,eAAe,CAAC,IAAI,CAAC,EAArB,CAAqB;gBAEnC,6BAAK,SAAS,EAAE,YAAY,CAAC,IAAI,EAAE,IAAG,WAAW,CAAO,CACpD,CACP,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,oBAAoB,CAAC,mBAAmB,GAAG,sBAAsB,CAAC;AAClE,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC","sourcesContent":["import React, { useContext, useRef, useState } from 'react';\n\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../../internal/Popup/index.js';\nimport { LocaleContext } from '../../../lib/locale/index.js';\nimport { pluralize } from '../../../lib/pluralize.js';\nimport { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { FileUploaderControlContext } from '../FileUploaderControlContext.js';\nimport type { FileUploaderFileProps } from '../FileUploaderFile.js';\nimport { FileUploaderFileStatus, type FileUploaderValidationSummary, type FileUploaderView } from '../fileUtils.js';\nimport { useControlLocale } from '../hooks/useControlLocale.js';\nimport { useFileUploaderSize } from '../hooks/useFileUploaderSize.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFileList.styles.js';\n\ninterface FileUploaderFileListProps {\n renderFile: (props: FileUploaderFileProps) => React.ReactNode;\n size: SizeProp;\n view?: FileUploaderView;\n validationSummary?: FileUploaderValidationSummary;\n validationSummaryStart?: number;\n onRemove(fileId: string): void;\n withValidationTooltip?: boolean;\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n withWarningIcon?: boolean;\n disabled?: boolean;\n}\n\nexport const FileUploaderFileDataTids = {\n fileList: 'FileUploader__fileList',\n} as const;\n\nexport const FileUploaderFileList = (props: FileUploaderFileListProps): React.ReactElement => {\n const {\n renderFile,\n size,\n view = 'row',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n disabled = false,\n onRemove,\n } = props;\n const { files } = useContext(FileUploaderControlContext);\n const { cx } = useEmotion();\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const theme = useContext(ThemeContext);\n const locale = useControlLocale();\n const { langCode } = useContext(LocaleContext);\n\n const [focusedByTab, setFocusedByTab] = useState<string | null>(null);\n const [hovered, setHovered] = useState<string | null>(null);\n const mouseIsOverRef = useRef(false);\n\n const handleMouseEnter = (index: string | null) => {\n setHovered(index);\n mouseIsOverRef.current = true;\n };\n\n const handleMouseLeave = () => {\n setHovered(null);\n mouseIsOverRef.current = false;\n };\n\n const handleRemoveItem = (index: string) => {\n onRemove(index);\n if (hovered === index && mouseIsOverRef.current) {\n const currentIndex = files.findIndex((file) => file.id === index);\n if (currentIndex !== -1 && files[currentIndex + 1]) {\n setHovered(files[currentIndex + 1].id);\n } else {\n setHovered(null);\n }\n }\n };\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const fileWrapperClass = useFileUploaderSize(size, {\n small: jsViewStyles.fileWrapperSmall(theme),\n medium: jsViewStyles.fileWrapperMedium(theme),\n large: jsViewStyles.fileWrapperLarge(theme),\n });\n\n const summaryClass = useFileUploaderSize(size, {\n small: jsStyles.summarySmall(theme),\n medium: jsStyles.summaryMedium(theme),\n large: jsStyles.summaryLarge(theme),\n });\n\n const renderSummary = () => {\n if (validationSummary === 'disabled') {\n return null;\n }\n\n const warningLength = files.filter((file) => file.status === FileUploaderFileStatus.Warning).length;\n const errorLength = files.filter((file) => file.status === FileUploaderFileStatus.Error).length;\n\n if (validationSummary === 'auto' && files.length < validationSummaryStart) {\n return null;\n }\n\n if (!(warningLength + errorLength)) {\n return null;\n }\n\n return (\n <div className={cx(jsStyles.summary(theme), summaryClass)}>\n {errorLength > 0 && (\n <span className={jsStyles.summaryErrorText(theme)}>\n {errorLength}&nbsp;{pluralize(langCode, errorLength, ...locale.errors)}\n </span>\n )}\n {warningLength > 0 && (\n <span className={jsStyles.summaryWarningText(theme)}>\n {warningLength}&nbsp;{pluralize(langCode, warningLength, ...locale.warnings)}\n </span>\n )}\n </div>\n );\n };\n\n return (\n <div data-tid={FileUploaderFileDataTids.fileList} className={jsViewStyles.fileListWrapper(theme)}>\n {renderSummary()}\n {files.map((file, idx) => {\n const hasFocus = focusedByTab === file.id;\n const hasHover = hovered === file.id;\n const hasError = file.status === FileUploaderFileStatus.Error;\n const hasWarning = file.status === FileUploaderFileStatus.Warning;\n\n const fileWrapperClassNames = cx(jsStyles.fileWrapper(theme), fileWrapperClass, {\n [jsStyles.fileWrapperFocus(theme)]: hasFocus,\n [jsStyles.fileWrapperHover(theme)]: hasHover,\n ...(hasError && {\n [jsStyles.errorFile(theme)]: !isTileView || hasHover,\n [jsViewStyles.errorFileFocus(theme)]: hasFocus,\n }),\n ...(!isTileView &&\n hasError && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Error,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Error,\n }),\n ...(hasWarning && {\n [jsStyles.warningFile(theme)]: !isTileView || hasHover,\n [jsViewStyles.warningFileFocus(theme)]: hasFocus,\n }),\n ...(!isTileView &&\n hasWarning && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Warning,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Warning,\n }),\n });\n\n const fileProps: FileUploaderFileProps = {\n file,\n multiple: true,\n size,\n view,\n disabled,\n hovered: hasHover,\n focused: hasFocus,\n onRemove: handleRemoveItem,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <div\n key={file.id}\n className={fileWrapperClassNames}\n onMouseEnter={() => handleMouseEnter(file.id)}\n onMouseLeave={() => handleMouseLeave()}\n onFocus={() => setFocusedByTab(file.id)}\n onBlur={() => setFocusedByTab(null)}\n >\n <div className={jsViewStyles.file()}>{fileElement}</div>\n </div>\n );\n })}\n </div>\n );\n};\n\nFileUploaderFileList.__KONTUR_REACT_UI__ = 'FileUploaderFileList';\nFileUploaderFileList.displayName = 'FileUploaderFileList';\n"]}
1
+ {"version":3,"file":"FileUploaderFileList.js","sourceRoot":"","sources":["FileUploaderFileList.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,gBAAgB,IAAI,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAA6D,MAAM,iBAAiB,CAAC;AACpH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,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useRef, useState } from 'react';\n\nimport type { PopupPositionsType, ShortPopupPositionsType } from '../../../internal/Popup/index.js';\nimport { LocaleContext } from '../../../lib/locale/index.js';\nimport { pluralize } from '../../../lib/pluralize.js';\nimport { useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { concatClassNames as cx } from '../../../lib/theming/Emotion.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { FileUploaderControlContext } from '../FileUploaderControlContext.js';\nimport type { FileUploaderFileProps } from '../FileUploaderFile.js';\nimport { FileUploaderFileStatus, type FileUploaderValidationSummary, type FileUploaderView } from '../fileUtils.js';\nimport { useControlLocale } from '../hooks/useControlLocale.js';\nimport { useFileUploaderSize } from '../hooks/useFileUploaderSize.js';\nimport { getJsRowStyles, getJsStyles, getJsTileStyles } from './FileUploaderFileList.styles.js';\n\ninterface FileUploaderFileListProps {\n renderFile: (props: FileUploaderFileProps) => React.ReactNode;\n size: SizeProp;\n view?: FileUploaderView;\n validationSummary?: FileUploaderValidationSummary;\n validationSummaryStart?: number;\n onRemove(fileId: string): void;\n withValidationTooltip?: boolean;\n validationTooltipPosition?: ShortPopupPositionsType | PopupPositionsType;\n withWarningIcon?: boolean;\n disabled?: boolean;\n}\n\nexport const FileUploaderFileDataTids = {\n fileList: 'FileUploader__fileList',\n} as const;\n\nexport const FileUploaderFileList = (props: FileUploaderFileListProps): React.ReactElement => {\n const {\n renderFile,\n size,\n view = 'row',\n validationSummary = 'auto',\n validationSummaryStart = 5,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n disabled = false,\n onRemove,\n } = props;\n const { files } = useContext(FileUploaderControlContext);\n const jsStyles = useStyles(getJsStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n const jsTileStyles = useStyles(getJsTileStyles);\n const locale = useControlLocale();\n const { langCode } = useContext(LocaleContext);\n\n const [focusedByTab, setFocusedByTab] = useState<string | null>(null);\n const [hovered, setHovered] = useState<string | null>(null);\n const mouseIsOverRef = useRef(false);\n\n const handleMouseEnter = (index: string | null) => {\n setHovered(index);\n mouseIsOverRef.current = true;\n };\n\n const handleMouseLeave = () => {\n setHovered(null);\n mouseIsOverRef.current = false;\n };\n\n const handleRemoveItem = (index: string) => {\n onRemove(index);\n if (hovered === index && mouseIsOverRef.current) {\n const currentIndex = files.findIndex((file) => file.id === index);\n if (currentIndex !== -1 && files[currentIndex + 1]) {\n setHovered(files[currentIndex + 1].id);\n } else {\n setHovered(null);\n }\n }\n };\n\n const isTileView = view === 'tile';\n const jsViewStyles = isTileView ? jsTileStyles : jsRowStyles;\n\n const fileWrapperClass = useFileUploaderSize(size, {\n small: jsViewStyles.fileWrapperSmall(),\n medium: jsViewStyles.fileWrapperMedium(),\n large: jsViewStyles.fileWrapperLarge(),\n });\n\n const summaryClass = useFileUploaderSize(size, {\n small: jsStyles.summarySmall(),\n medium: jsStyles.summaryMedium(),\n large: jsStyles.summaryLarge(),\n });\n\n const renderSummary = () => {\n if (validationSummary === 'disabled') {\n return null;\n }\n\n const warningLength = files.filter((file) => file.status === FileUploaderFileStatus.Warning).length;\n const errorLength = files.filter((file) => file.status === FileUploaderFileStatus.Error).length;\n\n if (validationSummary === 'auto' && files.length < validationSummaryStart) {\n return null;\n }\n\n if (!(warningLength + errorLength)) {\n return null;\n }\n\n return (\n <div className={cx(jsStyles.summary(), summaryClass)}>\n {errorLength > 0 && (\n <span className={jsStyles.summaryErrorText()}>\n {errorLength}&nbsp;{pluralize(langCode, errorLength, ...locale.errors)}\n </span>\n )}\n {warningLength > 0 && (\n <span className={jsStyles.summaryWarningText()}>\n {warningLength}&nbsp;{pluralize(langCode, warningLength, ...locale.warnings)}\n </span>\n )}\n </div>\n );\n };\n\n return (\n <div data-tid={FileUploaderFileDataTids.fileList} className={jsViewStyles.fileListWrapper()}>\n {renderSummary()}\n {files.map((file, idx) => {\n const hasFocus = focusedByTab === file.id;\n const hasHover = hovered === file.id;\n const hasError = file.status === FileUploaderFileStatus.Error;\n const hasWarning = file.status === FileUploaderFileStatus.Warning;\n\n const fileWrapperClassNames = cx(jsStyles.fileWrapper(), fileWrapperClass, {\n [jsStyles.fileWrapperFocus()]: hasFocus,\n [jsStyles.fileWrapperHover()]: hasHover,\n ...(hasError && {\n [jsStyles.errorFile()]: !isTileView || hasHover,\n [jsViewStyles.errorFileFocus()]: hasFocus,\n }),\n ...(!isTileView &&\n hasError && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Error,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Error,\n }),\n ...(hasWarning && {\n [jsStyles.warningFile()]: !isTileView || hasHover,\n [jsViewStyles.warningFileFocus()]: hasFocus,\n }),\n ...(!isTileView &&\n hasWarning && {\n [jsStyles.removeBorderTopRadius()]: files[idx - 1]?.status === FileUploaderFileStatus.Warning,\n [jsStyles.removeBorderBottomRadius()]: files[idx + 1]?.status === FileUploaderFileStatus.Warning,\n }),\n });\n\n const fileProps: FileUploaderFileProps = {\n file,\n multiple: true,\n size,\n view,\n disabled,\n hovered: hasHover,\n focused: hasFocus,\n onRemove: handleRemoveItem,\n withValidationTooltip,\n validationTooltipPosition,\n withWarningIcon,\n };\n\n const fileElement = renderFile(fileProps);\n\n return (\n <div\n key={file.id}\n className={fileWrapperClassNames}\n onMouseEnter={() => handleMouseEnter(file.id)}\n onMouseLeave={() => handleMouseLeave()}\n onFocus={() => setFocusedByTab(file.id)}\n onBlur={() => setFocusedByTab(null)}\n >\n <div className={jsViewStyles.file()}>{fileElement}</div>\n </div>\n );\n })}\n </div>\n );\n};\n\nFileUploaderFileList.__KONTUR_REACT_UI__ = 'FileUploaderFileList';\nFileUploaderFileList.displayName = 'FileUploaderFileList';\n"]}
@@ -1,34 +1,34 @@
1
- import type { Theme } from '../../../lib/theming/Theme.js';
2
- export declare const getJsStyles: import("../../../lib/theming/Emotion.js").StylesGetter<{
3
- fileWrapper(t: Theme): string;
4
- fileWrapperFocus(t: Theme): string;
5
- fileWrapperHover(t: Theme): string;
6
- warningFile(t: Theme): string;
7
- errorFile(t: Theme): string;
8
- removeBorderTopRadius(): string;
9
- removeBorderBottomRadius(): string;
10
- summary(t: Theme): string;
11
- summaryErrorText(t: Theme): string;
12
- summaryWarningText(t: Theme): string;
13
- summarySmall(t: Theme): string;
14
- summaryMedium(t: Theme): string;
15
- summaryLarge(t: Theme): string;
1
+ /** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */
2
+ export declare const getJsRowStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
3
+ file: string;
4
+ fileListWrapper: string;
5
+ fileWrapperSmall: string;
6
+ fileWrapperMedium: string;
7
+ fileWrapperLarge: string;
8
+ errorFileFocus: string;
9
+ warningFileFocus: string;
16
10
  }>;
17
- export declare const getJsRowStyles: import("../../../lib/theming/Emotion.js").StylesGetter<{
18
- file(): string;
19
- fileListWrapper(t: Theme): string;
20
- fileWrapperSmall(t: Theme): string;
21
- fileWrapperMedium(t: Theme): string;
22
- fileWrapperLarge(t: Theme): string;
23
- errorFileFocus(t: Theme): string;
24
- warningFileFocus(t: Theme): string;
11
+ export declare const getJsStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
12
+ fileWrapper: string;
13
+ fileWrapperFocus: string;
14
+ fileWrapperHover: string;
15
+ warningFile: string;
16
+ errorFile: string;
17
+ removeBorderTopRadius: string;
18
+ removeBorderBottomRadius: string;
19
+ summary: string;
20
+ summaryErrorText: string;
21
+ summaryWarningText: string;
22
+ summarySmall: string;
23
+ summaryMedium: string;
24
+ summaryLarge: string;
25
25
  }>;
26
- export declare const getJsTileStyles: import("../../../lib/theming/Emotion.js").StylesGetter<{
27
- file(): string;
28
- fileListWrapper(): string;
29
- fileWrapperSmall(t: Theme): string;
30
- fileWrapperMedium(t: Theme): string;
31
- fileWrapperLarge(t: Theme): string;
32
- errorFileFocus(t: Theme): string;
33
- warningFileFocus(t: Theme): string;
26
+ export declare const getJsTileStyles: (ignored?: unknown) => import("../../../lib/theming/staticStyles.js").StaticStyles<{
27
+ file: string;
28
+ fileListWrapper: string;
29
+ fileWrapperSmall: string;
30
+ fileWrapperMedium: string;
31
+ fileWrapperLarge: string;
32
+ errorFileFocus: string;
33
+ warningFileFocus: string;
34
34
  }>;
@@ -1,103 +1,36 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { memoizeGetStyles } from '../../../lib/theming/Emotion.js';
6
- export var getJsStyles = memoizeGetStyles(function (_a) {
7
- var css = _a.css;
8
- return {
9
- fileWrapper: function (t) {
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: max-content;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-radius: ", ";\n border: ", " solid transparent;\n box-shadow: 0 0 0 1px transparent;\n cursor: pointer;\n\n &::before {\n position: absolute;\n content: ' ';\n width: 100%;\n height: 100%;\n border-radius: ", ";\n border: ", " solid transparent;\n box-shadow: 0 0 0 1px transparent;\n top: -1px;\n left: -1px;\n z-index: -1;\n }\n "], ["\n position: relative;\n width: 100%;\n height: max-content;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-radius: ", ";\n border: ", " solid transparent;\n box-shadow: 0 0 0 1px transparent;\n cursor: pointer;\n\n &::before {\n position: absolute;\n content: ' ';\n width: 100%;\n height: 100%;\n border-radius: ", ";\n border: ", " solid transparent;\n box-shadow: 0 0 0 1px transparent;\n top: -1px;\n left: -1px;\n z-index: -1;\n }\n "])), t.fileUploaderBorderRadius, t.fileUploaderBorderWidth, t.fileUploaderBorderRadius, t.fileUploaderBorderWidth);
11
- },
12
- fileWrapperFocus: function (t) {
13
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: ", " solid ", ";\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorFocus, t.fileUploaderBorderColorFocus);
14
- },
15
- fileWrapperHover: function (t) {
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: ", ";\n border-color: ", ";\n "], ["\n background: ", ";\n border-color: ", ";\n "])), t.fileUploaderHoveredBg, t.fileUploaderHoveredBorderColor);
17
- },
18
- warningFile: function (t) {
19
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "])), t.fileUploaderWarningBgColor, t.fileUploaderValidationTextColor, t.fileUploaderWarningBgHoverColor, t.fileUploaderBorderRadius, t.fileUploaderWarningBgColor);
20
- },
21
- errorFile: function (t) {
22
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "], ["\n background: ", ";\n color: ", ";\n &:hover {\n background: ", ";\n border-radius: ", ";\n }\n &::before {\n background: ", ";\n }\n "])), t.fileUploaderErrorBgColor, t.fileUploaderValidationTextColor, t.fileUploaderErrorBgHoverColor, t.fileUploaderBorderRadius, t.fileUploaderErrorBgColor);
23
- },
24
- removeBorderTopRadius: function () {
25
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n "], ["\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n "])));
26
- },
27
- removeBorderBottomRadius: function () {
28
- return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n "], ["\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n "])));
29
- },
30
- summary: function (t) {
31
- return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n order: -1;\n width: 100%;\n box-sizing: border-box;\n "], ["\n display: flex;\n border-bottom: 1px solid ", ";\n margin-bottom: ", ";\n order: -1;\n width: 100%;\n box-sizing: border-box;\n "])), t.tabColorHover, t.fileUploaderListGap);
32
- },
33
- summaryErrorText: function (t) {
34
- return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n "], ["\n color: ", ";\n margin-right: ", ";\n "])), t.fileUploaderErrorTextColor, t.fileUploaderListSummaryTextGap);
35
- },
36
- summaryWarningText: function (t) {
37
- return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.fileUploaderWarningTextColor);
38
- },
39
- summarySmall: function (t) {
40
- return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeSmall, t.fileUploaderLineHeightSmall, t.fileUploaderPaddingYSmall, t.fileUploaderPaddingXSmall);
41
- },
42
- summaryMedium: function (t) {
43
- return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeMedium, t.fileUploaderLineHeightMedium, t.fileUploaderPaddingYMedium, t.fileUploaderPaddingXMedium);
44
- },
45
- summaryLarge: function (t) {
46
- return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "], ["\n font-size: ", ";\n line-height: ", ";\n padding: ", " ", ";\n "])), t.fileUploaderFontSizeLarge, t.fileUploaderLineHeightLarge, t.fileUploaderPaddingYLarge, t.fileUploaderPaddingXLarge);
47
- },
48
- };
1
+ import { staticStyles } from '../../../lib/theming/staticStyles.js';
2
+ /** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */
3
+ export var getJsRowStyles = staticStyles({
4
+ file: 'react-ui-FileUploaderFileList-JsRow-file',
5
+ fileListWrapper: 'react-ui-FileUploaderFileList-JsRow-fileListWrapper',
6
+ fileWrapperSmall: 'react-ui-FileUploaderFileList-JsRow-fileWrapperSmall',
7
+ fileWrapperMedium: 'react-ui-FileUploaderFileList-JsRow-fileWrapperMedium',
8
+ fileWrapperLarge: 'react-ui-FileUploaderFileList-JsRow-fileWrapperLarge',
9
+ errorFileFocus: 'react-ui-FileUploaderFileList-JsRow-errorFileFocus',
10
+ warningFileFocus: 'react-ui-FileUploaderFileList-JsRow-warningFileFocus',
49
11
  });
50
- export var getJsRowStyles = memoizeGetStyles(function (_a) {
51
- var css = _a.css;
52
- return {
53
- file: function () {
54
- return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
55
- },
56
- fileListWrapper: function (t) {
57
- return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: block;\n width: 100%;\n margin-top: ", ";\n "], ["\n display: block;\n width: 100%;\n margin-top: ", ";\n "])), t.fileUploaderListGap);
58
- },
59
- fileWrapperSmall: function (t) {
60
- return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), t.fileUploaderPaddingYSmall, t.fileUploaderPaddingXSmall);
61
- },
62
- fileWrapperMedium: function (t) {
63
- return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), t.fileUploaderPaddingYMedium, t.fileUploaderPaddingXMedium);
64
- },
65
- fileWrapperLarge: function (t) {
66
- return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), t.fileUploaderPaddingYLarge, t.fileUploaderPaddingXLarge);
67
- },
68
- errorFileFocus: function (t) {
69
- return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderErrorBgHoverColor, t.fileUploaderBorderWidth, t.fileUploaderBorderColorError, t.fileUploaderBorderRadius, t.fileUploaderBorderColorError);
70
- },
71
- warningFileFocus: function (t) {
72
- return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n background: ", ";\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderWarningBgHoverColor, t.fileUploaderBorderWidth, t.fileUploaderBorderColorWarning, t.fileUploaderBorderRadius, t.fileUploaderBorderColorWarning);
73
- },
74
- };
12
+ export var getJsStyles = staticStyles({
13
+ fileWrapper: 'react-ui-FileUploaderFileList-Js-fileWrapper',
14
+ fileWrapperFocus: 'react-ui-FileUploaderFileList-Js-fileWrapperFocus',
15
+ fileWrapperHover: 'react-ui-FileUploaderFileList-Js-fileWrapperHover',
16
+ warningFile: 'react-ui-FileUploaderFileList-Js-warningFile',
17
+ errorFile: 'react-ui-FileUploaderFileList-Js-errorFile',
18
+ removeBorderTopRadius: 'react-ui-FileUploaderFileList-Js-removeBorderTopRadius',
19
+ removeBorderBottomRadius: 'react-ui-FileUploaderFileList-Js-removeBorderBottomRadius',
20
+ summary: 'react-ui-FileUploaderFileList-Js-summary',
21
+ summaryErrorText: 'react-ui-FileUploaderFileList-Js-summaryErrorText',
22
+ summaryWarningText: 'react-ui-FileUploaderFileList-Js-summaryWarningText',
23
+ summarySmall: 'react-ui-FileUploaderFileList-Js-summarySmall',
24
+ summaryMedium: 'react-ui-FileUploaderFileList-Js-summaryMedium',
25
+ summaryLarge: 'react-ui-FileUploaderFileList-Js-summaryLarge',
75
26
  });
76
- export var getJsTileStyles = memoizeGetStyles(function (_a) {
77
- var css = _a.css;
78
- return {
79
- file: function () {
80
- return css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n "], ["\n width: 100%;\n height: 100%;\n "])));
81
- },
82
- fileListWrapper: function () {
83
- return css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: contents;\n "], ["\n display: contents;\n "])));
84
- },
85
- fileWrapperSmall: function (t) {
86
- return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n "])), t.fileUploaderTileFilePaddingSmall, t.fileUploaderTileWidthSmall);
87
- },
88
- fileWrapperMedium: function (t) {
89
- return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n height: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n height: ", ";\n "])), t.fileUploaderTileFilePaddingMedium, t.fileUploaderTileWidthMedium, t.fileUploaderTileHeightMedium);
90
- },
91
- fileWrapperLarge: function (t) {
92
- return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n padding: ", ";\n width: ", ";\n height: ", ";\n "], ["\n padding: ", ";\n width: ", ";\n height: ", ";\n "])), t.fileUploaderTileFilePaddingLarge, t.fileUploaderTileWidthLarge, t.fileUploaderTileHeightLarge);
93
- },
94
- errorFileFocus: function (t) {
95
- return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorError, t.fileUploaderBorderRadius, t.fileUploaderBorderColorError);
96
- },
97
- warningFileFocus: function (t) {
98
- return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "], ["\n border: ", " solid ", ";\n border-radius: ", " !important;\n box-shadow: 0 0 0 1px ", ";\n "])), t.fileUploaderBorderWidth, t.fileUploaderBorderColorWarning, t.fileUploaderBorderRadius, t.fileUploaderBorderColorWarning);
99
- },
100
- };
27
+ export var getJsTileStyles = staticStyles({
28
+ file: 'react-ui-FileUploaderFileList-JsTile-file',
29
+ fileListWrapper: 'react-ui-FileUploaderFileList-JsTile-fileListWrapper',
30
+ fileWrapperSmall: 'react-ui-FileUploaderFileList-JsTile-fileWrapperSmall',
31
+ fileWrapperMedium: 'react-ui-FileUploaderFileList-JsTile-fileWrapperMedium',
32
+ fileWrapperLarge: 'react-ui-FileUploaderFileList-JsTile-fileWrapperLarge',
33
+ errorFileFocus: 'react-ui-FileUploaderFileList-JsTile-errorFileFocus',
34
+ warningFileFocus: 'react-ui-FileUploaderFileList-JsTile-warningFileFocus',
101
35
  });
102
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27;
103
36
  //# sourceMappingURL=FileUploaderFileList.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderFileList.styles.js","sourceRoot":"","sources":["FileUploaderFileList.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO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C;QAED,gBAAgB,YAAC,CAAQ;YACvB,OAAO,GAAG,+LAAA,oBACE,EAAyB,SAAU,EAAgC,4BAC5D,EAA0B,8CACnB,EAAgC,WACzD,KAHW,CAAC,CAAC,uBAAuB,EAAU,CAAC,CAAC,8BAA8B,EAC5D,CAAC,CAAC,wBAAwB,EACnB,CAAC,CAAC,8BAA8B,EACxD;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\n\nexport const getJsStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n fileWrapper(t: Theme) {\n return css`\n position: relative;\n width: 100%;\n height: max-content;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border-radius: ${t.fileUploaderBorderRadius};\n border: ${t.fileUploaderBorderWidth} solid transparent;\n box-shadow: 0 0 0 1px transparent;\n cursor: pointer;\n\n &::before {\n position: absolute;\n content: ' ';\n width: 100%;\n height: 100%;\n border-radius: ${t.fileUploaderBorderRadius};\n border: ${t.fileUploaderBorderWidth} solid transparent;\n box-shadow: 0 0 0 1px transparent;\n top: -1px;\n left: -1px;\n z-index: -1;\n }\n `;\n },\n\n fileWrapperFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorFocus};\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorFocus};\n `;\n },\n\n fileWrapperHover(t: Theme) {\n return css`\n background: ${t.fileUploaderHoveredBg};\n border-color: ${t.fileUploaderHoveredBorderColor};\n `;\n },\n\n warningFile(t: Theme) {\n return css`\n background: ${t.fileUploaderWarningBgColor};\n color: ${t.fileUploaderValidationTextColor};\n &:hover {\n background: ${t.fileUploaderWarningBgHoverColor};\n border-radius: ${t.fileUploaderBorderRadius};\n }\n &::before {\n background: ${t.fileUploaderWarningBgColor};\n }\n `;\n },\n\n errorFile(t: Theme) {\n return css`\n background: ${t.fileUploaderErrorBgColor};\n color: ${t.fileUploaderValidationTextColor};\n &:hover {\n background: ${t.fileUploaderErrorBgHoverColor};\n border-radius: ${t.fileUploaderBorderRadius};\n }\n &::before {\n background: ${t.fileUploaderErrorBgColor};\n }\n `;\n },\n\n removeBorderTopRadius() {\n return css`\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n &::before {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n `;\n },\n\n removeBorderBottomRadius() {\n return css`\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n &::before {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n `;\n },\n\n summary(t: Theme) {\n return css`\n display: flex;\n border-bottom: 1px solid ${t.tabColorHover};\n margin-bottom: ${t.fileUploaderListGap};\n order: -1;\n width: 100%;\n box-sizing: border-box;\n `;\n },\n\n summaryErrorText(t: Theme) {\n return css`\n color: ${t.fileUploaderErrorTextColor};\n margin-right: ${t.fileUploaderListSummaryTextGap};\n `;\n },\n\n summaryWarningText(t: Theme) {\n return css`\n color: ${t.fileUploaderWarningTextColor};\n `;\n },\n\n summarySmall(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeSmall};\n line-height: ${t.fileUploaderLineHeightSmall};\n padding: ${t.fileUploaderPaddingYSmall} ${t.fileUploaderPaddingXSmall};\n `;\n },\n\n summaryMedium(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeMedium};\n line-height: ${t.fileUploaderLineHeightMedium};\n padding: ${t.fileUploaderPaddingYMedium} ${t.fileUploaderPaddingXMedium};\n `;\n },\n\n summaryLarge(t: Theme) {\n return css`\n font-size: ${t.fileUploaderFontSizeLarge};\n line-height: ${t.fileUploaderLineHeightLarge};\n padding: ${t.fileUploaderPaddingYLarge} ${t.fileUploaderPaddingXLarge};\n `;\n },\n };\n});\n\nexport const getJsRowStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n file() {\n return css`\n width: 100%;\n `;\n },\n\n fileListWrapper(t: Theme) {\n return css`\n display: block;\n width: 100%;\n margin-top: ${t.fileUploaderListGap};\n `;\n },\n\n fileWrapperSmall(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYSmall} ${t.fileUploaderPaddingXSmall};\n `;\n },\n\n fileWrapperMedium(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYMedium} ${t.fileUploaderPaddingXMedium};\n `;\n },\n\n fileWrapperLarge(t: Theme) {\n return css`\n padding: ${t.fileUploaderPaddingYLarge} ${t.fileUploaderPaddingXLarge};\n `;\n },\n\n errorFileFocus(t: Theme) {\n return css`\n background: ${t.fileUploaderErrorBgHoverColor};\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorError};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorError};\n `;\n },\n\n warningFileFocus(t: Theme) {\n return css`\n background: ${t.fileUploaderWarningBgHoverColor};\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorWarning};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorWarning};\n `;\n },\n };\n});\n\nexport const getJsTileStyles = memoizeGetStyles(({ css }: Emotion) => {\n return {\n file() {\n return css`\n width: 100%;\n height: 100%;\n `;\n },\n\n fileListWrapper() {\n return css`\n display: contents;\n `;\n },\n\n fileWrapperSmall(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingSmall};\n width: ${t.fileUploaderTileWidthSmall};\n `;\n },\n\n fileWrapperMedium(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingMedium};\n width: ${t.fileUploaderTileWidthMedium};\n height: ${t.fileUploaderTileHeightMedium};\n `;\n },\n\n fileWrapperLarge(t: Theme) {\n return css`\n padding: ${t.fileUploaderTileFilePaddingLarge};\n width: ${t.fileUploaderTileWidthLarge};\n height: ${t.fileUploaderTileHeightLarge};\n `;\n },\n\n errorFileFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorError};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorError};\n `;\n },\n\n warningFileFocus(t: Theme) {\n return css`\n border: ${t.fileUploaderBorderWidth} solid ${t.fileUploaderBorderColorWarning};\n border-radius: ${t.fileUploaderBorderRadius} !important;\n box-shadow: 0 0 0 1px ${t.fileUploaderBorderColorWarning};\n `;\n },\n };\n});\n"]}
1
+ {"version":3,"file":"FileUploaderFileList.styles.js","sourceRoot":"","sources":["FileUploaderFileList.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,CAAC,IAAM,cAAc,GAAG,YAAY,CAAC;IACzC,IAAI,EAAE,0CAA0C;IAChD,eAAe,EAAE,qDAAqD;IACtE,gBAAgB,EAAE,sDAAsD;IACxE,iBAAiB,EAAE,uDAAuD;IAC1E,gBAAgB,EAAE,sDAAsD;IACxE,cAAc,EAAE,oDAAoD;IACpE,gBAAgB,EAAE,sDAAsD;CACzE,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,WAAW,GAAG,YAAY,CAAC;IACtC,WAAW,EAAE,8CAA8C;IAC3D,gBAAgB,EAAE,mDAAmD;IACrE,gBAAgB,EAAE,mDAAmD;IACrE,WAAW,EAAE,8CAA8C;IAC3D,SAAS,EAAE,4CAA4C;IACvD,qBAAqB,EAAE,wDAAwD;IAC/E,wBAAwB,EAAE,2DAA2D;IACrF,OAAO,EAAE,0CAA0C;IACnD,gBAAgB,EAAE,mDAAmD;IACrE,kBAAkB,EAAE,qDAAqD;IACzE,YAAY,EAAE,+CAA+C;IAC7D,aAAa,EAAE,gDAAgD;IAC/D,YAAY,EAAE,+CAA+C;CAC9D,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,2CAA2C;IACjD,eAAe,EAAE,sDAAsD;IACvE,gBAAgB,EAAE,uDAAuD;IACzE,iBAAiB,EAAE,wDAAwD;IAC3E,gBAAgB,EAAE,uDAAuD;IACzE,cAAc,EAAE,qDAAqD;IACrE,gBAAgB,EAAE,uDAAuD;CAC1E,CAAC,CAAC","sourcesContent":["import { staticStyles } from '../../../lib/theming/staticStyles.js';\n\n/** Правила — в `FileUploaderFileList.css`; здесь только имена классов. */\nexport const getJsRowStyles = staticStyles({\n file: 'react-ui-FileUploaderFileList-JsRow-file',\n fileListWrapper: 'react-ui-FileUploaderFileList-JsRow-fileListWrapper',\n fileWrapperSmall: 'react-ui-FileUploaderFileList-JsRow-fileWrapperSmall',\n fileWrapperMedium: 'react-ui-FileUploaderFileList-JsRow-fileWrapperMedium',\n fileWrapperLarge: 'react-ui-FileUploaderFileList-JsRow-fileWrapperLarge',\n errorFileFocus: 'react-ui-FileUploaderFileList-JsRow-errorFileFocus',\n warningFileFocus: 'react-ui-FileUploaderFileList-JsRow-warningFileFocus',\n});\n\nexport const getJsStyles = staticStyles({\n fileWrapper: 'react-ui-FileUploaderFileList-Js-fileWrapper',\n fileWrapperFocus: 'react-ui-FileUploaderFileList-Js-fileWrapperFocus',\n fileWrapperHover: 'react-ui-FileUploaderFileList-Js-fileWrapperHover',\n warningFile: 'react-ui-FileUploaderFileList-Js-warningFile',\n errorFile: 'react-ui-FileUploaderFileList-Js-errorFile',\n removeBorderTopRadius: 'react-ui-FileUploaderFileList-Js-removeBorderTopRadius',\n removeBorderBottomRadius: 'react-ui-FileUploaderFileList-Js-removeBorderBottomRadius',\n summary: 'react-ui-FileUploaderFileList-Js-summary',\n summaryErrorText: 'react-ui-FileUploaderFileList-Js-summaryErrorText',\n summaryWarningText: 'react-ui-FileUploaderFileList-Js-summaryWarningText',\n summarySmall: 'react-ui-FileUploaderFileList-Js-summarySmall',\n summaryMedium: 'react-ui-FileUploaderFileList-Js-summaryMedium',\n summaryLarge: 'react-ui-FileUploaderFileList-Js-summaryLarge',\n});\n\nexport const getJsTileStyles = staticStyles({\n file: 'react-ui-FileUploaderFileList-JsTile-file',\n fileListWrapper: 'react-ui-FileUploaderFileList-JsTile-fileListWrapper',\n fileWrapperSmall: 'react-ui-FileUploaderFileList-JsTile-fileWrapperSmall',\n fileWrapperMedium: 'react-ui-FileUploaderFileList-JsTile-fileWrapperMedium',\n fileWrapperLarge: 'react-ui-FileUploaderFileList-JsTile-fileWrapperLarge',\n errorFileFocus: 'react-ui-FileUploaderFileList-JsTile-errorFileFocus',\n warningFileFocus: 'react-ui-FileUploaderFileList-JsTile-warningFileFocus',\n});\n"]}
@@ -1,7 +1,6 @@
1
- import React, { useContext } from 'react';
1
+ import React from 'react';
2
2
  import { LoadingIcon } from '../../internal/icons2022/LoadingIcon.js';
3
3
  import { useStyles } from '../../lib/renderEnvironment/index.js';
4
- import { ThemeContext } from '../../lib/theming/ThemeContext.js';
5
4
  import { useResponsiveLayout } from '../ResponsiveLayout/index.js';
6
5
  import { getJsRowStyles, getJsTileStyles } from './FileUploaderFile.styles.js';
7
6
  import { FileUploaderFileStatus } from './fileUtils.js';
@@ -9,10 +8,9 @@ import { DeleteIcon } from './icons/DeleteIcon.js';
9
8
  export var FileUploaderFileStatusIcon = function (_a) {
10
9
  var hovered = _a.hovered, isTileView = _a.isTileView, disabled = _a.disabled, focusedByTab = _a.focusedByTab, isInvalid = _a.isInvalid, status = _a.status, size = _a.size, hasValidation = _a.hasValidation;
11
10
  var isMobile = useResponsiveLayout().isMobile;
12
- var theme = useContext(ThemeContext);
13
11
  var jsTileStyles = useStyles(getJsTileStyles);
14
12
  var jsRowStyles = useStyles(getJsRowStyles);
15
- var iconClassNames = isTileView ? jsTileStyles.iconColor(theme) : jsRowStyles.iconColor(theme);
13
+ var iconClassNames = isTileView ? jsTileStyles.iconColor() : jsRowStyles.iconColor();
16
14
  var iconDelete = React.createElement(DeleteIcon, { size: size, className: iconClassNames });
17
15
  if (status === FileUploaderFileStatus.Loading) {
18
16
  return hovered || isTileView ? iconDelete : React.createElement(LoadingIcon, { size: size });
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderFileStatusIcon.js","sourceRoot":"","sources":["FileUploaderFileStatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD,MAAM,CAAC,IAAM,0BAA0B,GAA6D,UAAC,EASpG;QARC,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,aAAa,mBAAA;IAEL,IAAA,QAAQ,GAAK,mBAAmB,EAAE,SAA1B,CAA2B;IAC3C,IAAM,KAAK,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACvC,IAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;IAChD,IAAM,WAAW,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;IAE9C,IAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACjG,IAAM,UAAU,GAAG,oBAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,CAAC;IAEzE,IAAI,MAAM,KAAK,sBAAsB,CAAC,OAAO,EAAE,CAAC;QAC9C,OAAO,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;IAC1E,CAAC;IACD,IAAI,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,SAAS,IAAI,aAAa,EAAE,CAAC;QAC/B,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,2FAA2F;IAC3F,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import React, { useContext } from 'react';\n\nimport { LoadingIcon } from '../../internal/icons2022/LoadingIcon.js';\nimport { useStyles } from '../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { useResponsiveLayout } from '../ResponsiveLayout/index.js';\nimport { getJsRowStyles, getJsTileStyles } from './FileUploaderFile.styles.js';\nimport { FileUploaderFileStatus } from './fileUtils.js';\nimport { DeleteIcon } from './icons/DeleteIcon.js';\n\ninterface FileUploaderFileStatusIconProps {\n hovered: boolean;\n isTileView?: boolean;\n disabled?: boolean;\n focusedByTab: boolean;\n isInvalid: boolean;\n status: FileUploaderFileStatus;\n size: SizeProp;\n hasValidation?: boolean;\n}\n\nexport const FileUploaderFileStatusIcon: React.FunctionComponent<FileUploaderFileStatusIconProps> = ({\n hovered,\n isTileView,\n disabled,\n focusedByTab,\n isInvalid,\n status,\n size,\n hasValidation,\n}) => {\n const { isMobile } = useResponsiveLayout();\n const theme = useContext(ThemeContext);\n const jsTileStyles = useStyles(getJsTileStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n\n const iconClassNames = isTileView ? jsTileStyles.iconColor(theme) : jsRowStyles.iconColor(theme);\n const iconDelete = <DeleteIcon size={size} className={iconClassNames} />;\n\n if (status === FileUploaderFileStatus.Loading) {\n return hovered || isTileView ? iconDelete : <LoadingIcon size={size} />;\n }\n if (disabled || (!isMobile && !hovered && !focusedByTab)) {\n return null;\n }\n if (isInvalid || hasValidation) {\n return iconDelete;\n }\n // TODO - IF-2270 - добавить логику для действий по наведению и клику, пока только удаление\n return iconDelete;\n};\n"]}
1
+ {"version":3,"file":"FileUploaderFileStatusIcon.js","sourceRoot":"","sources":["FileUploaderFileStatusIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAanD,MAAM,CAAC,IAAM,0BAA0B,GAA6D,UAAC,EASpG;QARC,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,aAAa,mBAAA;IAEL,IAAA,QAAQ,GAAK,mBAAmB,EAAE,SAA1B,CAA2B;IAC3C,IAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;IAChD,IAAM,WAAW,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;IAE9C,IAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IACvF,IAAM,UAAU,GAAG,oBAAC,UAAU,IAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,GAAI,CAAC;IAEzE,IAAI,MAAM,KAAK,sBAAsB,CAAC,OAAO,EAAE,CAAC;QAC9C,OAAO,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,CAAC;IAC1E,CAAC;IACD,IAAI,QAAQ,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QACzD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,SAAS,IAAI,aAAa,EAAE,CAAC;QAC/B,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,2FAA2F;IAC3F,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { LoadingIcon } from '../../internal/icons2022/LoadingIcon.js';\nimport { useStyles } from '../../lib/renderEnvironment/index.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { useResponsiveLayout } from '../ResponsiveLayout/index.js';\nimport { getJsRowStyles, getJsTileStyles } from './FileUploaderFile.styles.js';\nimport { FileUploaderFileStatus } from './fileUtils.js';\nimport { DeleteIcon } from './icons/DeleteIcon.js';\n\ninterface FileUploaderFileStatusIconProps {\n hovered: boolean;\n isTileView?: boolean;\n disabled?: boolean;\n focusedByTab: boolean;\n isInvalid: boolean;\n status: FileUploaderFileStatus;\n size: SizeProp;\n hasValidation?: boolean;\n}\n\nexport const FileUploaderFileStatusIcon: React.FunctionComponent<FileUploaderFileStatusIconProps> = ({\n hovered,\n isTileView,\n disabled,\n focusedByTab,\n isInvalid,\n status,\n size,\n hasValidation,\n}) => {\n const { isMobile } = useResponsiveLayout();\n const jsTileStyles = useStyles(getJsTileStyles);\n const jsRowStyles = useStyles(getJsRowStyles);\n\n const iconClassNames = isTileView ? jsTileStyles.iconColor() : jsRowStyles.iconColor();\n const iconDelete = <DeleteIcon size={size} className={iconClassNames} />;\n\n if (status === FileUploaderFileStatus.Loading) {\n return hovered || isTileView ? iconDelete : <LoadingIcon size={size} />;\n }\n if (disabled || (!isMobile && !hovered && !focusedByTab)) {\n return null;\n }\n if (isInvalid || hasValidation) {\n return iconDelete;\n }\n // TODO - IF-2270 - добавить логику для действий по наведению и клику, пока только удаление\n return iconDelete;\n};\n"]}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { useTheme } from '../../lib/theming/useTheme.js';
2
+ import { useStyles } from '../../lib/renderEnvironment/index.js';
3
+ import { getStyles } from './FileUploaderFileTypeIcon.styles.js';
3
4
  import { ArchiveIcon as RowViewArchiveIcon } from './icons/row/ArchiveIcon.js';
4
5
  import { DocTextIcon as RowViewDocTextIcon } from './icons/row/DocTextIcon.js';
5
6
  import { FolderIcon as RowViewFolderIcon } from './icons/row/FolderIcon.js';
@@ -23,58 +24,52 @@ import { TextIcon as TileViewTextIcon } from './icons/tile/TextIcon.js';
23
24
  import { ValidationErrorIcon as TileValidationErrorIcon } from './icons/tile/ValidationErrorIcon.js';
24
25
  import { ValidationWarningIcon as TileValidationWarningIcon } from './icons/tile/ValidationWarningIcon.js';
25
26
  export var FileUploaderFileTypeIcon = function (_a) {
26
- var size = _a.size, type = _a.type, _b = _a.view, view = _b === void 0 ? 'row' : _b;
27
- var theme = useTheme();
27
+ var _b, _c;
28
+ var size = _a.size, type = _a.type, _d = _a.view, view = _d === void 0 ? 'row' : _d;
29
+ var styles = useStyles(getStyles);
28
30
  var isTileView = view === 'tile';
29
- if (isTileView) {
30
- switch (type) {
31
- case 'error':
32
- return React.createElement(TileValidationErrorIcon, { size: size, color: theme.fileUploaderFileTypeErrorIconColor });
33
- case 'warning':
34
- return React.createElement(TileValidationWarningIcon, { size: size, color: theme.fileUploaderFileTypeWarningIconColor });
35
- case 'pdf':
36
- return React.createElement(TileViewPdfIcon, { size: size, color: theme.fileUploaderFileTypePdfIconColor });
37
- case 'code':
38
- return React.createElement(TileViewMarkupIcon, { size: size, color: theme.fileUploaderFileTypeCodeIconColor });
39
- case 'picture':
40
- return React.createElement(TileViewPictureIcon, { size: size, color: theme.fileUploaderFileTypePictureIconColor });
41
- case 'presentation':
42
- return React.createElement(TileViewPresentationIcon, { size: size, color: theme.fileUploaderFileTypePresentationIconColor });
43
- case 'table':
44
- return React.createElement(TileViewTableIcon, { size: size, color: theme.fileUploaderFileTypeTableIconColor });
45
- case 'text':
46
- return React.createElement(TileViewTextIcon, { size: size, color: theme.fileUploaderFileTypeTextIconColor });
47
- case 'archive':
48
- return React.createElement(TileViewArchiveIcon, { size: size, color: theme.fileUploaderFileTypeArchiveIconColor });
49
- case 'folder':
50
- return React.createElement(TileViewFolderIcon, { size: size, color: theme.fileUploaderFileTypeFolderIconColor });
51
- default:
52
- return React.createElement(TileViewDocTextIcon, { size: size, color: theme.fileUploaderFileTypeUnknownIconColor });
31
+ // Цвет приходит классом, а не пропом `color`: значение темы иначе уехало бы в
32
+ // инлайновый `style` каждой иконки. Набор типов закрытый, поэтому класс на
33
+ // каждый — тот же приём, что у `CloseButtonIcon`.
34
+ var icons = isTileView
35
+ ? {
36
+ error: TileValidationErrorIcon,
37
+ warning: TileValidationWarningIcon,
38
+ pdf: TileViewPdfIcon,
39
+ code: TileViewMarkupIcon,
40
+ picture: TileViewPictureIcon,
41
+ presentation: TileViewPresentationIcon,
42
+ table: TileViewTableIcon,
43
+ text: TileViewTextIcon,
44
+ archive: TileViewArchiveIcon,
45
+ folder: TileViewFolderIcon,
53
46
  }
54
- }
55
- switch (type) {
56
- case 'error':
57
- return React.createElement(RowValidationErrorIcon, { size: size, color: theme.fileUploaderFileTypeErrorIconColor });
58
- case 'warning':
59
- return React.createElement(RowValidationWarningIcon, { size: size, color: theme.fileUploaderFileTypeWarningIconColor });
60
- case 'pdf':
61
- return React.createElement(RowViewPdfIcon, { size: size, color: theme.fileUploaderFileTypePdfIconColor });
62
- case 'code':
63
- return React.createElement(RowViewMarkupIcon, { size: size, color: theme.fileUploaderFileTypeCodeIconColor });
64
- case 'picture':
65
- return React.createElement(RowViewPictureIcon, { size: size, color: theme.fileUploaderFileTypePictureIconColor });
66
- case 'presentation':
67
- return React.createElement(RowViewPresentationIcon, { size: size, color: theme.fileUploaderFileTypePresentationIconColor });
68
- case 'table':
69
- return React.createElement(RowViewTableIcon, { size: size, color: theme.fileUploaderFileTypeTableIconColor });
70
- case 'text':
71
- return React.createElement(RowViewTextIcon, { size: size, color: theme.fileUploaderFileTypeTextIconColor });
72
- case 'archive':
73
- return React.createElement(RowViewArchiveIcon, { size: size, color: theme.fileUploaderFileTypeArchiveIconColor });
74
- case 'folder':
75
- return React.createElement(RowViewFolderIcon, { size: size, color: theme.fileUploaderFileTypeFolderIconColor });
76
- default:
77
- return React.createElement(RowViewDocTextIcon, { size: size, color: theme.fileUploaderFileTypeUnknownIconColor });
78
- }
47
+ : {
48
+ error: RowValidationErrorIcon,
49
+ warning: RowValidationWarningIcon,
50
+ pdf: RowViewPdfIcon,
51
+ code: RowViewMarkupIcon,
52
+ picture: RowViewPictureIcon,
53
+ presentation: RowViewPresentationIcon,
54
+ table: RowViewTableIcon,
55
+ text: RowViewTextIcon,
56
+ archive: RowViewArchiveIcon,
57
+ folder: RowViewFolderIcon,
58
+ };
59
+ var colorClassNames = {
60
+ error: styles.errorIcon(),
61
+ warning: styles.warningIcon(),
62
+ pdf: styles.pdfIcon(),
63
+ code: styles.codeIcon(),
64
+ picture: styles.pictureIcon(),
65
+ presentation: styles.presentationIcon(),
66
+ table: styles.tableIcon(),
67
+ text: styles.textIcon(),
68
+ archive: styles.archiveIcon(),
69
+ folder: styles.folderIcon(),
70
+ };
71
+ var Icon = (_b = icons[type]) !== null && _b !== void 0 ? _b : (isTileView ? TileViewDocTextIcon : RowViewDocTextIcon);
72
+ var colorClassName = (_c = colorClassNames[type]) !== null && _c !== void 0 ? _c : styles.unknownIcon();
73
+ return React.createElement(Icon, { size: size, className: colorClassName });
79
74
  };
80
75
  //# sourceMappingURL=FileUploaderFileTypeIcon.js.map