@skbkontur/react-ui 0.0.0-0dca6f33be → 0.0.0-0ffbe8b468

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 (934) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/cjs/components/Autocomplete/Autocomplete.d.ts +9 -3
  3. package/cjs/components/Autocomplete/Autocomplete.js +24 -7
  4. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  5. package/cjs/components/Autocomplete/Autocomplete.md +17 -0
  6. package/cjs/components/Button/Button.d.ts +9 -3
  7. package/cjs/components/Button/Button.js +27 -4
  8. package/cjs/components/Button/Button.js.map +1 -1
  9. package/cjs/components/Button/Button.mixins.js +1 -1
  10. package/cjs/components/Button/Button.mixins.js.map +1 -1
  11. package/cjs/components/Button/Button.styles.d.ts +1 -0
  12. package/cjs/components/Button/Button.styles.js +68 -62
  13. package/cjs/components/Button/Button.styles.js.map +1 -1
  14. package/cjs/components/Button/ButtonIcon.d.ts +3 -2
  15. package/cjs/components/Button/ButtonIcon.js +1 -0
  16. package/cjs/components/Button/ButtonIcon.js.map +1 -1
  17. package/cjs/components/Button/getInnerLinkTheme.js +9 -4
  18. package/cjs/components/Button/getInnerLinkTheme.js.map +1 -1
  19. package/cjs/components/Calendar/Calendar.d.ts +1 -0
  20. package/cjs/components/Calendar/Calendar.js +1 -0
  21. package/cjs/components/Calendar/Calendar.js.map +1 -1
  22. package/cjs/components/Calendar/Calendar.md +14 -3
  23. package/cjs/components/Calendar/Calendar.styles.js +1 -2
  24. package/cjs/components/Calendar/Calendar.styles.js.map +1 -1
  25. package/cjs/components/Calendar/DayCellView.js +9 -2
  26. package/cjs/components/Calendar/DayCellView.js.map +1 -1
  27. package/cjs/components/Calendar/DayCellView.styles.d.ts +1 -1
  28. package/cjs/components/Calendar/DayCellView.styles.js +4 -4
  29. package/cjs/components/Calendar/DayCellView.styles.js.map +1 -1
  30. package/cjs/components/Calendar/locale/locales/en.js +3 -1
  31. package/cjs/components/Calendar/locale/locales/en.js.map +1 -1
  32. package/cjs/components/Calendar/locale/locales/ru.js +3 -1
  33. package/cjs/components/Calendar/locale/locales/ru.js.map +1 -1
  34. package/cjs/components/Calendar/locale/types.d.ts +4 -0
  35. package/cjs/components/Checkbox/Checkbox.d.ts +15 -5
  36. package/cjs/components/Checkbox/Checkbox.js +73 -16
  37. package/cjs/components/Checkbox/Checkbox.js.map +1 -1
  38. package/cjs/components/Checkbox/Checkbox.md +18 -0
  39. package/cjs/components/Checkbox/Checkbox.mixins.d.ts +2 -0
  40. package/cjs/components/Checkbox/Checkbox.mixins.js +37 -0
  41. package/cjs/components/Checkbox/Checkbox.mixins.js.map +1 -0
  42. package/cjs/components/Checkbox/Checkbox.styles.d.ts +6 -0
  43. package/cjs/components/Checkbox/Checkbox.styles.js +95 -34
  44. package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -1
  45. package/cjs/components/ComboBox/ComboBox.d.ts +6 -8
  46. package/cjs/components/ComboBox/ComboBox.js +2 -1
  47. package/cjs/components/ComboBox/ComboBox.js.map +1 -1
  48. package/cjs/components/ComboBox/ComboBox.md +51 -5
  49. package/cjs/components/CurrencyInput/CurrencyHelper.d.ts +2 -0
  50. package/cjs/components/CurrencyInput/CurrencyHelper.js +21 -6
  51. package/cjs/components/CurrencyInput/CurrencyHelper.js.map +1 -1
  52. package/cjs/components/CurrencyInput/CurrencyInput.d.ts +2 -2
  53. package/cjs/components/CurrencyInput/CurrencyInput.js +2 -0
  54. package/cjs/components/CurrencyInput/CurrencyInput.js.map +1 -1
  55. package/cjs/components/DateInput/DateInput.d.ts +5 -1
  56. package/cjs/components/DateInput/DateInput.js +24 -8
  57. package/cjs/components/DateInput/DateInput.js.map +1 -1
  58. package/cjs/components/DatePicker/DatePicker.d.ts +2 -1
  59. package/cjs/components/DatePicker/DatePicker.js +13 -2
  60. package/cjs/components/DatePicker/DatePicker.js.map +1 -1
  61. package/cjs/components/DatePicker/DatePicker.md +15 -0
  62. package/cjs/components/DatePicker/locale/locales/en.js +4 -1
  63. package/cjs/components/DatePicker/locale/locales/en.js.map +1 -1
  64. package/cjs/components/DatePicker/locale/locales/ru.js +4 -1
  65. package/cjs/components/DatePicker/locale/locales/ru.js.map +1 -1
  66. package/cjs/components/DatePicker/locale/types.d.ts +3 -1
  67. package/cjs/components/Dropdown/Dropdown.d.ts +4 -7
  68. package/cjs/components/Dropdown/Dropdown.js +4 -3
  69. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  70. package/cjs/components/Dropdown/Dropdown.md +33 -0
  71. package/cjs/components/Dropdown/getDropdownTheme.js +32 -1
  72. package/cjs/components/Dropdown/getDropdownTheme.js.map +1 -1
  73. package/cjs/components/DropdownMenu/DropdownMenu.d.ts +2 -2
  74. package/cjs/components/DropdownMenu/DropdownMenu.js +6 -1
  75. package/cjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
  76. package/cjs/components/DropdownMenu/DropdownMenu.md +28 -0
  77. package/cjs/components/DropdownMenu/getDropdownMenuTheme.js +5 -1
  78. package/cjs/components/DropdownMenu/getDropdownMenuTheme.js.map +1 -1
  79. package/cjs/components/FileUploader/FileUploader.d.ts +6 -2
  80. package/cjs/components/FileUploader/FileUploader.js +4 -0
  81. package/cjs/components/FileUploader/FileUploader.js.map +1 -1
  82. package/cjs/components/FileUploader/FileUploader.styles.js +3 -2
  83. package/cjs/components/FileUploader/FileUploader.styles.js.map +1 -1
  84. package/cjs/components/FxInput/FxInput.d.ts +4 -2
  85. package/cjs/components/FxInput/FxInput.js +6 -1
  86. package/cjs/components/FxInput/FxInput.js.map +1 -1
  87. package/cjs/components/FxInput/FxInputRestoreBtn.d.ts +3 -2
  88. package/cjs/components/FxInput/FxInputRestoreBtn.js +7 -2
  89. package/cjs/components/FxInput/FxInputRestoreBtn.js.map +1 -1
  90. package/cjs/components/GlobalLoader/GlobalLoader.js +6 -2
  91. package/cjs/components/GlobalLoader/GlobalLoader.js.map +1 -1
  92. package/cjs/components/GlobalLoader/GlobalLoaderView.d.ts +2 -1
  93. package/cjs/components/GlobalLoader/GlobalLoaderView.js +6 -4
  94. package/cjs/components/GlobalLoader/GlobalLoaderView.js.map +1 -1
  95. package/cjs/components/Hint/Hint.js +2 -1
  96. package/cjs/components/Hint/Hint.js.map +1 -1
  97. package/cjs/components/Input/Input.d.ts +7 -7
  98. package/cjs/components/Input/Input.js +12 -7
  99. package/cjs/components/Input/Input.js.map +1 -1
  100. package/cjs/components/Input/Input.styles.js +3 -2
  101. package/cjs/components/Input/Input.styles.js.map +1 -1
  102. package/cjs/components/Input/InputLayout/InputLayout.d.ts +3 -2
  103. package/cjs/components/Input/InputLayout/InputLayout.js +4 -3
  104. package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
  105. package/cjs/components/Input/InputLayout/InputLayoutAside.js +1 -1
  106. package/cjs/components/Input/InputLayout/InputLayoutAside.js.map +1 -1
  107. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js +5 -4
  108. package/cjs/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
  109. package/cjs/components/Input/InputLayout/InputLayoutContext.d.ts +2 -2
  110. package/cjs/components/Input/InputLayout/InputLayoutContext.js.map +1 -1
  111. package/cjs/components/Kebab/Kebab.d.ts +3 -2
  112. package/cjs/components/Kebab/Kebab.js +8 -1
  113. package/cjs/components/Kebab/Kebab.js.map +1 -1
  114. package/cjs/components/Kebab/Kebab.md +28 -0
  115. package/cjs/components/Link/Link.d.ts +2 -2
  116. package/cjs/components/Link/Link.js +20 -4
  117. package/cjs/components/Link/Link.js.map +1 -1
  118. package/cjs/components/Link/Link.mixins.d.ts +1 -2
  119. package/cjs/components/Link/Link.mixins.js +5 -16
  120. package/cjs/components/Link/Link.mixins.js.map +1 -1
  121. package/cjs/components/Link/Link.styles.d.ts +4 -0
  122. package/cjs/components/Link/Link.styles.js +96 -37
  123. package/cjs/components/Link/Link.styles.js.map +1 -1
  124. package/cjs/components/MenuFooter/MenuFooter.d.ts +30 -0
  125. package/cjs/components/MenuFooter/MenuFooter.js +83 -0
  126. package/cjs/components/MenuFooter/MenuFooter.js.map +1 -0
  127. package/cjs/components/MenuFooter/MenuFooter.md +27 -0
  128. package/cjs/components/MenuFooter/MenuFooter.mixins.d.ts +2 -0
  129. package/cjs/components/MenuFooter/MenuFooter.mixins.js +26 -0
  130. package/cjs/components/MenuFooter/MenuFooter.mixins.js.map +1 -0
  131. package/cjs/components/MenuFooter/MenuFooter.styles.d.ts +10 -0
  132. package/cjs/components/MenuFooter/MenuFooter.styles.js +65 -0
  133. package/cjs/components/MenuFooter/MenuFooter.styles.js.map +1 -0
  134. package/cjs/components/MenuFooter/index.d.ts +1 -0
  135. package/cjs/components/MenuFooter/index.js +1 -0
  136. package/cjs/components/MenuFooter/index.js.map +1 -0
  137. package/cjs/components/MenuHeader/MenuHeader.d.ts +8 -1
  138. package/cjs/components/MenuHeader/MenuHeader.js +35 -4
  139. package/cjs/components/MenuHeader/MenuHeader.js.map +1 -1
  140. package/cjs/components/MenuHeader/MenuHeader.md +12 -0
  141. package/cjs/components/MenuHeader/MenuHeader.mixins.d.ts +2 -0
  142. package/cjs/components/MenuHeader/MenuHeader.mixins.js +26 -0
  143. package/cjs/components/MenuHeader/MenuHeader.mixins.js.map +1 -0
  144. package/cjs/components/MenuHeader/MenuHeader.styles.d.ts +6 -1
  145. package/cjs/components/MenuHeader/MenuHeader.styles.js +54 -12
  146. package/cjs/components/MenuHeader/MenuHeader.styles.js.map +1 -1
  147. package/cjs/components/MenuItem/MenuItem.d.ts +14 -5
  148. package/cjs/components/MenuItem/MenuItem.js +61 -9
  149. package/cjs/components/MenuItem/MenuItem.js.map +1 -1
  150. package/cjs/components/MenuItem/MenuItem.md +12 -0
  151. package/cjs/components/MenuItem/MenuItem.mixins.d.ts +3 -0
  152. package/cjs/components/MenuItem/MenuItem.mixins.js +42 -0
  153. package/cjs/components/MenuItem/MenuItem.mixins.js.map +1 -0
  154. package/cjs/components/MenuItem/MenuItem.styles.d.ts +9 -1
  155. package/cjs/components/MenuItem/MenuItem.styles.js +80 -27
  156. package/cjs/components/MenuItem/MenuItem.styles.js.map +1 -1
  157. package/cjs/components/Modal/Modal.md +16 -0
  158. package/cjs/components/Modal/ModalClose.js +5 -1
  159. package/cjs/components/Modal/ModalClose.js.map +1 -1
  160. package/cjs/components/Modal/locale/index.d.ts +4 -0
  161. package/cjs/components/Modal/locale/index.js +11 -0
  162. package/cjs/components/Modal/locale/index.js.map +1 -0
  163. package/cjs/components/Modal/locale/locales/en.d.ts +2 -0
  164. package/cjs/components/Modal/locale/locales/en.js +4 -0
  165. package/cjs/components/Modal/locale/locales/en.js.map +1 -0
  166. package/cjs/components/Modal/locale/locales/ru.d.ts +2 -0
  167. package/cjs/components/Modal/locale/locales/ru.js +4 -0
  168. package/cjs/components/Modal/locale/locales/ru.js.map +1 -0
  169. package/cjs/components/Modal/locale/types.d.ts +3 -0
  170. package/cjs/components/Modal/locale/types.js +1 -0
  171. package/cjs/components/Modal/locale/types.js.map +1 -0
  172. package/cjs/components/Paging/Paging.js +1 -1
  173. package/cjs/components/Paging/Paging.js.map +1 -1
  174. package/cjs/components/Paging/Paging.styles.js +2 -1
  175. package/cjs/components/Paging/Paging.styles.js.map +1 -1
  176. package/cjs/components/PasswordInput/PasswordInput.d.ts +3 -2
  177. package/cjs/components/PasswordInput/PasswordInput.js +13 -4
  178. package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
  179. package/cjs/components/PasswordInput/PasswordInput.md +19 -0
  180. package/cjs/components/PasswordInput/PasswordInput.styles.d.ts +1 -0
  181. package/cjs/components/PasswordInput/PasswordInput.styles.js +11 -1
  182. package/cjs/components/PasswordInput/PasswordInput.styles.js.map +1 -1
  183. package/cjs/components/PasswordInput/locale/index.d.ts +4 -0
  184. package/cjs/components/PasswordInput/locale/index.js +11 -0
  185. package/cjs/components/PasswordInput/locale/index.js.map +1 -0
  186. package/cjs/components/PasswordInput/locale/locales/en.d.ts +2 -0
  187. package/cjs/components/PasswordInput/locale/locales/en.js +5 -0
  188. package/cjs/components/PasswordInput/locale/locales/en.js.map +1 -0
  189. package/cjs/components/PasswordInput/locale/locales/ru.d.ts +2 -0
  190. package/cjs/components/PasswordInput/locale/locales/ru.js +5 -0
  191. package/cjs/components/PasswordInput/locale/locales/ru.js.map +1 -0
  192. package/cjs/components/PasswordInput/locale/types.d.ts +4 -0
  193. package/cjs/components/PasswordInput/locale/types.js +1 -0
  194. package/cjs/components/PasswordInput/locale/types.js.map +1 -0
  195. package/cjs/components/Radio/Radio.d.ts +15 -3
  196. package/cjs/components/Radio/Radio.js +58 -6
  197. package/cjs/components/Radio/Radio.js.map +1 -1
  198. package/cjs/components/Radio/Radio.md +18 -0
  199. package/cjs/components/Radio/Radio.mixins.d.ts +5 -0
  200. package/cjs/components/Radio/Radio.mixins.js +71 -0
  201. package/cjs/components/Radio/Radio.mixins.js.map +1 -0
  202. package/cjs/components/Radio/Radio.styles.d.ts +9 -0
  203. package/cjs/components/Radio/Radio.styles.js +93 -57
  204. package/cjs/components/Radio/Radio.styles.js.map +1 -1
  205. package/cjs/components/ScrollContainer/ScrollContainer.d.ts +3 -2
  206. package/cjs/components/ScrollContainer/ScrollContainer.js +2 -1
  207. package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
  208. package/cjs/components/Select/Select.d.ts +12 -10
  209. package/cjs/components/Select/Select.js +30 -9
  210. package/cjs/components/Select/Select.js.map +1 -1
  211. package/cjs/components/Select/Select.md +17 -0
  212. package/cjs/components/Select/Select.styles.js +3 -2
  213. package/cjs/components/Select/Select.styles.js.map +1 -1
  214. package/cjs/components/Select/selectTheme.js +4 -1
  215. package/cjs/components/Select/selectTheme.js.map +1 -1
  216. package/cjs/components/SidePage/SidePage.js +5 -1
  217. package/cjs/components/SidePage/SidePage.js.map +1 -1
  218. package/cjs/components/SidePage/SidePage.md +16 -0
  219. package/cjs/components/SidePage/SidePageCloseButton.d.ts +1 -0
  220. package/cjs/components/SidePage/SidePageCloseButton.js +47 -0
  221. package/cjs/components/SidePage/SidePageCloseButton.js.map +1 -0
  222. package/cjs/components/SidePage/SidePageHeader.d.ts +0 -4
  223. package/cjs/components/SidePage/SidePageHeader.js +7 -41
  224. package/cjs/components/SidePage/SidePageHeader.js.map +1 -1
  225. package/cjs/components/SidePage/locale/index.d.ts +4 -0
  226. package/cjs/components/SidePage/locale/index.js +11 -0
  227. package/cjs/components/SidePage/locale/index.js.map +1 -0
  228. package/cjs/components/SidePage/locale/locales/en.d.ts +2 -0
  229. package/cjs/components/SidePage/locale/locales/en.js +4 -0
  230. package/cjs/components/SidePage/locale/locales/en.js.map +1 -0
  231. package/cjs/components/SidePage/locale/locales/ru.d.ts +2 -0
  232. package/cjs/components/SidePage/locale/locales/ru.js +4 -0
  233. package/cjs/components/SidePage/locale/locales/ru.js.map +1 -0
  234. package/cjs/components/SidePage/locale/types.d.ts +3 -0
  235. package/cjs/components/SidePage/locale/types.js +1 -0
  236. package/cjs/components/SidePage/locale/types.js.map +1 -0
  237. package/cjs/components/Sticky/Sticky.js +10 -3
  238. package/cjs/components/Sticky/Sticky.js.map +1 -1
  239. package/cjs/components/Switcher/Switcher.d.ts +12 -7
  240. package/cjs/components/Switcher/Switcher.js +16 -5
  241. package/cjs/components/Switcher/Switcher.js.map +1 -1
  242. package/cjs/components/Tabs/Tab.d.ts +17 -36
  243. package/cjs/components/Tabs/Tab.js +24 -21
  244. package/cjs/components/Tabs/Tab.js.map +1 -1
  245. package/cjs/components/Tabs/Tab.md +71 -0
  246. package/cjs/components/Tabs/Tab.styles.d.ts +9 -3
  247. package/cjs/components/Tabs/Tab.styles.js +106 -68
  248. package/cjs/components/Tabs/Tab.styles.js.map +1 -1
  249. package/cjs/components/Tabs/Tabs.d.ts +16 -15
  250. package/cjs/components/Tabs/Tabs.js +12 -4
  251. package/cjs/components/Tabs/Tabs.js.map +1 -1
  252. package/cjs/components/Tabs/Tabs.md +39 -22
  253. package/cjs/components/Tabs/Tabs.styles.d.ts +3 -1
  254. package/cjs/components/Tabs/Tabs.styles.js +23 -7
  255. package/cjs/components/Tabs/Tabs.styles.js.map +1 -1
  256. package/cjs/components/Tabs/TabsContext.d.ts +2 -0
  257. package/cjs/components/Tabs/TabsContext.js +3 -0
  258. package/cjs/components/Tabs/TabsContext.js.map +1 -1
  259. package/cjs/components/Tabs/helpers.d.ts +6 -0
  260. package/cjs/components/Tabs/helpers.js +31 -0
  261. package/cjs/components/Tabs/helpers.js.map +1 -0
  262. package/cjs/components/Textarea/Textarea.d.ts +12 -3
  263. package/cjs/components/Textarea/Textarea.js +48 -7
  264. package/cjs/components/Textarea/Textarea.js.map +1 -1
  265. package/cjs/components/Textarea/Textarea.md +12 -0
  266. package/cjs/components/Textarea/Textarea.mixins.d.ts +3 -0
  267. package/cjs/components/Textarea/Textarea.mixins.js +22 -0
  268. package/cjs/components/Textarea/Textarea.mixins.js.map +1 -0
  269. package/cjs/components/Textarea/Textarea.styles.d.ts +10 -1
  270. package/cjs/components/Textarea/Textarea.styles.js +64 -23
  271. package/cjs/components/Textarea/Textarea.styles.js.map +1 -1
  272. package/cjs/components/Textarea/TextareaCounter.d.ts +2 -0
  273. package/cjs/components/Textarea/TextareaCounter.js +17 -3
  274. package/cjs/components/Textarea/TextareaCounter.js.map +1 -1
  275. package/cjs/components/Toast/Toast.d.ts +3 -2
  276. package/cjs/components/Toast/Toast.js +3 -1
  277. package/cjs/components/Toast/Toast.js.map +1 -1
  278. package/cjs/components/Toast/ToastView.d.ts +6 -6
  279. package/cjs/components/Toast/ToastView.js +19 -6
  280. package/cjs/components/Toast/ToastView.js.map +1 -1
  281. package/cjs/components/Toast/ToastView.styles.js +5 -2
  282. package/cjs/components/Toast/ToastView.styles.js.map +1 -1
  283. package/cjs/components/Toast/locale/index.d.ts +4 -0
  284. package/cjs/components/Toast/locale/index.js +11 -0
  285. package/cjs/components/Toast/locale/index.js.map +1 -0
  286. package/cjs/components/Toast/locale/locales/en.d.ts +2 -0
  287. package/cjs/components/Toast/locale/locales/en.js +4 -0
  288. package/cjs/components/Toast/locale/locales/en.js.map +1 -0
  289. package/cjs/components/Toast/locale/locales/ru.d.ts +2 -0
  290. package/cjs/components/Toast/locale/locales/ru.js +4 -0
  291. package/cjs/components/Toast/locale/locales/ru.js.map +1 -0
  292. package/cjs/components/Toast/locale/types.d.ts +3 -0
  293. package/cjs/components/Toast/locale/types.js +1 -0
  294. package/cjs/components/Toast/locale/types.js.map +1 -0
  295. package/cjs/components/Toggle/Toggle.d.ts +16 -6
  296. package/cjs/components/Toggle/Toggle.js +112 -3
  297. package/cjs/components/Toggle/Toggle.js.map +1 -1
  298. package/cjs/components/Toggle/Toggle.md +18 -2
  299. package/cjs/components/Toggle/Toggle.mixins.d.ts +7 -0
  300. package/cjs/components/Toggle/Toggle.mixins.js +90 -0
  301. package/cjs/components/Toggle/Toggle.mixins.js.map +1 -0
  302. package/cjs/components/Toggle/Toggle.styles.d.ts +21 -1
  303. package/cjs/components/Toggle/Toggle.styles.js +172 -56
  304. package/cjs/components/Toggle/Toggle.styles.js.map +1 -1
  305. package/cjs/components/Token/Token.d.ts +2 -5
  306. package/cjs/components/Token/Token.js +15 -8
  307. package/cjs/components/Token/Token.js.map +1 -1
  308. package/cjs/components/Token/locale/index.d.ts +4 -0
  309. package/cjs/components/Token/locale/index.js +11 -0
  310. package/cjs/components/Token/locale/index.js.map +1 -0
  311. package/cjs/components/Token/locale/locales/en.d.ts +2 -0
  312. package/cjs/components/Token/locale/locales/en.js +4 -0
  313. package/cjs/components/Token/locale/locales/en.js.map +1 -0
  314. package/cjs/components/Token/locale/locales/ru.d.ts +2 -0
  315. package/cjs/components/Token/locale/locales/ru.js +4 -0
  316. package/cjs/components/Token/locale/locales/ru.js.map +1 -0
  317. package/cjs/components/Token/locale/types.d.ts +3 -0
  318. package/cjs/components/Token/locale/types.js +1 -0
  319. package/cjs/components/Token/locale/types.js.map +1 -0
  320. package/cjs/components/TokenInput/TokenInput.d.ts +3 -5
  321. package/cjs/components/TokenInput/TokenInput.js +11 -8
  322. package/cjs/components/TokenInput/TokenInput.js.map +1 -1
  323. package/cjs/components/TokenInput/TokenInput.md +26 -35
  324. package/cjs/components/TokenInput/TokenInput.styles.js +2 -1
  325. package/cjs/components/TokenInput/TokenInput.styles.js.map +1 -1
  326. package/cjs/components/TokenInput/TokenInputMenu.d.ts +7 -0
  327. package/cjs/components/TokenInput/TokenInputMenu.js +9 -1
  328. package/cjs/components/TokenInput/TokenInputMenu.js.map +1 -1
  329. package/cjs/components/TooltipMenu/TooltipMenu.d.ts +2 -2
  330. package/cjs/components/TooltipMenu/TooltipMenu.js +10 -2
  331. package/cjs/components/TooltipMenu/TooltipMenu.js.map +1 -1
  332. package/cjs/components/TooltipMenu/TooltipMenu.md +28 -0
  333. package/cjs/index.d.ts +1 -0
  334. package/cjs/index.js +1 -0
  335. package/cjs/index.js.map +1 -1
  336. package/cjs/internal/CloseButtonIcon/CloseButtonIcon.d.ts +2 -2
  337. package/cjs/internal/CloseButtonIcon/CloseButtonIcon.js +3 -0
  338. package/cjs/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
  339. package/cjs/internal/CloseButtonIcon/CloseButtonIcon.styles.js +2 -1
  340. package/cjs/internal/CloseButtonIcon/CloseButtonIcon.styles.js.map +1 -1
  341. package/cjs/internal/CustomComboBox/ComboBoxMenu.d.ts +9 -3
  342. package/cjs/internal/CustomComboBox/ComboBoxMenu.js +37 -2
  343. package/cjs/internal/CustomComboBox/ComboBoxMenu.js.map +1 -1
  344. package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +14 -13
  345. package/cjs/internal/CustomComboBox/ComboBoxView.js +32 -34
  346. package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  347. package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +10 -7
  348. package/cjs/internal/CustomComboBox/CustomComboBox.js +21 -12
  349. package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
  350. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.d.ts +2 -1
  351. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.js +4 -0
  352. package/cjs/internal/CustomComboBox/CustomComboBoxReducer.js.map +1 -1
  353. package/cjs/internal/DateSelect/DateSelect.d.ts +2 -0
  354. package/cjs/internal/DateSelect/DateSelect.js +31 -2
  355. package/cjs/internal/DateSelect/DateSelect.js.map +1 -1
  356. package/cjs/internal/DateSelect/DateSelect.styles.d.ts +3 -0
  357. package/cjs/internal/DateSelect/DateSelect.styles.js +26 -4
  358. package/cjs/internal/DateSelect/DateSelect.styles.js.map +1 -1
  359. package/cjs/internal/DateSelect/locale/index.d.ts +4 -0
  360. package/cjs/internal/DateSelect/locale/index.js +11 -0
  361. package/cjs/internal/DateSelect/locale/index.js.map +1 -0
  362. package/cjs/internal/DateSelect/locale/locales/en.d.ts +2 -0
  363. package/cjs/internal/DateSelect/locale/locales/en.js +6 -0
  364. package/cjs/internal/DateSelect/locale/locales/en.js.map +1 -0
  365. package/cjs/internal/DateSelect/locale/locales/ru.d.ts +2 -0
  366. package/cjs/internal/DateSelect/locale/locales/ru.js +6 -0
  367. package/cjs/internal/DateSelect/locale/locales/ru.js.map +1 -0
  368. package/cjs/internal/DateSelect/locale/types.d.ts +5 -0
  369. package/cjs/internal/DateSelect/locale/types.js +1 -0
  370. package/cjs/internal/DateSelect/locale/types.js.map +1 -0
  371. package/cjs/internal/DropdownContainer/DropdownContainer.d.ts +3 -2
  372. package/cjs/internal/DropdownContainer/DropdownContainer.js +6 -1
  373. package/cjs/internal/DropdownContainer/DropdownContainer.js.map +1 -1
  374. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.d.ts +3 -6
  375. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.js +9 -7
  376. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.js.map +1 -1
  377. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.d.ts +2 -2
  378. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.js +1 -1
  379. package/cjs/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.js.map +1 -1
  380. package/cjs/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.d.ts +2 -2
  381. package/cjs/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.js +1 -1
  382. package/cjs/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
  383. package/cjs/internal/FileUploaderControl/hooks/useFileUploaderSize.d.ts +2 -2
  384. package/cjs/internal/FileUploaderControl/hooks/useFileUploaderSize.js.map +1 -1
  385. package/cjs/internal/InputLikeText/InputLikeText.d.ts +1 -0
  386. package/cjs/internal/InputLikeText/InputLikeText.js +16 -4
  387. package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
  388. package/cjs/internal/InternalMenu/InternalMenu.d.ts +13 -4
  389. package/cjs/internal/InternalMenu/InternalMenu.js +15 -5
  390. package/cjs/internal/InternalMenu/InternalMenu.js.map +1 -1
  391. package/cjs/internal/InternalMenu/InternalMenu.styles.d.ts +1 -0
  392. package/cjs/internal/InternalMenu/InternalMenu.styles.js +13 -7
  393. package/cjs/internal/InternalMenu/InternalMenu.styles.js.map +1 -1
  394. package/cjs/internal/InternalMenu/isIconPaddingEnabled.d.ts +2 -0
  395. package/cjs/internal/InternalMenu/isIconPaddingEnabled.js +9 -0
  396. package/cjs/internal/InternalMenu/isIconPaddingEnabled.js.map +1 -0
  397. package/cjs/internal/Menu/Menu.d.ts +42 -8
  398. package/cjs/internal/Menu/Menu.js +272 -78
  399. package/cjs/internal/Menu/Menu.js.map +1 -1
  400. package/cjs/internal/Menu/Menu.styles.d.ts +6 -1
  401. package/cjs/internal/Menu/Menu.styles.js +42 -8
  402. package/cjs/internal/Menu/Menu.styles.js.map +1 -1
  403. package/cjs/internal/MenuMessage/MenuMessage.d.ts +2 -0
  404. package/cjs/internal/MenuMessage/MenuMessage.js +18 -3
  405. package/cjs/internal/MenuMessage/MenuMessage.js.map +1 -1
  406. package/cjs/internal/MenuMessage/MenuMessage.styles.d.ts +3 -0
  407. package/cjs/internal/MenuMessage/MenuMessage.styles.js +21 -6
  408. package/cjs/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
  409. package/cjs/internal/MobilePopup/MobilePopup.d.ts +2 -2
  410. package/cjs/internal/MobilePopup/MobilePopup.js +1 -1
  411. package/cjs/internal/MobilePopup/MobilePopup.js.map +1 -1
  412. package/cjs/internal/Popup/Popup.d.ts +7 -2
  413. package/cjs/internal/Popup/Popup.js +13 -3
  414. package/cjs/internal/Popup/Popup.js.map +1 -1
  415. package/cjs/internal/PopupMenu/PopupMenu.d.ts +5 -2
  416. package/cjs/internal/PopupMenu/PopupMenu.js +33 -4
  417. package/cjs/internal/PopupMenu/PopupMenu.js.map +1 -1
  418. package/cjs/internal/ThemePlayground/SizesGroup.d.ts +2 -1
  419. package/cjs/internal/ThemePlayground/SizesGroup.js +1 -0
  420. package/cjs/internal/ThemePlayground/SizesGroup.js.map +1 -1
  421. package/cjs/internal/ThemePlayground/darkTheme.d.ts +1 -1
  422. package/cjs/internal/ThemePlayground/darkTheme.js +1 -1
  423. package/cjs/internal/ThemePlayground/darkTheme.js.map +1 -1
  424. package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  425. package/cjs/internal/themes/DarkTheme.d.ts +2 -0
  426. package/cjs/internal/themes/DarkTheme.js +11 -3
  427. package/cjs/internal/themes/DarkTheme.js.map +1 -1
  428. package/cjs/internal/themes/DefaultTheme.d.ts +280 -19
  429. package/cjs/internal/themes/DefaultTheme.js +604 -94
  430. package/cjs/internal/themes/DefaultTheme.js.map +1 -1
  431. package/cjs/internal/themes/Theme2022.d.ts +28 -4
  432. package/cjs/internal/themes/Theme2022.js +53 -19
  433. package/cjs/internal/themes/Theme2022.js.map +1 -1
  434. package/cjs/internal/themes/Theme2022Dark.d.ts +5 -7
  435. package/cjs/internal/themes/Theme2022Dark.js +8 -18
  436. package/cjs/internal/themes/Theme2022Dark.js.map +1 -1
  437. package/cjs/lib/locale/types.d.ts +6 -0
  438. package/cjs/lib/locale/types.js +6 -0
  439. package/cjs/lib/locale/types.js.map +1 -1
  440. package/cjs/lib/rootNode/rootNodeDecorator.d.ts +5 -1
  441. package/cjs/lib/rootNode/rootNodeDecorator.js +7 -3
  442. package/cjs/lib/rootNode/rootNodeDecorator.js.map +1 -1
  443. package/cjs/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +1 -1
  444. package/cjs/lib/styles/getLabGrotesqueBaselineCompensation.js +7 -2
  445. package/cjs/lib/styles/getLabGrotesqueBaselineCompensation.js.map +1 -1
  446. package/cjs/lib/types/props.d.ts +1 -0
  447. package/cjs/lib/types/props.js +1 -0
  448. package/cjs/lib/types/props.js.map +1 -0
  449. package/components/Autocomplete/Autocomplete/Autocomplete.js +18 -5
  450. package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
  451. package/components/Autocomplete/Autocomplete.d.ts +9 -3
  452. package/components/Autocomplete/Autocomplete.md +17 -0
  453. package/components/Button/Button/Button.js +17 -2
  454. package/components/Button/Button/Button.js.map +1 -1
  455. package/components/Button/Button.d.ts +9 -3
  456. package/components/Button/Button.mixins/Button.mixins.js +1 -1
  457. package/components/Button/Button.mixins/Button.mixins.js.map +1 -1
  458. package/components/Button/Button.styles/Button.styles.js +61 -58
  459. package/components/Button/Button.styles/Button.styles.js.map +1 -1
  460. package/components/Button/Button.styles.d.ts +1 -0
  461. package/components/Button/ButtonIcon/ButtonIcon.js.map +1 -1
  462. package/components/Button/ButtonIcon.d.ts +3 -2
  463. package/components/Button/getInnerLinkTheme/getInnerLinkTheme.js +9 -4
  464. package/components/Button/getInnerLinkTheme/getInnerLinkTheme.js.map +1 -1
  465. package/components/Calendar/Calendar/Calendar.js +1 -0
  466. package/components/Calendar/Calendar/Calendar.js.map +1 -1
  467. package/components/Calendar/Calendar.d.ts +1 -0
  468. package/components/Calendar/Calendar.md +14 -3
  469. package/components/Calendar/Calendar.styles/Calendar.styles.js +1 -1
  470. package/components/Calendar/Calendar.styles/Calendar.styles.js.map +1 -1
  471. package/components/Calendar/DayCellView/DayCellView.js +7 -1
  472. package/components/Calendar/DayCellView/DayCellView.js.map +1 -1
  473. package/components/Calendar/DayCellView.styles/DayCellView.styles.js +2 -2
  474. package/components/Calendar/DayCellView.styles/DayCellView.styles.js.map +1 -1
  475. package/components/Calendar/DayCellView.styles.d.ts +1 -1
  476. package/components/Calendar/locale/locales/en/en.js +2 -1
  477. package/components/Calendar/locale/locales/en/en.js.map +1 -1
  478. package/components/Calendar/locale/locales/ru/ru.js +2 -1
  479. package/components/Calendar/locale/locales/ru/ru.js.map +1 -1
  480. package/components/Calendar/locale/types.d.ts +4 -0
  481. package/components/Checkbox/Checkbox/Checkbox.js +62 -8
  482. package/components/Checkbox/Checkbox/Checkbox.js.map +1 -1
  483. package/components/Checkbox/Checkbox.d.ts +15 -5
  484. package/components/Checkbox/Checkbox.md +18 -0
  485. package/components/Checkbox/Checkbox.mixins/Checkbox.mixins.js +16 -0
  486. package/components/Checkbox/Checkbox.mixins/Checkbox.mixins.js.map +1 -0
  487. package/components/Checkbox/Checkbox.mixins/package.json +6 -0
  488. package/components/Checkbox/Checkbox.mixins.d.ts +2 -0
  489. package/components/Checkbox/Checkbox.styles/Checkbox.styles.js +39 -25
  490. package/components/Checkbox/Checkbox.styles/Checkbox.styles.js.map +1 -1
  491. package/components/Checkbox/Checkbox.styles.d.ts +6 -0
  492. package/components/ComboBox/ComboBox/ComboBox.js +1 -0
  493. package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
  494. package/components/ComboBox/ComboBox.d.ts +6 -8
  495. package/components/ComboBox/ComboBox.md +51 -5
  496. package/components/CurrencyInput/CurrencyHelper/CurrencyHelper.js +32 -4
  497. package/components/CurrencyInput/CurrencyHelper/CurrencyHelper.js.map +1 -1
  498. package/components/CurrencyInput/CurrencyHelper.d.ts +2 -0
  499. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +1 -0
  500. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js.map +1 -1
  501. package/components/CurrencyInput/CurrencyInput.d.ts +2 -2
  502. package/components/DateInput/DateInput/DateInput.js +26 -9
  503. package/components/DateInput/DateInput/DateInput.js.map +1 -1
  504. package/components/DateInput/DateInput.d.ts +5 -1
  505. package/components/DatePicker/DatePicker/DatePicker.js +7 -1
  506. package/components/DatePicker/DatePicker/DatePicker.js.map +1 -1
  507. package/components/DatePicker/DatePicker.d.ts +2 -1
  508. package/components/DatePicker/DatePicker.md +15 -0
  509. package/components/DatePicker/locale/locales/en/en.js +4 -2
  510. package/components/DatePicker/locale/locales/en/en.js.map +1 -1
  511. package/components/DatePicker/locale/locales/ru/ru.js +4 -2
  512. package/components/DatePicker/locale/locales/ru/ru.js.map +1 -1
  513. package/components/DatePicker/locale/types.d.ts +3 -1
  514. package/components/Dropdown/Dropdown/Dropdown.js +3 -1
  515. package/components/Dropdown/Dropdown/Dropdown.js.map +1 -1
  516. package/components/Dropdown/Dropdown.d.ts +4 -7
  517. package/components/Dropdown/Dropdown.md +33 -0
  518. package/components/Dropdown/getDropdownTheme/getDropdownTheme.js +27 -1
  519. package/components/Dropdown/getDropdownTheme/getDropdownTheme.js.map +1 -1
  520. package/components/DropdownMenu/DropdownMenu/DropdownMenu.js +2 -0
  521. package/components/DropdownMenu/DropdownMenu/DropdownMenu.js.map +1 -1
  522. package/components/DropdownMenu/DropdownMenu.d.ts +2 -2
  523. package/components/DropdownMenu/DropdownMenu.md +28 -0
  524. package/components/DropdownMenu/getDropdownMenuTheme/getDropdownMenuTheme.js +5 -1
  525. package/components/DropdownMenu/getDropdownMenuTheme/getDropdownMenuTheme.js.map +1 -1
  526. package/components/FileUploader/FileUploader/FileUploader.js +4 -0
  527. package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
  528. package/components/FileUploader/FileUploader.d.ts +6 -2
  529. package/components/FileUploader/FileUploader.styles/FileUploader.styles.js +1 -1
  530. package/components/FileUploader/FileUploader.styles/FileUploader.styles.js.map +1 -1
  531. package/components/FxInput/FxInput/FxInput.js +2 -1
  532. package/components/FxInput/FxInput/FxInput.js.map +1 -1
  533. package/components/FxInput/FxInput.d.ts +4 -2
  534. package/components/FxInput/FxInputRestoreBtn/FxInputRestoreBtn.js +4 -2
  535. package/components/FxInput/FxInputRestoreBtn/FxInputRestoreBtn.js.map +1 -1
  536. package/components/FxInput/FxInputRestoreBtn.d.ts +3 -2
  537. package/components/GlobalLoader/GlobalLoader/GlobalLoader.js +5 -1
  538. package/components/GlobalLoader/GlobalLoader/GlobalLoader.js.map +1 -1
  539. package/components/GlobalLoader/GlobalLoaderView/GlobalLoaderView.js +6 -2
  540. package/components/GlobalLoader/GlobalLoaderView/GlobalLoaderView.js.map +1 -1
  541. package/components/GlobalLoader/GlobalLoaderView.d.ts +2 -1
  542. package/components/Hint/Hint/Hint.js +2 -1
  543. package/components/Hint/Hint/Hint.js.map +1 -1
  544. package/components/Input/Input/Input.js +10 -2
  545. package/components/Input/Input/Input.js.map +1 -1
  546. package/components/Input/Input.d.ts +7 -7
  547. package/components/Input/Input.styles/Input.styles.js +2 -2
  548. package/components/Input/Input.styles/Input.styles.js.map +1 -1
  549. package/components/Input/InputLayout/InputLayout/InputLayout.js +4 -2
  550. package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
  551. package/components/Input/InputLayout/InputLayout.d.ts +3 -2
  552. package/components/Input/InputLayout/InputLayoutAside/InputLayoutAside.js +1 -2
  553. package/components/Input/InputLayout/InputLayoutAside/InputLayoutAside.js.map +1 -1
  554. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js +7 -5
  555. package/components/Input/InputLayout/InputLayoutAsideIcon/InputLayoutAsideIcon.js.map +1 -1
  556. package/components/Input/InputLayout/InputLayoutContext/InputLayoutContext.js.map +1 -1
  557. package/components/Input/InputLayout/InputLayoutContext.d.ts +2 -2
  558. package/components/Kebab/Kebab/Kebab.js +7 -3
  559. package/components/Kebab/Kebab/Kebab.js.map +1 -1
  560. package/components/Kebab/Kebab.d.ts +3 -2
  561. package/components/Kebab/Kebab.md +28 -0
  562. package/components/Link/Link/Link.js +12 -6
  563. package/components/Link/Link/Link.js.map +1 -1
  564. package/components/Link/Link.d.ts +2 -2
  565. package/components/Link/Link.mixins/Link.mixins.js +2 -5
  566. package/components/Link/Link.mixins/Link.mixins.js.map +1 -1
  567. package/components/Link/Link.mixins.d.ts +1 -2
  568. package/components/Link/Link.styles/Link.styles.js +45 -21
  569. package/components/Link/Link.styles/Link.styles.js.map +1 -1
  570. package/components/Link/Link.styles.d.ts +4 -0
  571. package/components/MenuFooter/MenuFooter/MenuFooter.js +74 -0
  572. package/components/MenuFooter/MenuFooter/MenuFooter.js.map +1 -0
  573. package/components/MenuFooter/MenuFooter/package.json +6 -0
  574. package/components/MenuFooter/MenuFooter.d.ts +30 -0
  575. package/components/MenuFooter/MenuFooter.md +27 -0
  576. package/components/MenuFooter/MenuFooter.mixins/MenuFooter.mixins.js +13 -0
  577. package/components/MenuFooter/MenuFooter.mixins/MenuFooter.mixins.js.map +1 -0
  578. package/components/MenuFooter/MenuFooter.mixins/package.json +6 -0
  579. package/components/MenuFooter/MenuFooter.mixins.d.ts +2 -0
  580. package/components/MenuFooter/MenuFooter.styles/MenuFooter.styles.js +29 -0
  581. package/components/MenuFooter/MenuFooter.styles/MenuFooter.styles.js.map +1 -0
  582. package/components/MenuFooter/MenuFooter.styles/package.json +6 -0
  583. package/components/MenuFooter/MenuFooter.styles.d.ts +10 -0
  584. package/components/MenuFooter/index/index.js +1 -0
  585. package/components/MenuFooter/index/index.js.map +1 -0
  586. package/components/MenuFooter/index/package.json +6 -0
  587. package/components/MenuFooter/index.d.ts +1 -0
  588. package/components/MenuFooter/package.json +6 -0
  589. package/components/MenuHeader/MenuHeader/MenuHeader.js +37 -2
  590. package/components/MenuHeader/MenuHeader/MenuHeader.js.map +1 -1
  591. package/components/MenuHeader/MenuHeader.d.ts +8 -1
  592. package/components/MenuHeader/MenuHeader.md +12 -0
  593. package/components/MenuHeader/MenuHeader.mixins/MenuHeader.mixins.js +13 -0
  594. package/components/MenuHeader/MenuHeader.mixins/MenuHeader.mixins.js.map +1 -0
  595. package/components/MenuHeader/MenuHeader.mixins/package.json +6 -0
  596. package/components/MenuHeader/MenuHeader.mixins.d.ts +2 -0
  597. package/components/MenuHeader/MenuHeader.styles/MenuHeader.styles.js +20 -6
  598. package/components/MenuHeader/MenuHeader.styles/MenuHeader.styles.js.map +1 -1
  599. package/components/MenuHeader/MenuHeader.styles.d.ts +6 -1
  600. package/components/MenuItem/MenuItem/MenuItem.js +54 -8
  601. package/components/MenuItem/MenuItem/MenuItem.js.map +1 -1
  602. package/components/MenuItem/MenuItem.d.ts +14 -5
  603. package/components/MenuItem/MenuItem.md +12 -0
  604. package/components/MenuItem/MenuItem.mixins/MenuItem.mixins.js +24 -0
  605. package/components/MenuItem/MenuItem.mixins/MenuItem.mixins.js.map +1 -0
  606. package/components/MenuItem/MenuItem.mixins/package.json +6 -0
  607. package/components/MenuItem/MenuItem.mixins.d.ts +3 -0
  608. package/components/MenuItem/MenuItem.styles/MenuItem.styles.js +39 -23
  609. package/components/MenuItem/MenuItem.styles/MenuItem.styles.js.map +1 -1
  610. package/components/MenuItem/MenuItem.styles.d.ts +9 -1
  611. package/components/Modal/Modal.md +16 -0
  612. package/components/Modal/ModalClose/ModalClose.js +4 -0
  613. package/components/Modal/ModalClose/ModalClose.js.map +1 -1
  614. package/components/Modal/locale/index/index.js +8 -0
  615. package/components/Modal/locale/index/index.js.map +1 -0
  616. package/components/Modal/locale/index/package.json +6 -0
  617. package/components/Modal/locale/index.d.ts +4 -0
  618. package/components/Modal/locale/locales/en/en.js +3 -0
  619. package/components/Modal/locale/locales/en/en.js.map +1 -0
  620. package/components/Modal/locale/locales/en/package.json +6 -0
  621. package/components/Modal/locale/locales/en.d.ts +2 -0
  622. package/components/Modal/locale/locales/ru/package.json +6 -0
  623. package/components/Modal/locale/locales/ru/ru.js +3 -0
  624. package/components/Modal/locale/locales/ru/ru.js.map +1 -0
  625. package/components/Modal/locale/locales/ru.d.ts +2 -0
  626. package/components/Modal/locale/package.json +6 -0
  627. package/components/Modal/locale/types/package.json +6 -0
  628. package/components/Modal/locale/types/types.js +1 -0
  629. package/components/Modal/locale/types/types.js.map +1 -0
  630. package/components/Modal/locale/types.d.ts +3 -0
  631. package/components/Paging/Paging/Paging.js +1 -1
  632. package/components/Paging/Paging/Paging.js.map +1 -1
  633. package/components/Paging/Paging.styles/Paging.styles.js +1 -1
  634. package/components/Paging/Paging.styles/Paging.styles.js.map +1 -1
  635. package/components/PasswordInput/PasswordInput/PasswordInput.js +8 -4
  636. package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
  637. package/components/PasswordInput/PasswordInput.d.ts +3 -2
  638. package/components/PasswordInput/PasswordInput.md +19 -0
  639. package/components/PasswordInput/PasswordInput.styles/PasswordInput.styles.js +4 -1
  640. package/components/PasswordInput/PasswordInput.styles/PasswordInput.styles.js.map +1 -1
  641. package/components/PasswordInput/PasswordInput.styles.d.ts +1 -0
  642. package/components/PasswordInput/locale/index/index.js +8 -0
  643. package/components/PasswordInput/locale/index/index.js.map +1 -0
  644. package/components/PasswordInput/locale/index/package.json +6 -0
  645. package/components/PasswordInput/locale/index.d.ts +4 -0
  646. package/components/PasswordInput/locale/locales/en/en.js +4 -0
  647. package/components/PasswordInput/locale/locales/en/en.js.map +1 -0
  648. package/components/PasswordInput/locale/locales/en/package.json +6 -0
  649. package/components/PasswordInput/locale/locales/en.d.ts +2 -0
  650. package/components/PasswordInput/locale/locales/ru/package.json +6 -0
  651. package/components/PasswordInput/locale/locales/ru/ru.js +4 -0
  652. package/components/PasswordInput/locale/locales/ru/ru.js.map +1 -0
  653. package/components/PasswordInput/locale/locales/ru.d.ts +2 -0
  654. package/components/PasswordInput/locale/package.json +6 -0
  655. package/components/PasswordInput/locale/types/package.json +6 -0
  656. package/components/PasswordInput/locale/types/types.js +1 -0
  657. package/components/PasswordInput/locale/types/types.js.map +1 -0
  658. package/components/PasswordInput/locale/types.d.ts +4 -0
  659. package/components/Radio/Radio/Radio.js +54 -6
  660. package/components/Radio/Radio/Radio.js.map +1 -1
  661. package/components/Radio/Radio.d.ts +15 -3
  662. package/components/Radio/Radio.md +18 -0
  663. package/components/Radio/Radio.mixins/Radio.mixins.js +28 -0
  664. package/components/Radio/Radio.mixins/Radio.mixins.js.map +1 -0
  665. package/components/Radio/Radio.mixins/package.json +6 -0
  666. package/components/Radio/Radio.mixins.d.ts +5 -0
  667. package/components/Radio/Radio.styles/Radio.styles.js +44 -29
  668. package/components/Radio/Radio.styles/Radio.styles.js.map +1 -1
  669. package/components/Radio/Radio.styles.d.ts +9 -0
  670. package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
  671. package/components/ScrollContainer/ScrollContainer.d.ts +3 -2
  672. package/components/Select/Select/Select.js +34 -9
  673. package/components/Select/Select/Select.js.map +1 -1
  674. package/components/Select/Select.d.ts +12 -10
  675. package/components/Select/Select.md +17 -0
  676. package/components/Select/Select.styles/Select.styles.js +1 -1
  677. package/components/Select/Select.styles/Select.styles.js.map +1 -1
  678. package/components/Select/selectTheme/selectTheme.js +3 -1
  679. package/components/Select/selectTheme/selectTheme.js.map +1 -1
  680. package/components/SidePage/SidePage/SidePage.js +4 -4
  681. package/components/SidePage/SidePage/SidePage.js.map +1 -1
  682. package/components/SidePage/SidePage.md +16 -0
  683. package/components/SidePage/SidePageCloseButton/SidePageCloseButton.js +42 -0
  684. package/components/SidePage/SidePageCloseButton/SidePageCloseButton.js.map +1 -0
  685. package/components/SidePage/SidePageCloseButton/package.json +6 -0
  686. package/components/SidePage/SidePageCloseButton.d.ts +1 -0
  687. package/components/SidePage/SidePageHeader/SidePageHeader.js +4 -38
  688. package/components/SidePage/SidePageHeader/SidePageHeader.js.map +1 -1
  689. package/components/SidePage/SidePageHeader.d.ts +0 -4
  690. package/components/SidePage/locale/index/index.js +8 -0
  691. package/components/SidePage/locale/index/index.js.map +1 -0
  692. package/components/SidePage/locale/index/package.json +6 -0
  693. package/components/SidePage/locale/index.d.ts +4 -0
  694. package/components/SidePage/locale/locales/en/en.js +3 -0
  695. package/components/SidePage/locale/locales/en/en.js.map +1 -0
  696. package/components/SidePage/locale/locales/en/package.json +6 -0
  697. package/components/SidePage/locale/locales/en.d.ts +2 -0
  698. package/components/SidePage/locale/locales/ru/package.json +6 -0
  699. package/components/SidePage/locale/locales/ru/ru.js +3 -0
  700. package/components/SidePage/locale/locales/ru/ru.js.map +1 -0
  701. package/components/SidePage/locale/locales/ru.d.ts +2 -0
  702. package/components/SidePage/locale/package.json +6 -0
  703. package/components/SidePage/locale/types/package.json +6 -0
  704. package/components/SidePage/locale/types/types.js +1 -0
  705. package/components/SidePage/locale/types/types.js.map +1 -0
  706. package/components/SidePage/locale/types.d.ts +3 -0
  707. package/components/Sticky/Sticky/Sticky.js +12 -3
  708. package/components/Sticky/Sticky/Sticky.js.map +1 -1
  709. package/components/Switcher/Switcher/Switcher.js +9 -3
  710. package/components/Switcher/Switcher/Switcher.js.map +1 -1
  711. package/components/Switcher/Switcher.d.ts +12 -7
  712. package/components/Tabs/Tab/Tab.js +12 -18
  713. package/components/Tabs/Tab/Tab.js.map +1 -1
  714. package/components/Tabs/Tab.d.ts +17 -36
  715. package/components/Tabs/Tab.md +71 -0
  716. package/components/Tabs/Tab.styles/Tab.styles.js +52 -23
  717. package/components/Tabs/Tab.styles/Tab.styles.js.map +1 -1
  718. package/components/Tabs/Tab.styles.d.ts +9 -3
  719. package/components/Tabs/Tabs/Tabs.js +12 -6
  720. package/components/Tabs/Tabs/Tabs.js.map +1 -1
  721. package/components/Tabs/Tabs.d.ts +16 -15
  722. package/components/Tabs/Tabs.md +39 -22
  723. package/components/Tabs/Tabs.styles/Tabs.styles.js +15 -4
  724. package/components/Tabs/Tabs.styles/Tabs.styles.js.map +1 -1
  725. package/components/Tabs/Tabs.styles.d.ts +3 -1
  726. package/components/Tabs/TabsContext/TabsContext.js +1 -0
  727. package/components/Tabs/TabsContext/TabsContext.js.map +1 -1
  728. package/components/Tabs/TabsContext.d.ts +2 -0
  729. package/components/Tabs/helpers/helpers.js +28 -0
  730. package/components/Tabs/helpers/helpers.js.map +1 -0
  731. package/components/Tabs/helpers/package.json +6 -0
  732. package/components/Tabs/helpers.d.ts +6 -0
  733. package/components/Textarea/Textarea/Textarea.js +39 -4
  734. package/components/Textarea/Textarea/Textarea.js.map +1 -1
  735. package/components/Textarea/Textarea.d.ts +12 -3
  736. package/components/Textarea/Textarea.md +12 -0
  737. package/components/Textarea/Textarea.mixins/Textarea.mixins.js +14 -0
  738. package/components/Textarea/Textarea.mixins/Textarea.mixins.js.map +1 -0
  739. package/components/Textarea/Textarea.mixins/package.json +6 -0
  740. package/components/Textarea/Textarea.mixins.d.ts +3 -0
  741. package/components/Textarea/Textarea.styles/Textarea.styles.js +43 -15
  742. package/components/Textarea/Textarea.styles/Textarea.styles.js.map +1 -1
  743. package/components/Textarea/Textarea.styles.d.ts +10 -1
  744. package/components/Textarea/TextareaCounter/TextareaCounter.js +19 -3
  745. package/components/Textarea/TextareaCounter/TextareaCounter.js.map +1 -1
  746. package/components/Textarea/TextareaCounter.d.ts +2 -0
  747. package/components/Toast/Toast/Toast.js +1 -0
  748. package/components/Toast/Toast/Toast.js.map +1 -1
  749. package/components/Toast/Toast.d.ts +3 -2
  750. package/components/Toast/ToastView/ToastView.js +9 -4
  751. package/components/Toast/ToastView/ToastView.js.map +1 -1
  752. package/components/Toast/ToastView.d.ts +6 -6
  753. package/components/Toast/ToastView.styles/ToastView.styles.js +1 -1
  754. package/components/Toast/ToastView.styles/ToastView.styles.js.map +1 -1
  755. package/components/Toast/locale/index/index.js +8 -0
  756. package/components/Toast/locale/index/index.js.map +1 -0
  757. package/components/Toast/locale/index/package.json +6 -0
  758. package/components/Toast/locale/index.d.ts +4 -0
  759. package/components/Toast/locale/locales/en/en.js +3 -0
  760. package/components/Toast/locale/locales/en/en.js.map +1 -0
  761. package/components/Toast/locale/locales/en/package.json +6 -0
  762. package/components/Toast/locale/locales/en.d.ts +2 -0
  763. package/components/Toast/locale/locales/ru/package.json +6 -0
  764. package/components/Toast/locale/locales/ru/ru.js +3 -0
  765. package/components/Toast/locale/locales/ru/ru.js.map +1 -0
  766. package/components/Toast/locale/locales/ru.d.ts +2 -0
  767. package/components/Toast/locale/package.json +6 -0
  768. package/components/Toast/locale/types/package.json +6 -0
  769. package/components/Toast/locale/types/types.js +1 -0
  770. package/components/Toast/locale/types/types.js.map +1 -0
  771. package/components/Toast/locale/types.d.ts +3 -0
  772. package/components/Toggle/Toggle/Toggle.js +119 -10
  773. package/components/Toggle/Toggle/Toggle.js.map +1 -1
  774. package/components/Toggle/Toggle.d.ts +16 -6
  775. package/components/Toggle/Toggle.md +18 -2
  776. package/components/Toggle/Toggle.mixins/Toggle.mixins.js +35 -0
  777. package/components/Toggle/Toggle.mixins/Toggle.mixins.js.map +1 -0
  778. package/components/Toggle/Toggle.mixins/package.json +6 -0
  779. package/components/Toggle/Toggle.mixins.d.ts +7 -0
  780. package/components/Toggle/Toggle.styles/Toggle.styles.js +85 -31
  781. package/components/Toggle/Toggle.styles/Toggle.styles.js.map +1 -1
  782. package/components/Toggle/Toggle.styles.d.ts +21 -1
  783. package/components/Token/Token/Token.js +8 -3
  784. package/components/Token/Token/Token.js.map +1 -1
  785. package/components/Token/Token.d.ts +2 -5
  786. package/components/Token/locale/index/index.js +8 -0
  787. package/components/Token/locale/index/index.js.map +1 -0
  788. package/components/Token/locale/index/package.json +6 -0
  789. package/components/Token/locale/index.d.ts +4 -0
  790. package/components/Token/locale/locales/en/en.js +3 -0
  791. package/components/Token/locale/locales/en/en.js.map +1 -0
  792. package/components/Token/locale/locales/en/package.json +6 -0
  793. package/components/Token/locale/locales/en.d.ts +2 -0
  794. package/components/Token/locale/locales/ru/package.json +6 -0
  795. package/components/Token/locale/locales/ru/ru.js +3 -0
  796. package/components/Token/locale/locales/ru/ru.js.map +1 -0
  797. package/components/Token/locale/locales/ru.d.ts +2 -0
  798. package/components/Token/locale/package.json +6 -0
  799. package/components/Token/locale/types/package.json +6 -0
  800. package/components/Token/locale/types/types.js +1 -0
  801. package/components/Token/locale/types/types.js.map +1 -0
  802. package/components/Token/locale/types.d.ts +3 -0
  803. package/components/TokenInput/TokenInput/TokenInput.js +12 -4
  804. package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
  805. package/components/TokenInput/TokenInput.d.ts +3 -5
  806. package/components/TokenInput/TokenInput.md +26 -35
  807. package/components/TokenInput/TokenInput.styles/TokenInput.styles.js +1 -1
  808. package/components/TokenInput/TokenInput.styles/TokenInput.styles.js.map +1 -1
  809. package/components/TokenInput/TokenInputMenu/TokenInputMenu.js +1 -0
  810. package/components/TokenInput/TokenInputMenu/TokenInputMenu.js.map +1 -1
  811. package/components/TokenInput/TokenInputMenu.d.ts +7 -0
  812. package/components/TooltipMenu/TooltipMenu/TooltipMenu.js +8 -2
  813. package/components/TooltipMenu/TooltipMenu/TooltipMenu.js.map +1 -1
  814. package/components/TooltipMenu/TooltipMenu.d.ts +2 -2
  815. package/components/TooltipMenu/TooltipMenu.md +28 -0
  816. package/index.d.ts +1 -0
  817. package/index.js +1 -0
  818. package/index.js.map +1 -1
  819. package/internal/CloseButtonIcon/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
  820. package/internal/CloseButtonIcon/CloseButtonIcon.d.ts +2 -2
  821. package/internal/CloseButtonIcon/CloseButtonIcon.styles/CloseButtonIcon.styles.js +1 -1
  822. package/internal/CloseButtonIcon/CloseButtonIcon.styles/CloseButtonIcon.styles.js.map +1 -1
  823. package/internal/CustomComboBox/ComboBoxMenu/ComboBoxMenu.js +33 -10
  824. package/internal/CustomComboBox/ComboBoxMenu/ComboBoxMenu.js.map +1 -1
  825. package/internal/CustomComboBox/ComboBoxMenu.d.ts +9 -3
  826. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +40 -40
  827. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
  828. package/internal/CustomComboBox/ComboBoxView.d.ts +14 -13
  829. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +19 -10
  830. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
  831. package/internal/CustomComboBox/CustomComboBox.d.ts +10 -7
  832. package/internal/CustomComboBox/CustomComboBoxReducer/CustomComboBoxReducer.js +4 -0
  833. package/internal/CustomComboBox/CustomComboBoxReducer/CustomComboBoxReducer.js.map +1 -1
  834. package/internal/CustomComboBox/CustomComboBoxReducer.d.ts +2 -1
  835. package/internal/DateSelect/DateSelect/DateSelect.js +32 -16
  836. package/internal/DateSelect/DateSelect/DateSelect.js.map +1 -1
  837. package/internal/DateSelect/DateSelect.d.ts +2 -0
  838. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js +6 -3
  839. package/internal/DateSelect/DateSelect.styles/DateSelect.styles.js.map +1 -1
  840. package/internal/DateSelect/DateSelect.styles.d.ts +3 -0
  841. package/internal/DateSelect/locale/index/index.js +8 -0
  842. package/internal/DateSelect/locale/index/index.js.map +1 -0
  843. package/internal/DateSelect/locale/index/package.json +6 -0
  844. package/internal/DateSelect/locale/index.d.ts +4 -0
  845. package/internal/DateSelect/locale/locales/en/en.js +5 -0
  846. package/internal/DateSelect/locale/locales/en/en.js.map +1 -0
  847. package/internal/DateSelect/locale/locales/en/package.json +6 -0
  848. package/internal/DateSelect/locale/locales/en.d.ts +2 -0
  849. package/internal/DateSelect/locale/locales/ru/package.json +6 -0
  850. package/internal/DateSelect/locale/locales/ru/ru.js +5 -0
  851. package/internal/DateSelect/locale/locales/ru/ru.js.map +1 -0
  852. package/internal/DateSelect/locale/locales/ru.d.ts +2 -0
  853. package/internal/DateSelect/locale/package.json +6 -0
  854. package/internal/DateSelect/locale/types/package.json +6 -0
  855. package/internal/DateSelect/locale/types/types.js +1 -0
  856. package/internal/DateSelect/locale/types/types.js.map +1 -0
  857. package/internal/DateSelect/locale/types.d.ts +5 -0
  858. package/internal/DropdownContainer/DropdownContainer/DropdownContainer.js +2 -0
  859. package/internal/DropdownContainer/DropdownContainer/DropdownContainer.js.map +1 -1
  860. package/internal/DropdownContainer/DropdownContainer.d.ts +3 -2
  861. package/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile/FileUploaderFile.js +6 -5
  862. package/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile/FileUploaderFile.js.map +1 -1
  863. package/internal/FileUploaderControl/FileUploaderFile/FileUploaderFile.d.ts +3 -6
  864. package/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon/FileUploaderFileStatusIcon.js.map +1 -1
  865. package/internal/FileUploaderControl/FileUploaderFile/FileUploaderFileStatusIcon.d.ts +2 -2
  866. package/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
  867. package/internal/FileUploaderControl/FileUploaderFileList/FileUploaderFileList.d.ts +2 -2
  868. package/internal/FileUploaderControl/hooks/useFileUploaderSize/useFileUploaderSize.js.map +1 -1
  869. package/internal/FileUploaderControl/hooks/useFileUploaderSize.d.ts +2 -2
  870. package/internal/InputLikeText/InputLikeText/InputLikeText.js +20 -8
  871. package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
  872. package/internal/InputLikeText/InputLikeText.d.ts +1 -0
  873. package/internal/InternalMenu/InternalMenu/InternalMenu.js +11 -6
  874. package/internal/InternalMenu/InternalMenu/InternalMenu.js.map +1 -1
  875. package/internal/InternalMenu/InternalMenu.d.ts +13 -4
  876. package/internal/InternalMenu/InternalMenu.styles/InternalMenu.styles.js +10 -7
  877. package/internal/InternalMenu/InternalMenu.styles/InternalMenu.styles.js.map +1 -1
  878. package/internal/InternalMenu/InternalMenu.styles.d.ts +1 -0
  879. package/internal/InternalMenu/isIconPaddingEnabled/isIconPaddingEnabled.js +6 -0
  880. package/internal/InternalMenu/isIconPaddingEnabled/isIconPaddingEnabled.js.map +1 -0
  881. package/internal/InternalMenu/isIconPaddingEnabled/package.json +6 -0
  882. package/internal/InternalMenu/isIconPaddingEnabled.d.ts +2 -0
  883. package/internal/Menu/Menu/Menu.js +197 -42
  884. package/internal/Menu/Menu/Menu.js.map +1 -1
  885. package/internal/Menu/Menu.d.ts +42 -8
  886. package/internal/Menu/Menu.styles/Menu.styles.js +20 -5
  887. package/internal/Menu/Menu.styles/Menu.styles.js.map +1 -1
  888. package/internal/Menu/Menu.styles.d.ts +6 -1
  889. package/internal/MenuMessage/MenuMessage/MenuMessage.js +19 -2
  890. package/internal/MenuMessage/MenuMessage/MenuMessage.js.map +1 -1
  891. package/internal/MenuMessage/MenuMessage.d.ts +2 -0
  892. package/internal/MenuMessage/MenuMessage.styles/MenuMessage.styles.js +11 -2
  893. package/internal/MenuMessage/MenuMessage.styles/MenuMessage.styles.js.map +1 -1
  894. package/internal/MenuMessage/MenuMessage.styles.d.ts +3 -0
  895. package/internal/MobilePopup/MobilePopup/MobilePopup.js +1 -0
  896. package/internal/MobilePopup/MobilePopup/MobilePopup.js.map +1 -1
  897. package/internal/MobilePopup/MobilePopup.d.ts +2 -2
  898. package/internal/Popup/Popup/Popup.js +9 -3
  899. package/internal/Popup/Popup/Popup.js.map +1 -1
  900. package/internal/Popup/Popup.d.ts +7 -2
  901. package/internal/PopupMenu/PopupMenu/PopupMenu.js +28 -5
  902. package/internal/PopupMenu/PopupMenu/PopupMenu.js.map +1 -1
  903. package/internal/PopupMenu/PopupMenu.d.ts +5 -2
  904. package/internal/ThemePlayground/SizesGroup/SizesGroup.js.map +1 -1
  905. package/internal/ThemePlayground/SizesGroup.d.ts +2 -1
  906. package/internal/ThemePlayground/darkTheme/darkTheme.js +1 -1
  907. package/internal/ThemePlayground/darkTheme/darkTheme.js.map +1 -1
  908. package/internal/ThemePlayground/darkTheme.d.ts +1 -1
  909. package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  910. package/internal/themes/DarkTheme/DarkTheme.js +13 -0
  911. package/internal/themes/DarkTheme/DarkTheme.js.map +1 -1
  912. package/internal/themes/DarkTheme.d.ts +2 -0
  913. package/internal/themes/DefaultTheme/DefaultTheme.js +750 -106
  914. package/internal/themes/DefaultTheme/DefaultTheme.js.map +1 -1
  915. package/internal/themes/DefaultTheme.d.ts +280 -19
  916. package/internal/themes/Theme2022/Theme2022.js +79 -56
  917. package/internal/themes/Theme2022/Theme2022.js.map +1 -1
  918. package/internal/themes/Theme2022.d.ts +28 -4
  919. package/internal/themes/Theme2022Dark/Theme2022Dark.js +11 -26
  920. package/internal/themes/Theme2022Dark/Theme2022Dark.js.map +1 -1
  921. package/internal/themes/Theme2022Dark.d.ts +5 -7
  922. package/lib/locale/types/types.js.map +1 -1
  923. package/lib/locale/types.d.ts +6 -0
  924. package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js +4 -3
  925. package/lib/rootNode/rootNodeDecorator/rootNodeDecorator.js.map +1 -1
  926. package/lib/rootNode/rootNodeDecorator.d.ts +5 -1
  927. package/lib/styles/getLabGrotesqueBaselineCompensation/getLabGrotesqueBaselineCompensation.js +2 -2
  928. package/lib/styles/getLabGrotesqueBaselineCompensation/getLabGrotesqueBaselineCompensation.js.map +1 -1
  929. package/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +1 -1
  930. package/lib/types/props/package.json +6 -0
  931. package/lib/types/props/props.js +1 -0
  932. package/lib/types/props/props.js.map +1 -0
  933. package/lib/types/props.d.ts +1 -0
  934. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["InputLikeText.tsx"],"names":["InputLikeTextDataTids","root","input","nativeInput","InputLikeText","rootNode","getProps","defaultProps","state","blinking","focused","node","hiddenInput","lastSelectedInnerNode","frozen","frozenBlur","dragging","selectInnerNode","start","end","isIE11","document","body","setTimeout","focusTimeout","clearInterval","window","isEdge","focus","renderMain","props","innerRef","tabIndex","placeholder","align","borderless","width","size","error","warning","onValueChange","disabled","prefix","suffix","leftIcon","rightIcon","value","onMouseDragStart","onMouseDragEnd","takeContentWidth","ariaDescribedby","rest","leftSide","theme","renderLeftSide","rightSide","renderRightSide","className","styles","jsInputStyles","getSizeClassName","blink","focusFallback","warningFallback","errorFallback","hideBlinkingCursor","isMobile","wrapperClass","wrapper","userSelectContain","context","InputLayoutContextDefault","Object","assign","textAlign","undefined","handleFocus","handleBlur","handleKeyDown","handleMouseDown","absolute","inputFocus","inputDisabled","children","renderPlaceholder","hiddenInputRef","renderLeftIcon","renderIcon","getIconClassname","renderRightIcon","icon","iconNode","Function","useDefaultColor","iconDisabled","renderPrefix","prefixDisabled","renderSuffix","suffixDisabled","sideContainer","rightContainer","hasValue","placeholderDisabled","placeholderFocus","handleDocumentMouseDown","e","target","Node","contains","defrost","handleDocumentKeyDown","onKeyDown","handleMouseDragStart","documentElement","classList","add","userSelectNone","handleMouseDragEnd","remove","setAttribute","ReactDOM","flushSync","setState","onFocus","removeAttribute","stopPropagation","onBlur","el","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","blur","blinkTimeout","getNode","componentDidMount","MouseDrag","listen","addEventListener","componentWillUnmount","clearTimeout","stop","removeEventListener","render","setRootNode","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","React","Component","__KONTUR_REACT_UI__"],"mappings":";;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uD;;;;;;;;;;;;;;AAcO,IAAMA,qBAAqB,GAAG;AACnCC,EAAAA,IAAI,EAAE,qBAD6B;AAEnCC,EAAAA,KAAK,EAAE,sBAF4B;AAGnCC,EAAAA,WAAW,EAAE,4BAHsB,EAA9B,C;;;;;;AASMC,a,OADZC,kB;;;;;AAMSC,IAAAA,Q,GAAW,0CAAkBF,aAAa,CAACG,YAAhC,C;;AAEZC,IAAAA,K,GAAQ,EAAEC,QAAQ,EAAE,KAAZ,EAAmBC,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GAA8CM,cAAc0F,aAAd,CAA4B,KAAKhG,KAAjC,CAA1D,CACF,KAAK,QAAL,CACE,OAAO8F,KAAK,GAAGxF,cAAc2F,eAAd,CAA8B,KAAKjG,KAAnC,CAAH,GAA+CM,cAAc4F,cAAd,CAA6B,KAAKlG,KAAlC,CAA3D,CACF,KAAK,OAAL,CACA,QACE,OAAO8F,KAAK,GAAGxF,cAAc6F,cAAd,CAA6B,KAAKnG,KAAlC,CAAH,GAA8CM,cAAc8F,aAAd,CAA4B,KAAKpG,KAAjC,CAA1D,CAPJ,CASD,C,wBAvNgCqG,eAAMC,S,WACzBC,mB,GAAsB,e,UAEtBrJ,Y,GAA6B,EAAE8B,IAAI,EAAE,OAAR,E","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyTab, isShortcutPaste } from '../../lib/events/keyboard/identifiers';\nimport { MouseDrag, MouseDragEventHandler } from '../../lib/events/MouseDrag';\nimport { isEdge, isIE11, isMobile } from '../../lib/client';\nimport { Nullable } from '../../typings/utility-types';\nimport { removeAllSelections, selectNodeContents } from '../../components/DateInput/helpers/SelectionHelpers';\nimport { InputProps, InputIconType, InputState } from '../../components/Input';\nimport { styles as jsInputStyles } from '../../components/Input/Input.styles';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { findRenderContainer } from '../../lib/listenFocusOutside';\nimport { TSetRootNode, rootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { InputLayoutAside } from '../../components/Input/InputLayout/InputLayoutAside';\nimport { InputLayoutContext, InputLayoutContextDefault } from '../../components/Input/InputLayout/InputLayoutContext';\n\nimport { HiddenInput } from './HiddenInput';\nimport { styles } from './InputLikeText.styles';\n\nexport interface InputLikeTextProps extends CommonProps, InputProps {\n children?: React.ReactNode;\n innerRef?: (el: HTMLElement | null) => void;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onMouseDragStart?: MouseDragEventHandler;\n onMouseDragEnd?: MouseDragEventHandler;\n takeContentWidth?: boolean;\n}\n\nexport type InputLikeTextState = Omit<InputState, 'needsPolyfillPlaceholder'>;\n\nexport const InputLikeTextDataTids = {\n root: 'InputLikeText__root',\n input: 'InputLikeText__input',\n nativeInput: 'InputLikeText__nativeInput',\n} as const;\n\ntype DefaultProps = Required<Pick<InputLikeTextProps, 'size'>>;\n\n@rootNode\nexport class InputLikeText extends React.Component<InputLikeTextProps, InputLikeTextState> {\n public static __KONTUR_REACT_UI__ = 'InputLikeText';\n\n public static defaultProps: DefaultProps = { size: 'small' };\n\n private getProps = createPropsGetter(InputLikeText.defaultProps);\n\n public state = { blinking: false, focused: false };\n\n private theme!: Theme;\n private node: HTMLElement | null = null;\n private hiddenInput: HTMLInputElement | null = null;\n private lastSelectedInnerNode: [HTMLElement, number, number] | null = null;\n private frozen = false;\n private frozenBlur = false;\n private dragging = false;\n private focusTimeout: Nullable<number>;\n private blinkTimeout: Nullable<number>;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public focus() {\n if (this.node) {\n this.node.focus();\n }\n }\n\n /**\n * @public\n */\n public blur() {\n if (this.node) {\n this.node.blur();\n }\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.props.disabled) {\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(() => this.setState({ blinking: false }), 150);\n });\n }\n\n public getNode(): HTMLElement | null {\n return this.node;\n }\n\n public selectInnerNode = (node: HTMLElement | null, start = 0, end = 1) => {\n if (this.dragging || !node) {\n return;\n }\n if (isIE11 && findRenderContainer(node, document.body)) {\n // Code below causes Popup to close after triggering the focus event on the body in IE11\n return;\n }\n this.frozen = true;\n this.frozenBlur = true;\n\n this.lastSelectedInnerNode = [node, start, end];\n setTimeout(() => selectNodeContents(node, start, end), 0);\n if (this.focusTimeout) {\n clearInterval(this.focusTimeout);\n }\n this.focusTimeout = window.setTimeout(() => (isIE11 || isEdge) && this.node && this.node.focus(), 0);\n };\n\n public componentDidMount() {\n if (this.node) {\n MouseDrag.listen(this.node).onMouseDragStart(this.handleMouseDragStart).onMouseDragEnd(this.handleMouseDragEnd);\n }\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n MouseDrag.stop(this.node);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<InputLikeTextProps>) => {\n const {\n innerRef,\n tabIndex,\n placeholder,\n align,\n borderless,\n width,\n size,\n error,\n warning,\n onValueChange,\n disabled,\n prefix,\n suffix,\n leftIcon,\n rightIcon,\n value,\n onMouseDragStart,\n onMouseDragEnd,\n takeContentWidth,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { focused, blinking } = this.state;\n\n const leftSide = isTheme2022(this.theme) ? (\n <InputLayoutAside icon={leftIcon} text={prefix} side=\"left\" />\n ) : (\n this.renderLeftSide()\n );\n const rightSide = isTheme2022(this.theme) ? (\n <InputLayoutAside icon={rightIcon} text={suffix} side=\"right\" />\n ) : (\n this.renderRightSide()\n );\n\n const className = cx(styles.root(), jsInputStyles.root(this.theme), this.getSizeClassName(), {\n [jsInputStyles.disabled(this.theme)]: !!disabled,\n [jsInputStyles.borderless()]: !!borderless,\n [jsInputStyles.focus(this.theme)]: focused,\n [jsInputStyles.blink(this.theme)]: blinking,\n [jsInputStyles.warning(this.theme)]: !!warning,\n [jsInputStyles.error(this.theme)]: !!error,\n [jsInputStyles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [jsInputStyles.warningFallback(this.theme)]: !!warning && (isIE11 || isEdge),\n [jsInputStyles.errorFallback(this.theme)]: !!error && (isIE11 || isEdge),\n [jsInputStyles.hideBlinkingCursor()]: isMobile,\n });\n\n const wrapperClass = cx(jsInputStyles.wrapper(), {\n [styles.userSelectContain()]: focused,\n });\n\n const context = InputLayoutContextDefault;\n Object.assign(context, { disabled, focused, size });\n\n return (\n <span\n data-tid={InputLikeTextDataTids.root}\n {...rest}\n className={className}\n style={{ width, textAlign: align }}\n tabIndex={disabled ? undefined : 0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={this.innerRef}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <InputLayoutContext.Provider value={context}>\n <input\n data-tid={InputLikeTextDataTids.nativeInput}\n type=\"hidden\"\n value={value}\n disabled={disabled}\n aria-describedby={ariaDescribedby}\n />\n {leftSide}\n <span className={wrapperClass}>\n <span\n data-tid={InputLikeTextDataTids.input}\n className={cx(jsInputStyles.input(this.theme), {\n [styles.absolute()]: !takeContentWidth,\n [jsInputStyles.inputFocus(this.theme)]: focused,\n [jsInputStyles.inputDisabled(this.theme)]: disabled,\n })}\n >\n {this.props.children}\n </span>\n {this.renderPlaceholder()}\n </span>\n {rightSide}\n {isIE11 && focused && <HiddenInput nodeRef={this.hiddenInputRef} />}\n </InputLayoutContext.Provider>\n </span>\n );\n };\n\n private getIconClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? jsInputStyles.rightIconLarge(this.theme) : jsInputStyles.leftIconLarge(this.theme);\n case 'medium':\n return right ? jsInputStyles.rightIconMedium(this.theme) : jsInputStyles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? jsInputStyles.rightIconSmall(this.theme) : jsInputStyles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon = () => {\n return this.renderIcon(this.props.leftIcon, this.getIconClassname());\n };\n\n private renderRightIcon = () => {\n return this.renderIcon(this.props.rightIcon, this.getIconClassname(true));\n };\n\n private renderIcon = (icon: InputIconType, className: string): JSX.Element | null => {\n if (!icon) {\n return null;\n }\n\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(jsInputStyles.icon(), className, jsInputStyles.useDefaultColor(this.theme), {\n [jsInputStyles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n };\n\n private renderPrefix = (): JSX.Element | null => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.prefix(this.theme), { [jsInputStyles.prefixDisabled(this.theme)]: disabled })}>\n {prefix}\n </span>\n );\n };\n\n private renderSuffix = (): JSX.Element | null => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.suffix(this.theme), { [jsInputStyles.suffixDisabled(this.theme)]: disabled })}>\n {suffix}\n </span>\n );\n };\n\n private renderLeftSide = (): JSX.Element | null => {\n const leftIcon = this.renderLeftIcon();\n const prefix = this.renderPrefix();\n\n if (!leftIcon && !prefix) {\n return null;\n }\n\n return (\n <span className={jsInputStyles.sideContainer()}>\n {leftIcon}\n {prefix}\n </span>\n );\n };\n\n private renderRightSide = (): JSX.Element | null => {\n const rightIcon = this.renderRightIcon();\n const suffix = this.renderSuffix();\n\n if (!rightIcon && !suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.sideContainer(), jsInputStyles.rightContainer())}>\n {rightIcon}\n {suffix}\n </span>\n );\n };\n\n private renderPlaceholder = (): JSX.Element | null => {\n const { children, placeholder, disabled } = this.props;\n const { focused } = this.state;\n const hasValue = isNonNullable(children) && children !== '';\n\n if (!hasValue && placeholder) {\n return (\n <span\n className={cx(jsInputStyles.placeholder(this.theme), {\n [jsInputStyles.placeholderDisabled(this.theme)]: disabled,\n [jsInputStyles.placeholderFocus(this.theme)]: focused,\n })}\n >\n {placeholder}\n </span>\n );\n }\n return null;\n };\n\n private handleDocumentMouseDown = (e: MouseEvent) => {\n if (this.state.focused && this.node && e.target instanceof Node && !this.node.contains(e.target)) {\n this.defrost();\n }\n };\n\n private handleDocumentKeyDown = (e: KeyboardEvent) => {\n if (this.state.focused && isKeyTab(e)) {\n this.defrost();\n }\n };\n\n private handleMouseDown = () => {\n this.frozen = true;\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (this.props.disabled) {\n return;\n }\n\n if (isIE11 && isShortcutPaste(e) && this.hiddenInput) {\n this.frozen = true;\n setTimeout(() => {\n if (this.lastSelectedInnerNode) {\n this.selectInnerNode(...this.lastSelectedInnerNode);\n }\n if (this.node) {\n this.node.focus();\n }\n }, 0);\n\n this.hiddenInput.focus();\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e as React.KeyboardEvent<HTMLInputElement>);\n }\n };\n\n private handleMouseDragStart: MouseDragEventHandler = (e) => {\n this.dragging = true;\n document.documentElement.classList.add(styles.userSelectNone());\n\n if (this.props.onMouseDragStart) {\n this.props.onMouseDragStart(e);\n }\n };\n\n private handleMouseDragEnd: MouseDragEventHandler = (e) => {\n // Дожидаемся onMouseUp\n setTimeout(() => {\n this.dragging = false;\n\n if (this.props.onMouseDragEnd) {\n this.props.onMouseDragEnd(e);\n }\n }, 0);\n\n document.documentElement.classList.remove(styles.userSelectNone());\n };\n\n private handleFocus = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.setAttribute('contenteditable', 'true');\n }\n\n if (this.props.disabled) {\n if (isIE11) {\n selectNodeContents(document.body, 0, 0);\n }\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozen) {\n this.frozen = false;\n if (this.state.focused) {\n return;\n }\n }\n\n ReactDOM.flushSync(() => {\n this.setState({ focused: true });\n });\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.removeAttribute('contenteditable');\n }\n\n if (this.props.disabled) {\n e.stopPropagation();\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozenBlur) {\n this.frozenBlur = false;\n return;\n }\n if ((isIE11 || isEdge) && this.frozen) {\n return;\n }\n\n removeAllSelections();\n\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n };\n\n private hiddenInputRef = (el: HTMLInputElement | null) => {\n this.hiddenInput = el;\n };\n\n private innerRef = (el: HTMLElement | null) => {\n if (this.props.innerRef) {\n this.props.innerRef(el);\n }\n this.node = el;\n };\n\n private defrost = (): void => {\n this.frozen = false;\n this.frozenBlur = false;\n };\n\n private getSizeClassName = () => {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [jsInputStyles.sizeLarge(this.theme)]: true,\n [jsInputStyles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [jsInputStyles.sizeMedium(this.theme)]: true,\n [jsInputStyles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [jsInputStyles.sizeSmall(this.theme)]: true,\n [jsInputStyles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n };\n}\n"]}
1
+ {"version":3,"sources":["InputLikeText.tsx"],"names":["InputLikeTextDataTids","root","input","nativeInput","InputLikeText","rootNode","getProps","defaultProps","state","blinking","focused","node","hiddenInput","lastSelectedInnerNode","frozen","frozenBlur","dragging","selectNodeContentsDebounced","selectNodeContents","selectInnerNode","start","end","isIE11","document","body","focusTimeout","clearInterval","window","setTimeout","isEdge","focus","renderMain","props","innerRef","tabIndex","placeholder","align","borderless","width","size","error","warning","onValueChange","disabled","prefix","suffix","leftIcon","rightIcon","value","onMouseDragStart","onMouseDragEnd","takeContentWidth","ariaDescribedby","rest","leftSide","theme","renderLeftSide","rightSide","renderRightSide","className","styles","jsInputStyles","getSizeClassName","hovering","blink","focusFallback","warningFallback","errorFallback","hideBlinkingCursor","isMobile","wrapperClass","wrapper","userSelectContain","context","InputLayoutContextDefault","Object","assign","textAlign","undefined","handleFocus","handleBlur","handleKeyDown","handleMouseDown","absolute","inputFocus","inputDisabled","children","renderPlaceholder","hiddenInputRef","renderLeftIcon","renderIcon","getIconClassname","renderRightIcon","icon","iconNode","Function","useDefaultColor","iconDisabled","renderPrefix","prefixDisabled","renderSuffix","suffixDisabled","sideContainer","rightContainer","hasValue","placeholderDisabled","placeholderFocus","handleDocumentMouseDown","e","target","Node","contains","defrost","handleDocumentKeyDown","onKeyDown","handleMouseDragStart","documentElement","classList","add","userSelectNone","handleMouseDragEnd","remove","setAttribute","React","version","search","ReactDOM","flushSync","setState","onFocus","cancel","removeAttribute","stopPropagation","onBlur","el","sizeLarge","sizeLargeFallback","sizeMedium","sizeMediumFallback","sizeSmall","sizeSmallFallback","blur","blinkTimeout","getNode","componentDidMount","MouseDrag","listen","addEventListener","componentWillUnmount","clearTimeout","stop","removeEventListener","render","setRootNode","right","rightIconLarge","leftIconLarge","rightIconMedium","leftIconMedium","rightIconSmall","leftIconSmall","Component","__KONTUR_REACT_UI__"],"mappings":";;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uD;;;;;;;;;;;;;;AAcO,IAAMA,qBAAqB,GAAG;AACnCC,EAAAA,IAAI,EAAE,qBAD6B;AAEnCC,EAAAA,KAAK,EAAE,sBAF4B;AAGnCC,EAAAA,WAAW,EAAE,4BAHsB,EAA9B,C;;;;;;AASMC,a,OADZC,kB;;;;;AAMSC,IAAAA,Q,GAAW,0CAAkBF,aAAa,CA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AAC,0BAAD,CAAc,QAAd,QACG,UAACjG,KAAD,EAAW,CACV,MAAI,CAACA,KAAL,GAAaA,KAAb,CACA,oBACE,6BAAC,4BAAD,2BAAe,WAAW,EAAE,MAAI,CAACkG,WAAjC,IAAkD,MAAI,CAACzH,KAAvD,GACG,MAAI,CAACD,UADR,CADF,CAKD,CARH,CADF,CAYD,C,QAuGO4D,gB,GAAR,0BAAyB+D,KAAzB,EAAwC,KAAfA,KAAe,cAAfA,KAAe,GAAP,KAAO,EACtC,QAAQ,KAAKpJ,QAAL,GAAgBiC,IAAxB,GACE,KAAK,OAAL,CACE,OAAOmH,KAAK,GAAG7F,cAAc8F,cAAd,CAA6B,KAAKpG,KAAlC,CAAH,GAA8CM,cAAc+F,aAAd,CAA4B,KAAKrG,KAAjC,CAA1D,CACF,KAAK,QAAL,CACE,OAAOmG,KAAK,GAAG7F,cAAcgG,eAAd,CAA8B,KAAKtG,KAAnC,CAAH,GAA+CM,cAAciG,cAAd,CAA6B,KAAKvG,KAAlC,CAA3D,CACF,KAAK,OAAL,CACA,QACE,OAAOmG,KAAK,GAAG7F,cAAckG,cAAd,CAA6B,KAAKxG,KAAlC,CAAH,GAA8CM,cAAcmG,aAAd,CAA4B,KAAKzG,KAAjC,CAA1D,CAPJ,CASD,C,wBA5NgCoE,eAAMsC,S,WACzBC,mB,GAAsB,e,UAEtB3J,Y,GAA6B,EAAEgC,IAAI,EAAE,OAAR,E","sourcesContent":["// TODO: Enable this rule in functional components.\n/* eslint-disable @typescript-eslint/no-unused-vars */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash.debounce';\n\nimport { isNonNullable } from '../../lib/utils';\nimport { isKeyTab, isShortcutPaste } from '../../lib/events/keyboard/identifiers';\nimport { MouseDrag, MouseDragEventHandler } from '../../lib/events/MouseDrag';\nimport { isEdge, isIE11, isMobile } from '../../lib/client';\nimport { Nullable } from '../../typings/utility-types';\nimport { removeAllSelections, selectNodeContents } from '../../components/DateInput/helpers/SelectionHelpers';\nimport { InputProps, InputIconType, InputState } from '../../components/Input';\nimport { styles as jsInputStyles } from '../../components/Input/Input.styles';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { CommonProps, CommonWrapper, CommonWrapperRestProps } from '../CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { findRenderContainer } from '../../lib/listenFocusOutside';\nimport { TSetRootNode, rootNode } from '../../lib/rootNode';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { InputLayoutAside } from '../../components/Input/InputLayout/InputLayoutAside';\nimport { InputLayoutContext, InputLayoutContextDefault } from '../../components/Input/InputLayout/InputLayoutContext';\n\nimport { HiddenInput } from './HiddenInput';\nimport { styles } from './InputLikeText.styles';\n\nexport interface InputLikeTextProps extends CommonProps, InputProps {\n children?: React.ReactNode;\n innerRef?: (el: HTMLElement | null) => void;\n onFocus?: React.FocusEventHandler<HTMLElement>;\n onBlur?: React.FocusEventHandler<HTMLElement>;\n onMouseDragStart?: MouseDragEventHandler;\n onMouseDragEnd?: MouseDragEventHandler;\n takeContentWidth?: boolean;\n}\n\nexport type InputLikeTextState = Omit<InputState, 'needsPolyfillPlaceholder'>;\n\nexport const InputLikeTextDataTids = {\n root: 'InputLikeText__root',\n input: 'InputLikeText__input',\n nativeInput: 'InputLikeText__nativeInput',\n} as const;\n\ntype DefaultProps = Required<Pick<InputLikeTextProps, 'size'>>;\n\n@rootNode\nexport class InputLikeText extends React.Component<InputLikeTextProps, InputLikeTextState> {\n public static __KONTUR_REACT_UI__ = 'InputLikeText';\n\n public static defaultProps: DefaultProps = { size: 'small' };\n\n private getProps = createPropsGetter(InputLikeText.defaultProps);\n\n public state = { blinking: false, focused: false };\n\n private theme!: Theme;\n private node: HTMLElement | null = null;\n private hiddenInput: HTMLInputElement | null = null;\n private lastSelectedInnerNode: [HTMLElement, number, number] | null = null;\n private frozen = false;\n private frozenBlur = false;\n private dragging = false;\n private focusTimeout: Nullable<number>;\n private blinkTimeout: Nullable<number>;\n private setRootNode!: TSetRootNode;\n\n /**\n * @public\n */\n public focus() {\n if (this.node) {\n this.node.focus();\n }\n }\n\n /**\n * @public\n */\n public blur() {\n if (this.node) {\n this.node.blur();\n }\n }\n\n /**\n * @public\n */\n public blink() {\n if (this.props.disabled) {\n return;\n }\n this.setState({ blinking: true }, () => {\n this.blinkTimeout = window.setTimeout(() => this.setState({ blinking: false }), 150);\n });\n }\n\n public getNode(): HTMLElement | null {\n return this.node;\n }\n\n // Async call required for Firefox\n private selectNodeContentsDebounced = debounce(selectNodeContents, 0);\n\n public selectInnerNode = (node: HTMLElement | null, start = 0, end = 1) => {\n if (this.dragging || !node) {\n return;\n }\n if (isIE11 && findRenderContainer(node, document.body)) {\n // Code below causes Popup to close after triggering the focus event on the body in IE11\n return;\n }\n this.frozen = true;\n this.frozenBlur = true;\n\n this.lastSelectedInnerNode = [node, start, end];\n this.selectNodeContentsDebounced(node, start, end);\n\n if (this.focusTimeout) {\n clearInterval(this.focusTimeout);\n }\n this.focusTimeout = window.setTimeout(() => (isIE11 || isEdge) && this.node && this.node.focus(), 0);\n };\n\n public componentDidMount() {\n if (this.node) {\n MouseDrag.listen(this.node).onMouseDragStart(this.handleMouseDragStart).onMouseDragEnd(this.handleMouseDragEnd);\n }\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public componentWillUnmount() {\n if (this.blinkTimeout) {\n clearTimeout(this.blinkTimeout);\n }\n MouseDrag.stop(this.node);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n {this.renderMain}\n </CommonWrapper>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain = (props: CommonWrapperRestProps<InputLikeTextProps>) => {\n const {\n innerRef,\n tabIndex,\n placeholder,\n align,\n borderless,\n width,\n size,\n error,\n warning,\n onValueChange,\n disabled,\n prefix,\n suffix,\n leftIcon,\n rightIcon,\n value,\n onMouseDragStart,\n onMouseDragEnd,\n takeContentWidth,\n 'aria-describedby': ariaDescribedby,\n ...rest\n } = props;\n\n const { focused, blinking } = this.state;\n\n const leftSide = isTheme2022(this.theme) ? (\n <InputLayoutAside icon={leftIcon} text={prefix} side=\"left\" />\n ) : (\n this.renderLeftSide()\n );\n const rightSide = isTheme2022(this.theme) ? (\n <InputLayoutAside icon={rightIcon} text={suffix} side=\"right\" />\n ) : (\n this.renderRightSide()\n );\n\n const className = cx(styles.root(), jsInputStyles.root(this.theme), this.getSizeClassName(), {\n [jsInputStyles.disabled(this.theme)]: !!disabled,\n [jsInputStyles.borderless()]: !!borderless,\n [jsInputStyles.focus(this.theme)]: focused,\n [jsInputStyles.hovering(this.theme)]: !focused && !disabled && !warning && !error && !borderless,\n [jsInputStyles.blink(this.theme)]: blinking,\n [jsInputStyles.warning(this.theme)]: !!warning,\n [jsInputStyles.error(this.theme)]: !!error,\n [jsInputStyles.focusFallback(this.theme)]: focused && (isIE11 || isEdge),\n [jsInputStyles.warningFallback(this.theme)]: !!warning && (isIE11 || isEdge),\n [jsInputStyles.errorFallback(this.theme)]: !!error && (isIE11 || isEdge),\n [jsInputStyles.hideBlinkingCursor()]: isMobile,\n });\n\n const wrapperClass = cx(jsInputStyles.wrapper(), {\n [styles.userSelectContain()]: focused,\n });\n\n const context = InputLayoutContextDefault;\n Object.assign(context, { disabled, focused, size });\n\n return (\n <span\n data-tid={InputLikeTextDataTids.root}\n {...rest}\n className={className}\n style={{ width, textAlign: align }}\n tabIndex={disabled ? undefined : 0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n ref={this.innerRef}\n onKeyDown={this.handleKeyDown}\n onMouseDown={this.handleMouseDown}\n >\n <InputLayoutContext.Provider value={context}>\n <input\n data-tid={InputLikeTextDataTids.nativeInput}\n type=\"hidden\"\n value={value}\n disabled={disabled}\n aria-describedby={ariaDescribedby}\n />\n {leftSide}\n <span className={wrapperClass}>\n <span\n data-tid={InputLikeTextDataTids.input}\n className={cx(jsInputStyles.input(this.theme), {\n [styles.absolute()]: !takeContentWidth,\n [jsInputStyles.inputFocus(this.theme)]: focused,\n [jsInputStyles.inputDisabled(this.theme)]: disabled,\n })}\n >\n {this.props.children}\n </span>\n {this.renderPlaceholder()}\n </span>\n {rightSide}\n {isIE11 && focused && <HiddenInput nodeRef={this.hiddenInputRef} />}\n </InputLayoutContext.Provider>\n </span>\n );\n };\n\n private getIconClassname(right = false) {\n switch (this.getProps().size) {\n case 'large':\n return right ? jsInputStyles.rightIconLarge(this.theme) : jsInputStyles.leftIconLarge(this.theme);\n case 'medium':\n return right ? jsInputStyles.rightIconMedium(this.theme) : jsInputStyles.leftIconMedium(this.theme);\n case 'small':\n default:\n return right ? jsInputStyles.rightIconSmall(this.theme) : jsInputStyles.leftIconSmall(this.theme);\n }\n }\n\n private renderLeftIcon = () => {\n return this.renderIcon(this.props.leftIcon, this.getIconClassname());\n };\n\n private renderRightIcon = () => {\n return this.renderIcon(this.props.rightIcon, this.getIconClassname(true));\n };\n\n private renderIcon = (icon: InputIconType, className: string): JSX.Element | null => {\n if (!icon) {\n return null;\n }\n\n const { disabled } = this.props;\n const iconNode = icon instanceof Function ? icon() : icon;\n\n return (\n <span\n className={cx(jsInputStyles.icon(), className, jsInputStyles.useDefaultColor(this.theme), {\n [jsInputStyles.iconDisabled()]: disabled,\n })}\n >\n {iconNode}\n </span>\n );\n };\n\n private renderPrefix = (): JSX.Element | null => {\n const { prefix, disabled } = this.props;\n\n if (!prefix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.prefix(this.theme), { [jsInputStyles.prefixDisabled(this.theme)]: disabled })}>\n {prefix}\n </span>\n );\n };\n\n private renderSuffix = (): JSX.Element | null => {\n const { suffix, disabled } = this.props;\n\n if (!suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.suffix(this.theme), { [jsInputStyles.suffixDisabled(this.theme)]: disabled })}>\n {suffix}\n </span>\n );\n };\n\n private renderLeftSide = (): JSX.Element | null => {\n const leftIcon = this.renderLeftIcon();\n const prefix = this.renderPrefix();\n\n if (!leftIcon && !prefix) {\n return null;\n }\n\n return (\n <span className={jsInputStyles.sideContainer()}>\n {leftIcon}\n {prefix}\n </span>\n );\n };\n\n private renderRightSide = (): JSX.Element | null => {\n const rightIcon = this.renderRightIcon();\n const suffix = this.renderSuffix();\n\n if (!rightIcon && !suffix) {\n return null;\n }\n\n return (\n <span className={cx(jsInputStyles.sideContainer(), jsInputStyles.rightContainer())}>\n {rightIcon}\n {suffix}\n </span>\n );\n };\n\n private renderPlaceholder = (): JSX.Element | null => {\n const { children, placeholder, disabled } = this.props;\n const { focused } = this.state;\n const hasValue = isNonNullable(children) && children !== '';\n\n if (!hasValue && placeholder) {\n return (\n <span\n className={cx(jsInputStyles.placeholder(this.theme), {\n [jsInputStyles.placeholderDisabled(this.theme)]: disabled,\n [jsInputStyles.placeholderFocus(this.theme)]: focused,\n })}\n >\n {placeholder}\n </span>\n );\n }\n return null;\n };\n\n private handleDocumentMouseDown = (e: MouseEvent) => {\n if (this.state.focused && this.node && e.target instanceof Node && !this.node.contains(e.target)) {\n this.defrost();\n }\n };\n\n private handleDocumentKeyDown = (e: KeyboardEvent) => {\n if (this.state.focused && isKeyTab(e)) {\n this.defrost();\n }\n };\n\n private handleMouseDown = () => {\n this.frozen = true;\n };\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {\n if (this.props.disabled) {\n return;\n }\n\n if (isIE11 && isShortcutPaste(e) && this.hiddenInput) {\n this.frozen = true;\n setTimeout(() => {\n if (this.lastSelectedInnerNode) {\n this.selectInnerNode(...this.lastSelectedInnerNode);\n }\n if (this.node) {\n this.node.focus();\n }\n }, 0);\n\n this.hiddenInput.focus();\n }\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(e as React.KeyboardEvent<HTMLInputElement>);\n }\n };\n\n private handleMouseDragStart: MouseDragEventHandler = (e) => {\n this.dragging = true;\n document.documentElement.classList.add(styles.userSelectNone());\n\n if (this.props.onMouseDragStart) {\n this.props.onMouseDragStart(e);\n }\n };\n\n private handleMouseDragEnd: MouseDragEventHandler = (e) => {\n // Дожидаемся onMouseUp\n setTimeout(() => {\n this.dragging = false;\n\n if (this.props.onMouseDragEnd) {\n this.props.onMouseDragEnd(e);\n }\n }, 0);\n\n document.documentElement.classList.remove(styles.userSelectNone());\n };\n\n private handleFocus = (e: React.FocusEvent<HTMLElement>) => {\n if (isMobile) {\n e.target.setAttribute('contenteditable', 'true');\n }\n\n if (this.props.disabled) {\n if (isIE11) {\n selectNodeContents(document.body, 0, 0);\n }\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozen) {\n this.frozen = false;\n if (this.state.focused) {\n return;\n }\n }\n\n // Auto-batching React@18 creates problems that are fixed with flushSync\n // https://github.com/skbkontur/retail-ui/pull/3144#issuecomment-1535235366\n if (React.version.search('18') === 0) {\n ReactDOM.flushSync(() => this.setState({ focused: true }));\n } else {\n this.setState({ focused: true });\n }\n\n if (this.props.onFocus) {\n this.props.onFocus(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLElement>) => {\n this.selectNodeContentsDebounced.cancel();\n if (isMobile) {\n e.target.removeAttribute('contenteditable');\n }\n\n if (this.props.disabled) {\n e.stopPropagation();\n return;\n }\n\n if ((isIE11 || isEdge) && this.frozenBlur) {\n this.frozenBlur = false;\n return;\n }\n if ((isIE11 || isEdge) && this.frozen) {\n return;\n }\n\n removeAllSelections();\n\n this.setState({ focused: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(e);\n }\n };\n\n private hiddenInputRef = (el: HTMLInputElement | null) => {\n this.hiddenInput = el;\n };\n\n private innerRef = (el: HTMLElement | null) => {\n if (this.props.innerRef) {\n this.props.innerRef(el);\n }\n this.node = el;\n };\n\n private defrost = (): void => {\n this.frozen = false;\n this.frozenBlur = false;\n };\n\n private getSizeClassName = () => {\n switch (this.getProps().size) {\n case 'large':\n return cx({\n [jsInputStyles.sizeLarge(this.theme)]: true,\n [jsInputStyles.sizeLargeFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'medium':\n return cx({\n [jsInputStyles.sizeMedium(this.theme)]: true,\n [jsInputStyles.sizeMediumFallback(this.theme)]: isIE11 || isEdge,\n });\n case 'small':\n default:\n return cx({\n [jsInputStyles.sizeSmall(this.theme)]: true,\n [jsInputStyles.sizeSmallFallback(this.theme)]: isIE11 || isEdge,\n });\n }\n };\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { ScrollContainerScrollState } from '../../components/ScrollContainer';
3
- interface MenuProps {
3
+ export interface InternalMenuProps {
4
4
  children?: React.ReactNode;
5
5
  hasShadow?: boolean;
6
6
  /**
@@ -12,6 +12,11 @@ interface MenuProps {
12
12
  onItemClick?: (event: React.SyntheticEvent<HTMLElement>) => void;
13
13
  width?: number | string;
14
14
  preventWindowScroll?: boolean;
15
+ /**
16
+ * Предотвращает выравнивание текста всех пунктов меню относительно друг друга.
17
+ * Так, если хотя бы у одного пункта меню есть иконка, текст в остальных пунктах меню будет выровнен относительно пункта меню с иконкой
18
+ */
19
+ preventIconsOffset?: boolean;
15
20
  onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
16
21
  header?: React.ReactNode;
17
22
  footer?: React.ReactNode;
@@ -26,8 +31,11 @@ interface MenuState {
26
31
  export declare const InternalMenuDataTids: {
27
32
  readonly root: "InternalMenu__root";
28
33
  };
29
- declare type DefaultProps = Required<Pick<MenuProps, 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll' | 'cyclicSelection' | 'initialSelectedItemIndex'>>;
30
- export declare class InternalMenu extends React.PureComponent<MenuProps, MenuState> {
34
+ declare type DefaultProps = Required<Pick<InternalMenuProps, 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll' | 'cyclicSelection' | 'initialSelectedItemIndex'>>;
35
+ /**
36
+ * @deprecated use Menu component instead
37
+ */
38
+ export declare class InternalMenu extends React.PureComponent<InternalMenuProps, MenuState> {
31
39
  static __KONTUR_REACT_UI__: string;
32
40
  static defaultProps: DefaultProps;
33
41
  private getProps;
@@ -38,8 +46,9 @@ export declare class InternalMenu extends React.PureComponent<MenuProps, MenuSta
38
46
  private setRootNode;
39
47
  private header;
40
48
  private footer;
49
+ private isMobileLayout;
41
50
  componentDidMount(): void;
42
- componentDidUpdate(prevProps: MenuProps): void;
51
+ componentDidUpdate(prevProps: InternalMenuProps): void;
43
52
  focus(): void;
44
53
  render(): JSX.Element;
45
54
  private renderMain;
@@ -1,5 +1,6 @@
1
1
  "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.InternalMenuDataTids = exports.InternalMenu = void 0;var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));
2
2
 
3
+ var _decorator = require("../../components/ResponsiveLayout/decorator");
3
4
  var _SSRSafe = require("../../lib/SSRSafe");
4
5
  var _utils = require("../../lib/utils");
5
6
  var _identifiers = require("../../lib/events/keyboard/identifiers");
@@ -17,7 +18,13 @@ var _ThemeFactory = require("../../lib/theming/ThemeFactory");
17
18
 
18
19
  var _InternalMenu = require("./InternalMenu.styles");
19
20
  var _isActiveElement = require("./isActiveElement");
20
- var _addIconPaddingIfPartOfMenu = require("./addIconPaddingIfPartOfMenu");var _class, _class2, _temp;
21
+ var _addIconPaddingIfPartOfMenu = require("./addIconPaddingIfPartOfMenu");
22
+ var _isIconPaddingEnabled = require("./isIconPaddingEnabled");var _class, _class2, _temp;
23
+
24
+
25
+
26
+
27
+
21
28
 
22
29
 
23
30
 
@@ -48,7 +55,7 @@ var _addIconPaddingIfPartOfMenu = require("./addIconPaddingIfPartOfMenu");var _c
48
55
 
49
56
 
50
57
  var InternalMenuDataTids = {
51
- root: 'InternalMenu__root' };exports.InternalMenuDataTids = InternalMenuDataTids;var
58
+ root: 'InternalMenu__root' };exports.InternalMenuDataTids = InternalMenuDataTids;
52
59
 
53
60
 
54
61
 
@@ -57,9 +64,12 @@ var InternalMenuDataTids = {
57
64
 
58
65
 
59
66
 
67
+ /**
68
+ * @deprecated use Menu component instead
69
+ */var
60
70
 
61
71
 
62
- InternalMenu = (0, _rootNode2.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/function (_React$PureComponent) {(0, _inheritsLoose2.default)(InternalMenu, _React$PureComponent);function InternalMenu() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;_this.
72
+ InternalMenu = (0, _decorator.responsiveLayout)(_class = (0, _rootNode2.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/function (_React$PureComponent) {(0, _inheritsLoose2.default)(InternalMenu, _React$PureComponent);function InternalMenu() {var _this;for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {args[_key] = arguments[_key];}_this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;_this.
63
73
 
64
74
 
65
75
 
@@ -426,8 +436,8 @@ InternalMenu = (0, _rootNode2.rootNode)(_class = (_temp = _class2 = /*#__PURE__*
426
436
  if (_this.state.scrollState !== scrollState) {
427
437
  _this.setState({ scrollState: scrollState });
428
438
  }
429
- };return _this;}var _proto = InternalMenu.prototype;_proto.componentDidMount = function componentDidMount() {this.setInitialSelection();this.calculateMaxHeight();};_proto.componentDidUpdate = function componentDidUpdate(prevProps) {if (this.shouldRecalculateMaxHeight(prevProps)) {this.calculateMaxHeight();}if (prevProps.maxHeight !== this.getProps().maxHeight) {this.setState({ maxHeight: this.props.maxHeight || 'none' });}};_proto.focus = function focus() {this.focusOnRootElement();};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = theme;return _this2.renderMain();});};_proto.renderMain = function renderMain() {var _cx3,_this3 = this;var enableIconPadding = _react.default.Children.toArray(this.props.children).some(function (x) {return /*#__PURE__*/_react.default.isValidElement(x) && x.props.icon;});if (this.isEmpty()) {return null;}var _this$getProps = this.getProps(),hasShadow = _this$getProps.hasShadow,width = _this$getProps.width,maxHeight = _this$getProps.maxHeight,preventWindowScroll = _this$getProps.preventWindowScroll;return /*#__PURE__*/_react.default.createElement("div", { "data-tid": InternalMenuDataTids.root, className: (0, _Emotion.cx)((_cx3 = {}, _cx3[_InternalMenu.styles.root(this.theme)] = true, _cx3[_InternalMenu.styles.shadow(this.theme)] = hasShadow, _cx3)), style: { width: width, maxHeight: this.state.maxHeight }, onKeyDown: this.handleKeyDown, ref: this.setRootNode, tabIndex: 0 }, this.props.header ? this.renderHeader() : null, /*#__PURE__*/_react.default.createElement(_ScrollContainer.ScrollContainer, { ref: this.refScrollContainer, maxHeight: maxHeight, preventWindowScroll: preventWindowScroll, onScrollStateChange: this.handleScrollStateChange }, _react.default.Children.map(this.props.children, function (child, index) {if (typeof child === 'string' || typeof child === 'number' || (0, _utils.isNullable)(child)) {return child;}if ( /*#__PURE__*/_react.default.isValidElement(child) && typeof child.type === 'string') {return child;}var modifiedChild = (0, _addIconPaddingIfPartOfMenu.addIconPaddingIfPartOfMenu)(child, enableIconPadding);if ((0, _isActiveElement.isActiveElement)(modifiedChild)) {var highlight = _this3.state.highlightedIndex === index;var ref = modifiedChild.ref;var originalRef = ref;if (highlight) {ref = function ref(menuItem) {return _this3.refHighlighted(originalRef, menuItem);};}return /*#__PURE__*/_react.default.cloneElement(modifiedChild, { ref: ref, state: highlight ? 'hover' : modifiedChild.props.state, onClick: _this3.select.bind(_this3, index, false), onMouseEnter: function onMouseEnter(event) {_this3.highlightItem(index);if ((0, _MenuItem.isMenuItem)(modifiedChild) && modifiedChild.props.onMouseEnter) {modifiedChild.props.onMouseEnter(event);}}, onMouseLeave: function onMouseLeave(event) {_this3.unhighlight();if ((0, _MenuItem.isMenuItem)(modifiedChild) && modifiedChild.props.onMouseLeave) {modifiedChild.props.onMouseLeave(event);}} });}return modifiedChild;})), this.props.footer ? this.renderFooter() : null);};_proto.refHighlighted = function refHighlighted(originalRef, menuItem) {this.highlighted = menuItem;if (!originalRef || typeof originalRef === 'string') {return;}if (typeof originalRef === 'function') {originalRef(menuItem);} else if (typeof originalRef === 'object') {// @ts-expect-error: See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065.
430
- originalRef.current = menuItem;}};_proto.select = function select(index, shouldHandleHref, event) {var item = childrenToArray(this.props.children)[index];if ((0, _isActiveElement.isActiveElement)(item)) {if (shouldHandleHref && item.props.href) {if (item.props.target) {window.open(item.props.href, item.props.target);} else {location.href = item.props.href;}}if (item.props.onClick) {item.props.onClick(event);}if (this.props.onItemClick) {this.props.onItemClick(event);}return true;}return false;};_proto.move = function move(step) {var _this4 = this;this.setState(function (state, props) {var children = childrenToArray(props.children);if (!children.some(_isActiveElement.isActiveElement)) {return null;}var index = state.highlightedIndex;do {index += step;if (!_this4.getProps().cyclicSelection && (index < 0 || index > children.length)) {return null;}if (index < 0) {index = children.length - 1;} else if (index > children.length) {index = 0;}var child = children[index];if ((0, _isActiveElement.isActiveElement)(child)) {return { highlightedIndex: index };}} while (index !== state.highlightedIndex);return null;}, this.scrollToSelected);};_proto.isEmpty = function isEmpty() {var children = this.props.children;return !children || !childrenToArray(children).filter(_utils.isNonNullable).length;};return InternalMenu;}(_react.default.PureComponent), _class2.__KONTUR_REACT_UI__ = 'InternalMenu', _class2.defaultProps = { width: 'auto', maxHeight: 300, hasShadow: true, preventWindowScroll: true, cyclicSelection: true, initialSelectedItemIndex: -1 }, _temp)) || _class;exports.InternalMenu = InternalMenu;
439
+ };return _this;}var _proto = InternalMenu.prototype;_proto.componentDidMount = function componentDidMount() {this.setInitialSelection();this.calculateMaxHeight();};_proto.componentDidUpdate = function componentDidUpdate(prevProps) {if (this.shouldRecalculateMaxHeight(prevProps)) {this.calculateMaxHeight();}if (prevProps.maxHeight !== this.getProps().maxHeight) {this.setState({ maxHeight: this.props.maxHeight || 'none' });}};_proto.focus = function focus() {this.focusOnRootElement();};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = theme;return _this2.renderMain();});};_proto.renderMain = function renderMain() {var _cx3,_this3 = this;var enableIconPadding = (0, _isIconPaddingEnabled.isIconPaddingEnabled)(this.props.children, this.props.preventIconsOffset);if (this.isEmpty()) {return null;}var _this$getProps = this.getProps(),hasShadow = _this$getProps.hasShadow,width = _this$getProps.width,maxHeight = _this$getProps.maxHeight,preventWindowScroll = _this$getProps.preventWindowScroll;var isMobile = this.isMobileLayout;return /*#__PURE__*/_react.default.createElement("div", { "data-tid": InternalMenuDataTids.root, className: (0, _Emotion.cx)((_cx3 = {}, _cx3[_InternalMenu.styles.root(this.theme)] = true, _cx3[_InternalMenu.styles.mobileRoot(this.theme)] = isMobile, _cx3[_InternalMenu.styles.shadow(this.theme)] = hasShadow, _cx3)), style: { width: width, maxHeight: this.state.maxHeight }, onKeyDown: this.handleKeyDown, ref: this.setRootNode, tabIndex: 0 }, this.props.header ? this.renderHeader() : null, /*#__PURE__*/_react.default.createElement(_ScrollContainer.ScrollContainer, { ref: this.refScrollContainer, maxHeight: maxHeight, preventWindowScroll: preventWindowScroll, onScrollStateChange: this.handleScrollStateChange }, _react.default.Children.map(this.props.children, function (child, index) {if (typeof child === 'string' || typeof child === 'number' || (0, _utils.isNullable)(child)) {return child;}if ( /*#__PURE__*/_react.default.isValidElement(child) && typeof child.type === 'string') {return child;}var modifiedChild = (0, _addIconPaddingIfPartOfMenu.addIconPaddingIfPartOfMenu)(child, enableIconPadding);if ((0, _isActiveElement.isActiveElement)(modifiedChild)) {var highlight = _this3.state.highlightedIndex === index;var ref = modifiedChild.ref;var originalRef = ref;if (highlight) {ref = function ref(menuItem) {return _this3.refHighlighted(originalRef, menuItem);};}return /*#__PURE__*/_react.default.cloneElement(modifiedChild, { ref: ref, state: highlight ? 'hover' : modifiedChild.props.state, onClick: _this3.select.bind(_this3, index, false), onMouseEnter: function onMouseEnter(event) {_this3.highlightItem(index);if ((0, _MenuItem.isMenuItem)(modifiedChild) && modifiedChild.props.onMouseEnter) {modifiedChild.props.onMouseEnter(event);}}, onMouseLeave: function onMouseLeave(event) {_this3.unhighlight();if ((0, _MenuItem.isMenuItem)(modifiedChild) && modifiedChild.props.onMouseLeave) {modifiedChild.props.onMouseLeave(event);}} });}return modifiedChild;})), this.props.footer ? this.renderFooter() : null);};_proto.refHighlighted = function refHighlighted(originalRef, menuItem) {this.highlighted = menuItem;if (!originalRef || typeof originalRef === 'string') {return;}if (typeof originalRef === 'function') {originalRef(menuItem);} else if (typeof originalRef === 'object') {// @ts-expect-error: See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065.
440
+ originalRef.current = menuItem;}};_proto.select = function select(index, shouldHandleHref, event) {var item = childrenToArray(this.props.children)[index];if ((0, _isActiveElement.isActiveElement)(item)) {if (shouldHandleHref && item.props.href) {if (item.props.target) {window.open(item.props.href, item.props.target);} else {location.href = item.props.href;}}if (item.props.onClick) {item.props.onClick(event);}if (this.props.onItemClick) {this.props.onItemClick(event);}return true;}return false;};_proto.move = function move(step) {var _this4 = this;this.setState(function (state, props) {var children = childrenToArray(props.children);if (!children.some(_isActiveElement.isActiveElement)) {return null;}var index = state.highlightedIndex;do {index += step;if (!_this4.getProps().cyclicSelection && (index < 0 || index > children.length)) {return null;}if (index < 0) {index = children.length - 1;} else if (index > children.length) {index = 0;}var child = children[index];if ((0, _isActiveElement.isActiveElement)(child)) {return { highlightedIndex: index };}} while (index !== state.highlightedIndex);return null;}, this.scrollToSelected);};_proto.isEmpty = function isEmpty() {var children = this.props.children;return !children || !childrenToArray(children).filter(_utils.isNonNullable).length;};return InternalMenu;}(_react.default.PureComponent), _class2.__KONTUR_REACT_UI__ = 'InternalMenu', _class2.defaultProps = { width: 'auto', maxHeight: 300, hasShadow: true, preventWindowScroll: true, cyclicSelection: true, initialSelectedItemIndex: -1 }, _temp)) || _class) || _class;exports.InternalMenu = InternalMenu;
431
441
 
432
442
  function childrenToArray(children) {
433
443
  var ret = [];
@@ -1 +1 @@
1
- {"version":3,"sources":["InternalMenu.tsx"],"names":["InternalMenuDataTids","root","InternalMenu","rootNode","getProps","defaultProps","state","highlightedIndex","maxHeight","scrollState","renderHeader","styles","wrapper","headerWrapper","el","header","contentWrapper","props","menuSeparatorWrapper","theme","renderMenuSeparatorWithNoMargin","renderFooter","footerWrapper","footer","ThemeFactory","create","menuSeparatorMarginY","focusOnRootElement","focus","shouldRecalculateMaxHeight","prevProps","children","prevMaxHeight","prevHeader","prevFooter","prevChildrenCount","React","Children","count","calculateMaxHeight","parsedMaxHeight","window","rootElementMaxHeight","getComputedStyle","parseFloat","calculatedMaxHeight","height","setState","setInitialSelection","i","initialSelectedItemIndex","moveDown","refScrollContainer","scrollContainer","scrollToSelected","highlighted","HTMLElement","scrollTo","highlightItem","index","unhighlight","moveUp","move","handleKeyDown","e","onKeyDown","defaultPrevented","preventDefault","onClick","handleScrollStateChange","componentDidMount","componentDidUpdate","render","renderMain","enableIconPadding","toArray","some","x","isValidElement","icon","isEmpty","hasShadow","width","preventWindowScroll","shadow","setRootNode","map","child","type","modifiedChild","highlight","ref","originalRef","menuItem","refHighlighted","cloneElement","select","bind","onMouseEnter","event","onMouseLeave","current","shouldHandleHref","item","childrenToArray","href","target","open","location","onItemClick","step","isActiveElement","cyclicSelection","length","filter","isNonNullable","PureComponent","__KONTUR_REACT_UI__","ret","forEach","push"],"mappings":"qYAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0E;;;;;;;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,EAIzCE,mBAAmB,EAAE,IAJoB,EAKzC6B,eAAe,EAAE,IALwB,EAMzC9D,wBAAwB,EAAE,CAAC,CANc,E;;AA+W7C,SAASsD,eAAT,CAAyBzE,QAAzB,EAAuE;AACrE,MAAMuF,GAAsB,GAAG,EAA/B;AACA;AACAlF,iBAAMC,QAAN,CAAekF,OAAf,CAAuBxF,QAAvB,EAAiC,UAACwD,KAAD,EAAW;AAC1C+B,IAAAA,GAAG,CAACE,IAAJ,CAASjC,KAAT;AACD,GAFD;AAGA,SAAO+B,GAAP;AACD","sourcesContent":["import React from 'react';\n\nimport { isHTMLElement } from '../../lib/SSRSafe';\nimport { isNonNullable, isNullable } from '../../lib/utils';\nimport { isKeyArrowDown, isKeyArrowUp, isKeyEnter } from '../../lib/events/keyboard/identifiers';\nimport { ScrollContainer, ScrollContainerScrollState } from '../../components/ScrollContainer';\nimport { isMenuItem, MenuItem, MenuItemProps } from '../../components/MenuItem';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { Nullable } from '../../typings/utility-types';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { cx } from '../../lib/theming/Emotion';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { getDOMRect } from '../../lib/dom/getDOMRect';\nimport { MenuSeparator } from '../../components/MenuSeparator';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\n\nimport { styles } from './InternalMenu.styles';\nimport { isActiveElement } from './isActiveElement';\nimport { addIconPaddingIfPartOfMenu } from './addIconPaddingIfPartOfMenu';\n\ninterface MenuProps {\n children?: React.ReactNode;\n hasShadow?: boolean;\n /**\n * Максимальная высота применяется только для скролл контейнера\n *\n * Высота `header` и `footer` в нее не включены\n */\n maxHeight?: number | string;\n onItemClick?: (event: React.SyntheticEvent<HTMLElement>) => void;\n width?: number | string;\n preventWindowScroll?: boolean;\n onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;\n\n header?: React.ReactNode;\n footer?: React.ReactNode;\n\n // Циклический перебор айтемов меню (по-дефолтну включен)\n cyclicSelection?: boolean;\n initialSelectedItemIndex?: number;\n}\n\ninterface MenuState {\n highlightedIndex: number;\n maxHeight: number | string;\n scrollState: ScrollContainerScrollState;\n}\n\nexport const InternalMenuDataTids = {\n root: 'InternalMenu__root',\n} as const;\n\ntype DefaultProps = Required<\n Pick<\n MenuProps,\n 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll' | 'cyclicSelection' | 'initialSelectedItemIndex'\n >\n>;\n\n@rootNode\nexport class InternalMenu extends React.PureComponent<MenuProps, MenuState> {\n public static __KONTUR_REACT_UI__ = 'InternalMenu';\n\n public static defaultProps: DefaultProps = {\n width: 'auto',\n maxHeight: 300,\n hasShadow: true,\n preventWindowScroll: true,\n cyclicSelection: true,\n initialSelectedItemIndex: -1,\n };\n\n private getProps = createPropsGetter(InternalMenu.defaultProps);\n\n public state: MenuState = {\n highlightedIndex: -1,\n maxHeight: this.getProps().maxHeight || 'none',\n scrollState: 'top',\n };\n\n private theme!: Theme;\n private scrollContainer: Nullable<ScrollContainer>;\n private highlighted: Nullable<MenuItem>;\n private setRootNode!: TSetRootNode;\n private header: Nullable<HTMLDivElement>;\n private footer: Nullable<HTMLDivElement>;\n\n public componentDidMount() {\n this.setInitialSelection();\n this.calculateMaxHeight();\n }\n\n public componentDidUpdate(prevProps: MenuProps) {\n if (this.shouldRecalculateMaxHeight(prevProps)) {\n this.calculateMaxHeight();\n }\n\n if (prevProps.maxHeight !== this.getProps().maxHeight) {\n this.setState({\n maxHeight: this.props.maxHeight || 'none',\n });\n }\n }\n\n public focus() {\n this.focusOnRootElement();\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const enableIconPadding = React.Children.toArray(this.props.children).some(\n (x) => React.isValidElement(x) && x.props.icon,\n );\n\n if (this.isEmpty()) {\n return null;\n }\n const { hasShadow, width, maxHeight, preventWindowScroll } = this.getProps();\n\n return (\n <div\n data-tid={InternalMenuDataTids.root}\n className={cx({\n [styles.root(this.theme)]: true,\n [styles.shadow(this.theme)]: hasShadow,\n })}\n style={{\n width,\n maxHeight: this.state.maxHeight,\n }}\n onKeyDown={this.handleKeyDown}\n ref={this.setRootNode}\n tabIndex={0}\n >\n {this.props.header ? this.renderHeader() : null}\n <ScrollContainer\n ref={this.refScrollContainer}\n maxHeight={maxHeight}\n preventWindowScroll={preventWindowScroll}\n onScrollStateChange={this.handleScrollStateChange}\n >\n {React.Children.map(this.props.children, (child, index) => {\n if (typeof child === 'string' || typeof child === 'number' || isNullable(child)) {\n return child;\n }\n if (React.isValidElement(child) && typeof child.type === 'string') {\n return child;\n }\n\n const modifiedChild = addIconPaddingIfPartOfMenu(child, enableIconPadding);\n\n if (isActiveElement(modifiedChild)) {\n const highlight = this.state.highlightedIndex === index;\n\n let ref = modifiedChild.ref;\n const originalRef = ref;\n if (highlight) {\n ref = (menuItem) => this.refHighlighted(originalRef, menuItem);\n }\n\n return React.cloneElement<MenuItemProps, MenuItem>(modifiedChild, {\n ref,\n state: highlight ? 'hover' : modifiedChild.props.state,\n onClick: this.select.bind(this, index, false),\n onMouseEnter: (event) => {\n this.highlightItem(index);\n if (isMenuItem(modifiedChild) && modifiedChild.props.onMouseEnter) {\n modifiedChild.props.onMouseEnter(event);\n }\n },\n onMouseLeave: (event) => {\n this.unhighlight();\n if (isMenuItem(modifiedChild) && modifiedChild.props.onMouseLeave) {\n modifiedChild.props.onMouseLeave(event);\n }\n },\n });\n }\n\n return modifiedChild;\n })}\n </ScrollContainer>\n {this.props.footer ? this.renderFooter() : null}\n </div>\n );\n }\n\n private renderHeader = () => {\n return (\n <div\n className={cx({\n [styles.wrapper()]: true,\n [styles.headerWrapper()]: true,\n })}\n ref={(el) => (this.header = el)}\n >\n <div className={styles.contentWrapper()}>{this.props.header}</div>\n <div className={styles.menuSeparatorWrapper(this.theme)}>\n {this.state.scrollState !== 'top' && this.renderMenuSeparatorWithNoMargin()}\n </div>\n </div>\n );\n };\n\n private renderFooter = () => {\n return (\n <div\n className={cx({\n [styles.wrapper()]: true,\n [styles.footerWrapper()]: true,\n })}\n ref={(el) => (this.footer = el)}\n >\n <div className={styles.menuSeparatorWrapper(this.theme)}>\n {this.state.scrollState !== 'bottom' && this.renderMenuSeparatorWithNoMargin()}\n </div>\n <div className={styles.contentWrapper()}>{this.props.footer}</div>\n </div>\n );\n };\n\n private renderMenuSeparatorWithNoMargin = () => {\n return (\n <ThemeContext.Provider value={ThemeFactory.create({ menuSeparatorMarginY: '0' }, this.theme)}>\n <MenuSeparator />\n </ThemeContext.Provider>\n );\n };\n\n private focusOnRootElement = (): void => {\n const rootNode = getRootNode(this);\n if (isHTMLElement(rootNode)) {\n rootNode?.focus();\n }\n };\n\n private shouldRecalculateMaxHeight = (prevProps: MenuProps): boolean => {\n const { header, footer, children } = this.props;\n const maxHeight = this.getProps().maxHeight;\n const prevMaxHeight = prevProps.maxHeight;\n const prevHeader = prevProps.header;\n const prevFooter = prevProps.footer;\n const prevChildrenCount = React.Children.count(prevProps.children);\n\n return (\n maxHeight !== prevMaxHeight ||\n footer !== prevFooter ||\n header !== prevHeader ||\n React.Children.count(children) !== prevChildrenCount\n );\n };\n\n private calculateMaxHeight = () => {\n const maxHeight = this.getProps().maxHeight;\n let parsedMaxHeight = maxHeight;\n const rootNode = getRootNode(this);\n\n if (typeof maxHeight === 'string' && typeof window !== 'undefined' && rootNode) {\n const rootElementMaxHeight = window.getComputedStyle(rootNode).maxHeight;\n\n if (rootElementMaxHeight) {\n parsedMaxHeight = parseFloat(rootElementMaxHeight);\n }\n }\n\n const calculatedMaxHeight =\n typeof parsedMaxHeight === 'number'\n ? parsedMaxHeight +\n ((this.header && getDOMRect(this.header).height) || 0) +\n ((this.footer && getDOMRect(this.footer).height) || 0)\n : maxHeight;\n\n this.setState({\n maxHeight: calculatedMaxHeight || 'none',\n });\n };\n\n private setInitialSelection = () => {\n for (let i = this.getProps().initialSelectedItemIndex; i > -1; i--) {\n this.moveDown();\n }\n };\n\n private refScrollContainer = (scrollContainer: Nullable<ScrollContainer>) => {\n this.scrollContainer = scrollContainer;\n };\n\n private refHighlighted(\n originalRef: string | ((instance: MenuItem | null) => void) | React.RefObject<MenuItem> | null | undefined,\n menuItem: MenuItem | null,\n ) {\n this.highlighted = menuItem;\n\n if (!originalRef || typeof originalRef === 'string') {\n return;\n }\n\n if (typeof originalRef === 'function') {\n originalRef(menuItem);\n } else if (typeof originalRef === 'object') {\n // @ts-expect-error: See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065.\n originalRef.current = menuItem;\n }\n }\n\n private scrollToSelected = () => {\n if (this.scrollContainer && this.highlighted) {\n const rootNode = getRootNode(this.highlighted);\n // TODO: Remove this check once IF-647 is resolved\n if (rootNode instanceof HTMLElement) {\n this.scrollContainer.scrollTo(rootNode);\n }\n }\n };\n\n private select(index: number, shouldHandleHref: boolean, event: React.SyntheticEvent<HTMLElement>): boolean {\n const item = childrenToArray(this.props.children)[index];\n\n if (isActiveElement(item)) {\n if (shouldHandleHref && item.props.href) {\n if (item.props.target) {\n window.open(item.props.href, item.props.target);\n } else {\n location.href = item.props.href;\n }\n }\n if (item.props.onClick) {\n item.props.onClick(event as React.MouseEvent<HTMLElement>);\n }\n if (this.props.onItemClick) {\n this.props.onItemClick(event);\n }\n return true;\n }\n return false;\n }\n\n private highlightItem = (index: number): void => {\n this.setState({ highlightedIndex: index });\n\n const rootNode = getRootNode(this);\n if (isHTMLElement(rootNode)) {\n rootNode?.focus();\n }\n };\n\n private unhighlight = () => {\n this.setState({ highlightedIndex: -1 });\n };\n\n private move(step: number) {\n this.setState((state, props) => {\n const children = childrenToArray(props.children);\n if (!children.some(isActiveElement)) {\n return null;\n }\n let index = state.highlightedIndex;\n do {\n index += step;\n if (!this.getProps().cyclicSelection && (index < 0 || index > children.length)) {\n return null;\n }\n\n if (index < 0) {\n index = children.length - 1;\n } else if (index > children.length) {\n index = 0;\n }\n\n const child = children[index];\n if (isActiveElement(child)) {\n return { highlightedIndex: index };\n }\n } while (index !== state.highlightedIndex);\n return null;\n }, this.scrollToSelected);\n }\n\n private moveUp = () => {\n this.move(-1);\n };\n\n private moveDown = () => {\n this.move(1);\n };\n\n private isEmpty() {\n const { children } = this.props;\n return !children || !childrenToArray(children).filter(isNonNullable).length;\n }\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>): void => {\n if (typeof this.props.onKeyDown === 'function') {\n this.props.onKeyDown(e);\n }\n\n if (e.defaultPrevented) {\n return;\n }\n\n if (isKeyArrowUp(e)) {\n e.preventDefault();\n this.moveUp();\n } else if (isKeyArrowDown(e)) {\n e.preventDefault();\n this.moveDown();\n } else if (isKeyEnter(e)) {\n if (this.highlighted && this.highlighted.props.onClick) {\n this.highlighted.props.onClick(e);\n }\n }\n };\n\n private handleScrollStateChange = (scrollState: ScrollContainerScrollState) => {\n if (this.state.scrollState !== scrollState) {\n this.setState({ scrollState });\n }\n };\n}\n\nfunction childrenToArray(children: React.ReactNode): React.ReactNode[] {\n const ret: React.ReactNode[] = [];\n // Use forEach instead of map to avoid cloning for key unifying.\n React.Children.forEach(children, (child) => {\n ret.push(child);\n });\n return ret;\n}\n"]}
1
+ {"version":3,"sources":["InternalMenu.tsx"],"names":["InternalMenuDataTids","root","InternalMenu","responsiveLayout","rootNode","getProps","defaultProps","state","highlightedIndex","maxHeight","scrollState","renderHeader","styles","wrapper","headerWrapper","el","header","contentWrapper","props","menuSeparatorWrapper","theme","renderMenuSeparatorWithNoMargin","renderFooter","footerWrapper","footer","ThemeFactory","create","menuSeparatorMarginY","focusOnRootElement","focus","shouldRecalculateMaxHeight","prevProps","children","prevMaxHeight","prevHeader","prevFooter","prevChildrenCount","React","Children","count","calculateMaxHeight","parsedMaxHeight","window","rootElementMaxHeight","getComputedStyle","parseFloat","calculatedMaxHeight","height","setState","setInitialSelection","i","initialSelectedItemIndex","moveDown","refScrollContainer","scrollContainer","scrollToSelected","highlighted","HTMLElement","scrollTo","highlightItem","index","unhighlight","moveUp","move","handleKeyDown","e","onKeyDown","defaultPrevented","preventDefault","onClick","handleScrollStateChange","componentDidMount","componentDidUpdate","render","renderMain","enableIconPadding","preventIconsOffset","isEmpty","hasShadow","width","preventWindowScroll","isMobile","isMobileLayout","mobileRoot","shadow","setRootNode","map","child","isValidElement","type","modifiedChild","highlight","ref","originalRef","menuItem","refHighlighted","cloneElement","select","bind","onMouseEnter","event","onMouseLeave","current","shouldHandleHref","item","childrenToArray","href","target","open","location","onItemClick","step","some","isActiveElement","cyclicSelection","length","filter","isNonNullable","PureComponent","__KONTUR_REACT_UI__","ret","forEach","push"],"mappings":"qYAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCO,IAAMA,oBAAoB,GAAG;AAClCC,EAAAA,IAAI,EAAE,oBAD4B,EAA7B,C;;;;;;;;;AAUP;AACA;AACA,G;;;AAGaC,Y,OAFZC,2B,eACAC,mB;;;;;;;;;;;;AAaSC,IAAAA,Q,GAAW,0CAAkBH,YAAY,CAACI,YAA/B,C;;AAEZC,IAAAA,K,GAAmB;AACxBC,MAAAA,gBAAgB,EAAE,CAAC,CADK;AAExBC,MAAAA,SAAS,EAAE,MAAKJ,QAAL,GAAgBI,SAAhB,IAA6B,MAFhB;AAGxBC,MAAAA,WAAW,EAAE,KAHW,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HlBC,IAAAA,Y,GAAe,YAAM;AAC3B;AACE;AACE,UAAA,SAAS,EAAE;AACRC,+BAAOC,OAAP,EADQ,IACW,IADX;A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2B,KAAK,GAAGvD,QAAQ,CAAC4B,KAAD,CAAtB,CACA,IAAI,sCAAgB2B,KAAhB,CAAJ,EAA4B,CAC1B,OAAO,EAAE/E,gBAAgB,EAAEoD,KAApB,EAAP,CACD,CACF,CAhBD,QAgBSA,KAAK,KAAKrD,KAAK,CAACC,gBAhBzB,EAiBA,OAAO,IAAP,CACD,CAxBD,EAwBG,KAAK+C,gBAxBR,EAyBD,C,QAUOsB,O,GAAR,mBAAkB,CAChB,IAAQ7C,QAAR,GAAqB,KAAKd,KAA1B,CAAQc,QAAR,CACA,OAAO,CAACA,QAAD,IAAa,CAACyE,eAAe,CAACzE,QAAD,CAAf,CAA0BoF,MAA1B,CAAiCC,oBAAjC,EAAgDF,MAArE,CACD,C,uBAnV+B9E,eAAMiF,a,WACxBC,mB,GAAsB,c,UAEtBjH,Y,GAA6B,EACzCyE,KAAK,EAAE,MADkC,EAEzCtE,SAAS,EAAE,GAF8B,EAGzCqE,SAAS,EAAE,IAH8B,EAIzCE,mBAAmB,EAAE,IAJoB,EAKzCkC,eAAe,EAAE,IALwB,EAMzC/D,wBAAwB,EAAE,CAAC,CANc,E;;AA+W7C,SAASsD,eAAT,CAAyBzE,QAAzB,EAAuE;AACrE,MAAMwF,GAAsB,GAAG,EAA/B;AACA;AACAnF,iBAAMC,QAAN,CAAemF,OAAf,CAAuBzF,QAAvB,EAAiC,UAACuD,KAAD,EAAW;AAC1CiC,IAAAA,GAAG,CAACE,IAAJ,CAASnC,KAAT;AACD,GAFD;AAGA,SAAOiC,GAAP;AACD","sourcesContent":["import React from 'react';\n\nimport { responsiveLayout } from '../../components/ResponsiveLayout/decorator';\nimport { isHTMLElement } from '../../lib/SSRSafe';\nimport { isNonNullable, isNullable } from '../../lib/utils';\nimport { isKeyArrowDown, isKeyArrowUp, isKeyEnter } from '../../lib/events/keyboard/identifiers';\nimport { ScrollContainer, ScrollContainerScrollState } from '../../components/ScrollContainer';\nimport { isMenuItem, MenuItem, MenuItemProps } from '../../components/MenuItem';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { Nullable } from '../../typings/utility-types';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { Theme } from '../../lib/theming/Theme';\nimport { cx } from '../../lib/theming/Emotion';\nimport { getRootNode, rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { getDOMRect } from '../../lib/dom/getDOMRect';\nimport { MenuSeparator } from '../../components/MenuSeparator';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\n\nimport { styles } from './InternalMenu.styles';\nimport { isActiveElement } from './isActiveElement';\nimport { addIconPaddingIfPartOfMenu } from './addIconPaddingIfPartOfMenu';\nimport { isIconPaddingEnabled } from './isIconPaddingEnabled';\n\nexport interface InternalMenuProps {\n children?: React.ReactNode;\n hasShadow?: boolean;\n /**\n * Максимальная высота применяется только для скролл контейнера\n *\n * Высота `header` и `footer` в нее не включены\n */\n maxHeight?: number | string;\n onItemClick?: (event: React.SyntheticEvent<HTMLElement>) => void;\n width?: number | string;\n preventWindowScroll?: boolean;\n /**\n * Предотвращает выравнивание текста всех пунктов меню относительно друг друга.\n * Так, если хотя бы у одного пункта меню есть иконка, текст в остальных пунктах меню будет выровнен относительно пункта меню с иконкой\n */\n preventIconsOffset?: boolean;\n onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;\n\n header?: React.ReactNode;\n footer?: React.ReactNode;\n\n // Циклический перебор айтемов меню (по-дефолтну включен)\n cyclicSelection?: boolean;\n initialSelectedItemIndex?: number;\n}\n\ninterface MenuState {\n highlightedIndex: number;\n maxHeight: number | string;\n scrollState: ScrollContainerScrollState;\n}\n\nexport const InternalMenuDataTids = {\n root: 'InternalMenu__root',\n} as const;\n\ntype DefaultProps = Required<\n Pick<\n InternalMenuProps,\n 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll' | 'cyclicSelection' | 'initialSelectedItemIndex'\n >\n>;\n/**\n * @deprecated use Menu component instead\n */\n@responsiveLayout\n@rootNode\nexport class InternalMenu extends React.PureComponent<InternalMenuProps, MenuState> {\n public static __KONTUR_REACT_UI__ = 'InternalMenu';\n\n public static defaultProps: DefaultProps = {\n width: 'auto',\n maxHeight: 300,\n hasShadow: true,\n preventWindowScroll: true,\n cyclicSelection: true,\n initialSelectedItemIndex: -1,\n };\n\n private getProps = createPropsGetter(InternalMenu.defaultProps);\n\n public state: MenuState = {\n highlightedIndex: -1,\n maxHeight: this.getProps().maxHeight || 'none',\n scrollState: 'top',\n };\n\n private theme!: Theme;\n private scrollContainer: Nullable<ScrollContainer>;\n private highlighted: Nullable<MenuItem>;\n private setRootNode!: TSetRootNode;\n private header: Nullable<HTMLDivElement>;\n private footer: Nullable<HTMLDivElement>;\n private isMobileLayout!: boolean;\n\n public componentDidMount() {\n this.setInitialSelection();\n this.calculateMaxHeight();\n }\n\n public componentDidUpdate(prevProps: InternalMenuProps) {\n if (this.shouldRecalculateMaxHeight(prevProps)) {\n this.calculateMaxHeight();\n }\n\n if (prevProps.maxHeight !== this.getProps().maxHeight) {\n this.setState({\n maxHeight: this.props.maxHeight || 'none',\n });\n }\n }\n\n public focus() {\n this.focusOnRootElement();\n }\n\n public render() {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const enableIconPadding = isIconPaddingEnabled(this.props.children, this.props.preventIconsOffset);\n\n if (this.isEmpty()) {\n return null;\n }\n const { hasShadow, width, maxHeight, preventWindowScroll } = this.getProps();\n const isMobile = this.isMobileLayout;\n return (\n <div\n data-tid={InternalMenuDataTids.root}\n className={cx({\n [styles.root(this.theme)]: true,\n [styles.mobileRoot(this.theme)]: isMobile,\n [styles.shadow(this.theme)]: hasShadow,\n })}\n style={{\n width,\n maxHeight: this.state.maxHeight,\n }}\n onKeyDown={this.handleKeyDown}\n ref={this.setRootNode}\n tabIndex={0}\n >\n {this.props.header ? this.renderHeader() : null}\n <ScrollContainer\n ref={this.refScrollContainer}\n maxHeight={maxHeight}\n preventWindowScroll={preventWindowScroll}\n onScrollStateChange={this.handleScrollStateChange}\n >\n {React.Children.map(this.props.children, (child, index) => {\n if (typeof child === 'string' || typeof child === 'number' || isNullable(child)) {\n return child;\n }\n if (React.isValidElement(child) && typeof child.type === 'string') {\n return child;\n }\n\n const modifiedChild = addIconPaddingIfPartOfMenu(child, enableIconPadding);\n\n if (isActiveElement(modifiedChild)) {\n const highlight = this.state.highlightedIndex === index;\n\n let ref = modifiedChild.ref;\n const originalRef = ref;\n if (highlight) {\n ref = (menuItem) => this.refHighlighted(originalRef, menuItem);\n }\n\n return React.cloneElement<MenuItemProps, MenuItem>(modifiedChild, {\n ref,\n state: highlight ? 'hover' : modifiedChild.props.state,\n onClick: this.select.bind(this, index, false),\n onMouseEnter: (event) => {\n this.highlightItem(index);\n if (isMenuItem(modifiedChild) && modifiedChild.props.onMouseEnter) {\n modifiedChild.props.onMouseEnter(event);\n }\n },\n onMouseLeave: (event) => {\n this.unhighlight();\n if (isMenuItem(modifiedChild) && modifiedChild.props.onMouseLeave) {\n modifiedChild.props.onMouseLeave(event);\n }\n },\n });\n }\n\n return modifiedChild;\n })}\n </ScrollContainer>\n {this.props.footer ? this.renderFooter() : null}\n </div>\n );\n }\n\n private renderHeader = () => {\n return (\n <div\n className={cx({\n [styles.wrapper()]: true,\n [styles.headerWrapper()]: true,\n })}\n ref={(el) => (this.header = el)}\n >\n <div className={styles.contentWrapper()}>{this.props.header}</div>\n <div className={styles.menuSeparatorWrapper(this.theme)}>\n {this.state.scrollState !== 'top' && this.renderMenuSeparatorWithNoMargin()}\n </div>\n </div>\n );\n };\n\n private renderFooter = () => {\n return (\n <div\n className={cx({\n [styles.wrapper()]: true,\n [styles.footerWrapper()]: true,\n })}\n ref={(el) => (this.footer = el)}\n >\n <div className={styles.menuSeparatorWrapper(this.theme)}>\n {this.state.scrollState !== 'bottom' && this.renderMenuSeparatorWithNoMargin()}\n </div>\n <div className={styles.contentWrapper()}>{this.props.footer}</div>\n </div>\n );\n };\n\n private renderMenuSeparatorWithNoMargin = () => {\n return (\n <ThemeContext.Provider value={ThemeFactory.create({ menuSeparatorMarginY: '0' }, this.theme)}>\n <MenuSeparator />\n </ThemeContext.Provider>\n );\n };\n\n private focusOnRootElement = (): void => {\n const rootNode = getRootNode(this);\n if (isHTMLElement(rootNode)) {\n rootNode?.focus();\n }\n };\n\n private shouldRecalculateMaxHeight = (prevProps: InternalMenuProps): boolean => {\n const { header, footer, children } = this.props;\n const maxHeight = this.getProps().maxHeight;\n const prevMaxHeight = prevProps.maxHeight;\n const prevHeader = prevProps.header;\n const prevFooter = prevProps.footer;\n const prevChildrenCount = React.Children.count(prevProps.children);\n\n return (\n maxHeight !== prevMaxHeight ||\n footer !== prevFooter ||\n header !== prevHeader ||\n React.Children.count(children) !== prevChildrenCount\n );\n };\n\n private calculateMaxHeight = () => {\n const maxHeight = this.getProps().maxHeight;\n let parsedMaxHeight = maxHeight;\n const rootNode = getRootNode(this);\n\n if (typeof maxHeight === 'string' && typeof window !== 'undefined' && rootNode) {\n const rootElementMaxHeight = window.getComputedStyle(rootNode).maxHeight;\n\n if (rootElementMaxHeight) {\n parsedMaxHeight = parseFloat(rootElementMaxHeight);\n }\n }\n\n const calculatedMaxHeight =\n typeof parsedMaxHeight === 'number'\n ? parsedMaxHeight +\n ((this.header && getDOMRect(this.header).height) || 0) +\n ((this.footer && getDOMRect(this.footer).height) || 0)\n : maxHeight;\n\n this.setState({\n maxHeight: calculatedMaxHeight || 'none',\n });\n };\n\n private setInitialSelection = () => {\n for (let i = this.getProps().initialSelectedItemIndex; i > -1; i--) {\n this.moveDown();\n }\n };\n\n private refScrollContainer = (scrollContainer: Nullable<ScrollContainer>) => {\n this.scrollContainer = scrollContainer;\n };\n\n private refHighlighted(\n originalRef: string | ((instance: MenuItem | null) => void) | React.RefObject<MenuItem> | null | undefined,\n menuItem: MenuItem | null,\n ) {\n this.highlighted = menuItem;\n\n if (!originalRef || typeof originalRef === 'string') {\n return;\n }\n\n if (typeof originalRef === 'function') {\n originalRef(menuItem);\n } else if (typeof originalRef === 'object') {\n // @ts-expect-error: See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065.\n originalRef.current = menuItem;\n }\n }\n\n private scrollToSelected = () => {\n if (this.scrollContainer && this.highlighted) {\n const rootNode = getRootNode(this.highlighted);\n // TODO: Remove this check once IF-647 is resolved\n if (rootNode instanceof HTMLElement) {\n this.scrollContainer.scrollTo(rootNode);\n }\n }\n };\n\n private select(index: number, shouldHandleHref: boolean, event: React.SyntheticEvent<HTMLElement>): boolean {\n const item = childrenToArray(this.props.children)[index];\n\n if (isActiveElement(item)) {\n if (shouldHandleHref && item.props.href) {\n if (item.props.target) {\n window.open(item.props.href, item.props.target);\n } else {\n location.href = item.props.href;\n }\n }\n if (item.props.onClick) {\n item.props.onClick(event as React.MouseEvent<HTMLElement>);\n }\n if (this.props.onItemClick) {\n this.props.onItemClick(event);\n }\n return true;\n }\n return false;\n }\n\n private highlightItem = (index: number): void => {\n this.setState({ highlightedIndex: index });\n\n const rootNode = getRootNode(this);\n if (isHTMLElement(rootNode)) {\n rootNode?.focus();\n }\n };\n\n private unhighlight = () => {\n this.setState({ highlightedIndex: -1 });\n };\n\n private move(step: number) {\n this.setState((state, props) => {\n const children = childrenToArray(props.children);\n if (!children.some(isActiveElement)) {\n return null;\n }\n let index = state.highlightedIndex;\n do {\n index += step;\n if (!this.getProps().cyclicSelection && (index < 0 || index > children.length)) {\n return null;\n }\n\n if (index < 0) {\n index = children.length - 1;\n } else if (index > children.length) {\n index = 0;\n }\n\n const child = children[index];\n if (isActiveElement(child)) {\n return { highlightedIndex: index };\n }\n } while (index !== state.highlightedIndex);\n return null;\n }, this.scrollToSelected);\n }\n\n private moveUp = () => {\n this.move(-1);\n };\n\n private moveDown = () => {\n this.move(1);\n };\n\n private isEmpty() {\n const { children } = this.props;\n return !children || !childrenToArray(children).filter(isNonNullable).length;\n }\n\n private handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>): void => {\n if (typeof this.props.onKeyDown === 'function') {\n this.props.onKeyDown(e);\n }\n\n if (e.defaultPrevented) {\n return;\n }\n\n if (isKeyArrowUp(e)) {\n e.preventDefault();\n this.moveUp();\n } else if (isKeyArrowDown(e)) {\n e.preventDefault();\n this.moveDown();\n } else if (isKeyEnter(e)) {\n if (this.highlighted && this.highlighted.props.onClick) {\n this.highlighted.props.onClick(e);\n }\n }\n };\n\n private handleScrollStateChange = (scrollState: ScrollContainerScrollState) => {\n if (this.state.scrollState !== scrollState) {\n this.setState({ scrollState });\n }\n };\n}\n\nfunction childrenToArray(children: React.ReactNode): React.ReactNode[] {\n const ret: React.ReactNode[] = [];\n // Use forEach instead of map to avoid cloning for key unifying.\n React.Children.forEach(children, (child) => {\n ret.push(child);\n });\n return ret;\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  import { Theme } from '../../lib/theming/Theme';
2
2
  export declare const styles: {
3
3
  root(t: Theme): string;
4
+ mobileRoot(t: Theme): string;
4
5
  shadow(t: Theme): string;
5
6
  wrapper(): string;
6
7
  headerWrapper(): string;
@@ -1,4 +1,4 @@
1
- "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.styles = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
1
+ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.styles = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
2
2
 
3
3
 
4
4
  var styles = (0, _Emotion.memoizeStyle)({
@@ -11,15 +11,21 @@ var styles = (0, _Emotion.memoizeStyle)({
11
11
 
12
12
  },
13
13
 
14
+ mobileRoot: function mobileRoot(t) {
15
+ return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n padding: 0 ", ";\n "])),
16
+ t.mobileMenuPaddingX);
17
+
18
+ },
19
+
14
20
  shadow: function shadow(t) {
15
- return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n border: ", ";\n box-shadow: ", ";\n "])),
21
+ return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n border: ", ";\n box-shadow: ", ";\n "])),
16
22
  t.menuBorder,
17
23
  t.menuShadow);
18
24
 
19
25
  },
20
26
 
21
27
  wrapper: function wrapper() {
22
- return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n position: relative;\n z-index: 1;\n width: 100%;\n overflow: hidden;\n line-height: 18px;\n box-sizing: border-box;\n "])));
28
+ return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n position: relative;\n z-index: 1;\n width: 100%;\n overflow: hidden;\n line-height: 18px;\n box-sizing: border-box;\n "])));
23
29
 
24
30
 
25
31
 
@@ -30,25 +36,25 @@ var styles = (0, _Emotion.memoizeStyle)({
30
36
  },
31
37
 
32
38
  headerWrapper: function headerWrapper() {
33
- return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n top: -5px;\n "])));
39
+ return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n top: -5px;\n "])));
34
40
 
35
41
 
36
42
  },
37
43
 
38
44
  footerWrapper: function footerWrapper() {
39
- return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n bottom: -5px;\n "])));
45
+ return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n bottom: -5px;\n "])));
40
46
 
41
47
 
42
48
  },
43
49
 
44
50
  contentWrapper: function contentWrapper() {
45
- return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n padding: 6px 18px 7px 8px;\n "])));
51
+ return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n padding: 6px 18px 7px 8px;\n "])));
46
52
 
47
53
 
48
54
  },
49
55
 
50
56
  menuSeparatorWrapper: function menuSeparatorWrapper(t) {
51
- return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n height: ", ";\n "])),
57
+ return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n height: ", ";\n "])),
52
58
  t.menuSeparatorBorderWidth);
53
59
 
54
60
  } });exports.styles = styles;
@@ -1 +1 @@
1
- {"version":3,"sources":["InternalMenu.styles.ts"],"names":["styles","root","t","css","internalMenuPaddingY","menuPaddingX","bgSecondary","shadow","menuBorder","menuShadow","wrapper","headerWrapper","footerWrapper","contentWrapper","menuSeparatorWrapper","menuSeparatorBorderWidth"],"mappings":"4QAAA,oD;;;AAGO,IAAMA,MAAM,GAAG,2BAAa;AACjCC,EAAAA,IADiC,gBAC5BC,CAD4B,EAClB;AACb,eAAOC,YAAP;AACaD,IAAAA,CAAC,CAACE,oBADf,EACuCF,CAAC,CAACG,YADzC;;;AAIgBH,IAAAA,CAAC,CAACI,WAJlB;;AAMD,GARgC;;AAUjCC,EAAAA,MAViC,kBAU1BL,CAV0B,EAUhB;AACf,eAAOC,YAAP;AACYD,IAAAA,CAAC,CAACM,UADd;AAEgBN,IAAAA,CAAC,CAACO,UAFlB;;AAID,GAfgC;;AAiBjCC,EAAAA,OAjBiC,qBAiBvB;AACR,eAAOP,YAAP;;;;;;;;AAQD,GA1BgC;;AA4BjCQ,EAAAA,aA5BiC,2BA4BjB;AACd,eAAOR,YAAP;;;AAGD,GAhCgC;;AAkCjCS,EAAAA,aAlCiC,2BAkCjB;AACd,eAAOT,YAAP;;;AAGD,GAtCgC;;AAwCjCU,EAAAA,cAxCiC,4BAwChB;AACf,eAAOV,YAAP;;;AAGD,GA5CgC;;AA8CjCW,EAAAA,oBA9CiC,gCA8CZZ,CA9CY,EA8CF;AAC7B,eAAOC,YAAP;AACYD,IAAAA,CAAC,CAACa,wBADd;;AAGD,GAlDgC,EAAb,CAAf,C","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nexport const styles = memoizeStyle({\n root(t: Theme) {\n return css`\n padding: ${t.internalMenuPaddingY} ${t.menuPaddingX};\n outline: none;\n box-sizing: content-box;\n background: ${t.bgSecondary};\n `;\n },\n\n shadow(t: Theme) {\n return css`\n border: ${t.menuBorder};\n box-shadow: ${t.menuShadow};\n `;\n },\n\n wrapper() {\n return css`\n position: relative;\n z-index: 1;\n width: 100%;\n overflow: hidden;\n line-height: 18px;\n box-sizing: border-box;\n `;\n },\n\n headerWrapper() {\n return css`\n top: -5px;\n `;\n },\n\n footerWrapper() {\n return css`\n bottom: -5px;\n `;\n },\n\n contentWrapper() {\n return css`\n padding: 6px 18px 7px 8px;\n `;\n },\n\n menuSeparatorWrapper(t: Theme) {\n return css`\n height: ${t.menuSeparatorBorderWidth};\n `;\n },\n});\n"]}
1
+ {"version":3,"sources":["InternalMenu.styles.ts"],"names":["styles","root","t","css","internalMenuPaddingY","menuPaddingX","bgSecondary","mobileRoot","mobileMenuPaddingX","shadow","menuBorder","menuShadow","wrapper","headerWrapper","footerWrapper","contentWrapper","menuSeparatorWrapper","menuSeparatorBorderWidth"],"mappings":"4QAAA,oD;;;AAGO,IAAMA,MAAM,GAAG,2BAAa;AACjCC,EAAAA,IADiC,gBAC5BC,CAD4B,EAClB;AACb,eAAOC,YAAP;AACaD,IAAAA,CAAC,CAACE,oBADf,EACuCF,CAAC,CAACG,YADzC;;;AAIgBH,IAAAA,CAAC,CAACI,WAJlB;;AAMD,GARgC;;AAUjCC,EAAAA,UAViC,sBAUtBL,CAVsB,EAUZ;AACnB,eAAOC,YAAP;AACeD,IAAAA,CAAC,CAACM,kBADjB;;AAGD,GAdgC;;AAgBjCC,EAAAA,MAhBiC,kBAgB1BP,CAhB0B,EAgBhB;AACf,eAAOC,YAAP;AACYD,IAAAA,CAAC,CAACQ,UADd;AAEgBR,IAAAA,CAAC,CAACS,UAFlB;;AAID,GArBgC;;AAuBjCC,EAAAA,OAvBiC,qBAuBvB;AACR,eAAOT,YAAP;;;;;;;;AAQD,GAhCgC;;AAkCjCU,EAAAA,aAlCiC,2BAkCjB;AACd,eAAOV,YAAP;;;AAGD,GAtCgC;;AAwCjCW,EAAAA,aAxCiC,2BAwCjB;AACd,eAAOX,YAAP;;;AAGD,GA5CgC;;AA8CjCY,EAAAA,cA9CiC,4BA8ChB;AACf,eAAOZ,YAAP;;;AAGD,GAlDgC;;AAoDjCa,EAAAA,oBApDiC,gCAoDZd,CApDY,EAoDF;AAC7B,eAAOC,YAAP;AACYD,IAAAA,CAAC,CAACe,wBADd;;AAGD,GAxDgC,EAAb,CAAf,C","sourcesContent":["import { css, memoizeStyle } from '../../lib/theming/Emotion';\nimport { Theme } from '../../lib/theming/Theme';\n\nexport const styles = memoizeStyle({\n root(t: Theme) {\n return css`\n padding: ${t.internalMenuPaddingY} ${t.menuPaddingX};\n outline: none;\n box-sizing: content-box;\n background: ${t.bgSecondary};\n `;\n },\n\n mobileRoot(t: Theme) {\n return css`\n padding: 0 ${t.mobileMenuPaddingX};\n `;\n },\n\n shadow(t: Theme) {\n return css`\n border: ${t.menuBorder};\n box-shadow: ${t.menuShadow};\n `;\n },\n\n wrapper() {\n return css`\n position: relative;\n z-index: 1;\n width: 100%;\n overflow: hidden;\n line-height: 18px;\n box-sizing: border-box;\n `;\n },\n\n headerWrapper() {\n return css`\n top: -5px;\n `;\n },\n\n footerWrapper() {\n return css`\n bottom: -5px;\n `;\n },\n\n contentWrapper() {\n return css`\n padding: 6px 18px 7px 8px;\n `;\n },\n\n menuSeparatorWrapper(t: Theme) {\n return css`\n height: ${t.menuSeparatorBorderWidth};\n `;\n },\n});\n"]}
@@ -0,0 +1,2 @@
1
+ import { InternalMenuProps } from './InternalMenu';
2
+ export declare const isIconPaddingEnabled: (children: InternalMenuProps['children'], preventIconsOffset: InternalMenuProps['preventIconsOffset']) => boolean;
@@ -0,0 +1,9 @@
1
+ "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.isIconPaddingEnabled = void 0;var _react = _interopRequireDefault(require("react"));
2
+
3
+
4
+
5
+ var isIconPaddingEnabled = function isIconPaddingEnabled(
6
+ children,
7
+ preventIconsOffset) {return (
8
+
9
+ Boolean(!preventIconsOffset && _react.default.Children.toArray(children).some(function (x) {return /*#__PURE__*/_react.default.isValidElement(x) && x.props.icon;})));};exports.isIconPaddingEnabled = isIconPaddingEnabled;
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["isIconPaddingEnabled.ts"],"names":["isIconPaddingEnabled","children","preventIconsOffset","Boolean","React","Children","toArray","some","x","isValidElement","props","icon"],"mappings":"kKAAA;;;;AAIO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAuB;AAClCC,QADkC;AAElCC,kBAFkC;;AAIlCC,IAAAA,OAAO,CAAC,CAACD,kBAAD,IAAuBE,eAAMC,QAAN,CAAeC,OAAf,CAAuBL,QAAvB,EAAiCM,IAAjC,CAAsC,UAACC,CAAD,UAAO,4BAAMC,cAAN,CAAqBD,CAArB,KAA2BA,CAAC,CAACE,KAAF,CAAQC,IAA1C,EAAtC,CAAxB,CAJ2B,GAA7B,C","sourcesContent":["import React from 'react';\n\nimport { InternalMenuProps } from './InternalMenu';\n\nexport const isIconPaddingEnabled = (\n children: InternalMenuProps['children'],\n preventIconsOffset: InternalMenuProps['preventIconsOffset'],\n) =>\n Boolean(!preventIconsOffset && React.Children.toArray(children).some((x) => React.isValidElement(x) && x.props.icon));\n"]}
@@ -1,9 +1,15 @@
1
- import React from 'react';
2
- export interface MenuProps {
1
+ import React, { HTMLAttributes } from 'react';
2
+ import { ScrollContainerScrollState } from '../../components/ScrollContainer';
3
+ export interface MenuProps extends Pick<HTMLAttributes<HTMLDivElement>, 'id'> {
3
4
  children: React.ReactNode;
4
5
  hasShadow?: boolean;
6
+ /**
7
+ * Максимальная высота применяется только для скролл контейнера
8
+ *
9
+ * Высота `header` и `footer` в нее не включены
10
+ */
5
11
  maxHeight?: number | string;
6
- onItemClick?: () => void;
12
+ onItemClick?: (event: React.SyntheticEvent<HTMLElement>) => void;
7
13
  width?: number | string;
8
14
  preventWindowScroll?: boolean;
9
15
  /**
@@ -11,28 +17,47 @@ export interface MenuProps {
11
17
  */
12
18
  disableScrollContainer?: boolean;
13
19
  align?: 'left' | 'right';
20
+ /**
21
+ * Предотвращает выравнивание текста всех пунктов меню относительно друг друга.
22
+ * Так, если хотя бы у одного пункта меню есть иконка, текст в остальных пунктах меню будет выровнен относительно пункта меню с иконкой
23
+ */
24
+ preventIconsOffset?: boolean;
25
+ onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
26
+ header?: React.ReactNode;
27
+ footer?: React.ReactNode;
28
+ /**
29
+ * Циклический перебор айтемов меню (по-дефолтну включен)
30
+ */
31
+ cyclicSelection?: boolean;
32
+ initialSelectedItemIndex?: number;
14
33
  }
15
34
  export interface MenuState {
16
35
  highlightedIndex: number;
36
+ maxHeight: number | string;
37
+ scrollState: ScrollContainerScrollState;
17
38
  }
18
39
  export declare const MenuDataTids: {
19
40
  readonly root: "Menu__root";
20
41
  };
21
- declare type DefaultProps = Required<Pick<MenuProps, 'align' | 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll'>>;
22
- export declare class Menu extends React.Component<MenuProps, MenuState> {
42
+ declare type DefaultProps = Required<Pick<MenuProps, 'align' | 'width' | 'maxHeight' | 'hasShadow' | 'preventWindowScroll' | 'cyclicSelection' | 'initialSelectedItemIndex'>>;
43
+ export declare class Menu extends React.PureComponent<MenuProps, MenuState> {
23
44
  static __KONTUR_REACT_UI__: string;
24
45
  static defaultProps: DefaultProps;
25
46
  private getProps;
26
- state: {
27
- highlightedIndex: number;
28
- };
47
+ state: MenuState;
29
48
  private theme;
30
49
  private scrollContainer;
31
50
  private isMobileLayout;
32
51
  private highlighted;
33
52
  private unmounted;
34
53
  private setRootNode;
54
+ private header;
55
+ private footer;
35
56
  componentWillUnmount(): void;
57
+ componentDidMount(): void;
58
+ componentDidUpdate(prevProps: MenuProps): void;
59
+ focus(): void;
60
+ private focusOnRootElement;
36
61
  render(): JSX.Element;
37
62
  /**
38
63
  * @public
@@ -56,7 +81,13 @@ export declare class Menu extends React.Component<MenuProps, MenuState> {
56
81
  hasHighlightedItem(): boolean;
57
82
  highlightItem(index: number): void;
58
83
  private renderMain;
84
+ private renderHeader;
85
+ private renderFooter;
86
+ private renderMenuSeparatorWithNoMargin;
59
87
  private getChildList;
88
+ private setInitialSelection;
89
+ private shouldRecalculateMaxHeight;
90
+ private calculateMaxHeight;
60
91
  private refScrollContainer;
61
92
  private refHighlighted;
62
93
  private scrollToSelected;
@@ -67,5 +98,8 @@ export declare class Menu extends React.Component<MenuProps, MenuState> {
67
98
  private unhighlight;
68
99
  private move;
69
100
  private isEmpty;
101
+ private handleKeyDown;
102
+ private getStyle;
103
+ private handleScrollStateChange;
70
104
  }
71
105
  export {};