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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (679) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +97 -0
  3. package/components/Autocomplete/Autocomplete.d.ts +0 -1
  4. package/components/Autocomplete/Autocomplete.js +13 -4
  5. package/components/Autocomplete/Autocomplete.js.map +1 -1
  6. package/components/Autocomplete/Autocomplete.styles.d.ts +4 -4
  7. package/components/Autocomplete/Autocomplete.styles.js +5 -16
  8. package/components/Autocomplete/Autocomplete.styles.js.map +1 -1
  9. package/components/Button/Button.d.ts +15 -1
  10. package/components/Button/Button.js +162 -76
  11. package/components/Button/Button.js.map +1 -1
  12. package/components/Button/Button.styles.d.ts +107 -91
  13. package/components/Button/Button.styles.js +108 -255
  14. package/components/Button/Button.styles.js.map +1 -1
  15. package/components/Button/ButtonArrow.d.ts +2 -3
  16. package/components/Button/ButtonArrow.js +8 -10
  17. package/components/Button/ButtonArrow.js.map +1 -1
  18. package/components/Button/ButtonIcon.js +7 -17
  19. package/components/Button/ButtonIcon.js.map +1 -1
  20. package/components/Button/ButtonIcon.styles.d.ts +15 -15
  21. package/components/Button/ButtonIcon.styles.js +16 -51
  22. package/components/Button/ButtonIcon.styles.js.map +1 -1
  23. package/components/Calendar/Calendar.d.ts +0 -1
  24. package/components/Calendar/Calendar.js +3 -3
  25. package/components/Calendar/Calendar.js.map +1 -1
  26. package/components/Calendar/Calendar.styles.d.ts +5 -5
  27. package/components/Calendar/Calendar.styles.js +6 -20
  28. package/components/Calendar/Calendar.styles.js.map +1 -1
  29. package/components/Calendar/CalendarDay.js +11 -7
  30. package/components/Calendar/CalendarDay.js.map +1 -1
  31. package/components/Calendar/DayCellView.js +1 -3
  32. package/components/Calendar/DayCellView.js.map +1 -1
  33. package/components/Calendar/DayCellView.styles.d.ts +10 -8
  34. package/components/Calendar/DayCellView.styles.js +11 -29
  35. package/components/Calendar/DayCellView.styles.js.map +1 -1
  36. package/components/Calendar/Month.js +6 -10
  37. package/components/Calendar/Month.js.map +1 -1
  38. package/components/Calendar/MonthView.js +7 -7
  39. package/components/Calendar/MonthView.js.map +1 -1
  40. package/components/Calendar/MonthView.styles.d.ts +12 -12
  41. package/components/Calendar/MonthView.styles.js +13 -45
  42. package/components/Calendar/MonthView.styles.js.map +1 -1
  43. package/components/Center/Center.d.ts +0 -1
  44. package/components/Center/Center.js +1 -1
  45. package/components/Center/Center.js.map +1 -1
  46. package/components/Center/Center.styles.d.ts +7 -6
  47. package/components/Center/Center.styles.js +8 -25
  48. package/components/Center/Center.styles.js.map +1 -1
  49. package/components/Checkbox/Checkbox.d.ts +8 -1
  50. package/components/Checkbox/Checkbox.js +57 -26
  51. package/components/Checkbox/Checkbox.js.map +1 -1
  52. package/components/Checkbox/Checkbox.styles.d.ts +33 -30
  53. package/components/Checkbox/Checkbox.styles.js +35 -95
  54. package/components/Checkbox/Checkbox.styles.js.map +1 -1
  55. package/components/DateInput/DateFragmentsView.d.ts +0 -2
  56. package/components/DateInput/DateFragmentsView.js +10 -7
  57. package/components/DateInput/DateFragmentsView.js.map +1 -1
  58. package/components/DateInput/DateFragmentsView.styles.d.ts +8 -6
  59. package/components/DateInput/DateFragmentsView.styles.js +9 -26
  60. package/components/DateInput/DateFragmentsView.styles.js.map +1 -1
  61. package/components/DateInput/DateInput.d.ts +0 -2
  62. package/components/DateInput/DateInput.js +6 -8
  63. package/components/DateInput/DateInput.js.map +1 -1
  64. package/components/DateInput/DateInput.styles.d.ts +10 -11
  65. package/components/DateInput/DateInput.styles.js +11 -28
  66. package/components/DateInput/DateInput.styles.js.map +1 -1
  67. package/components/DatePicker/DatePicker.d.ts +0 -1
  68. package/components/DatePicker/DatePicker.js +2 -2
  69. package/components/DatePicker/DatePicker.js.map +1 -1
  70. package/components/DatePicker/DatePicker.styles.d.ts +4 -4
  71. package/components/DatePicker/DatePicker.styles.js +5 -16
  72. package/components/DatePicker/DatePicker.styles.js.map +1 -1
  73. package/components/DatePicker/MobilePicker.styles.d.ts +3 -2
  74. package/components/DatePicker/MobilePicker.styles.js +4 -13
  75. package/components/DatePicker/MobilePicker.styles.js.map +1 -1
  76. package/components/DatePicker/getMobilePickerTheme.js +27 -9
  77. package/components/DatePicker/getMobilePickerTheme.js.map +1 -1
  78. package/components/DateRangePicker/DateRangePicker.d.ts +4 -4
  79. package/components/DateRangePicker/DateRangePicker.js +26 -28
  80. package/components/DateRangePicker/DateRangePicker.js.map +1 -1
  81. package/components/DateRangePicker/DateRangePicker.styles.d.ts +20 -14
  82. package/components/DateRangePicker/DateRangePicker.styles.js +25 -49
  83. package/components/DateRangePicker/DateRangePicker.styles.js.map +1 -1
  84. package/components/DateRangePicker/DateRangePickerTheme.js +30 -10
  85. package/components/DateRangePicker/DateRangePickerTheme.js.map +1 -1
  86. package/components/Dropdown/getDropdownTheme.d.ts +11 -0
  87. package/components/Dropdown/getDropdownTheme.js +23 -4
  88. package/components/Dropdown/getDropdownTheme.js.map +1 -1
  89. package/components/DropdownMenu/getDropdownMenuTheme.js +9 -2
  90. package/components/DropdownMenu/getDropdownMenuTheme.js.map +1 -1
  91. package/components/FileUploader/FileUploader.d.ts +2 -1
  92. package/components/FileUploader/FileUploader.js +50 -45
  93. package/components/FileUploader/FileUploader.js.map +1 -1
  94. package/components/FileUploader/FileUploader.styles.d.ts +69 -68
  95. package/components/FileUploader/FileUploader.styles.js +71 -214
  96. package/components/FileUploader/FileUploader.styles.js.map +1 -1
  97. package/components/FileUploader/FileUploaderFile.js +28 -30
  98. package/components/FileUploader/FileUploaderFile.js.map +1 -1
  99. package/components/FileUploader/FileUploaderFile.styles.d.ts +57 -57
  100. package/components/FileUploader/FileUploaderFile.styles.js +58 -180
  101. package/components/FileUploader/FileUploaderFile.styles.js.map +1 -1
  102. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js +17 -19
  103. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.js.map +1 -1
  104. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.d.ts +31 -31
  105. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js +32 -99
  106. package/components/FileUploader/FileUploaderFileList/FileUploaderFileList.styles.js.map +1 -1
  107. package/components/FileUploader/FileUploaderFileStatusIcon.js +2 -4
  108. package/components/FileUploader/FileUploaderFileStatusIcon.js.map +1 -1
  109. package/components/FileUploader/FileUploaderFileTypeIcon.js +47 -52
  110. package/components/FileUploader/FileUploaderFileTypeIcon.js.map +1 -1
  111. package/components/FileUploader/FileUploaderFileTypeIcon.styles.d.ts +14 -0
  112. package/components/FileUploader/FileUploaderFileTypeIcon.styles.js +16 -0
  113. package/components/FileUploader/FileUploaderFileTypeIcon.styles.js.map +1 -0
  114. package/components/FxInput/FxInput.d.ts +1 -1
  115. package/components/FxInput/FxInput.js +6 -2
  116. package/components/FxInput/FxInput.js.map +1 -1
  117. package/components/FxInput/FxInput.styles.d.ts +4 -0
  118. package/components/FxInput/FxInput.styles.js +6 -0
  119. package/components/FxInput/FxInput.styles.js.map +1 -0
  120. package/components/FxInput/FxInputRestoreBtn.js +23 -15
  121. package/components/FxInput/FxInputRestoreBtn.js.map +1 -1
  122. package/components/FxInput/FxInputRestoreBtn.styles.d.ts +6 -0
  123. package/components/FxInput/FxInputRestoreBtn.styles.js +8 -0
  124. package/components/FxInput/FxInputRestoreBtn.styles.js.map +1 -0
  125. package/components/GlobalLoader/GlobalLoaderView.js +30 -14
  126. package/components/GlobalLoader/GlobalLoaderView.js.map +1 -1
  127. package/components/GlobalLoader/GlobalLoaderView.styles.d.ts +22 -16
  128. package/components/GlobalLoader/GlobalLoaderView.styles.js +22 -67
  129. package/components/GlobalLoader/GlobalLoaderView.styles.js.map +1 -1
  130. package/components/Group/Group.d.ts +0 -1
  131. package/components/Group/Group.js +2 -3
  132. package/components/Group/Group.js.map +1 -1
  133. package/components/Group/Group.styles.d.ts +7 -7
  134. package/components/Group/Group.styles.js +8 -28
  135. package/components/Group/Group.styles.js.map +1 -1
  136. package/components/Hint/Hint.d.ts +10 -2
  137. package/components/Hint/Hint.js +47 -19
  138. package/components/Hint/Hint.js.map +1 -1
  139. package/components/Hint/Hint.styles.d.ts +4 -4
  140. package/components/Hint/Hint.styles.js +5 -16
  141. package/components/Hint/Hint.styles.js.map +1 -1
  142. package/components/Hint/HintDelayController.d.ts +11 -0
  143. package/components/Hint/HintDelayController.js +50 -0
  144. package/components/Hint/HintDelayController.js.map +1 -0
  145. package/components/Input/Input.d.ts +0 -1
  146. package/components/Input/Input.js +13 -13
  147. package/components/Input/Input.js.map +1 -1
  148. package/components/Input/Input.styles.d.ts +20 -20
  149. package/components/Input/Input.styles.js +21 -66
  150. package/components/Input/Input.styles.js.map +1 -1
  151. package/components/Input/InputLayout/InputLayout.styles.d.ts +26 -17
  152. package/components/Input/InputLayout/InputLayout.styles.js +27 -57
  153. package/components/Input/InputLayout/InputLayout.styles.js.map +1 -1
  154. package/components/Input/InputLayout/InputLayoutAsideCounter.js +8 -8
  155. package/components/Input/InputLayout/InputLayoutAsideCounter.js.map +1 -1
  156. package/components/Input/InputLayout/InputLayoutAsideIcon.js +19 -25
  157. package/components/Input/InputLayout/InputLayoutAsideIcon.js.map +1 -1
  158. package/components/Input/InputLayout/InputLayoutAsideText.js +4 -4
  159. package/components/Input/InputLayout/InputLayoutAsideText.js.map +1 -1
  160. package/components/Kebab/Kebab.d.ts +0 -1
  161. package/components/Kebab/Kebab.js +2 -2
  162. package/components/Kebab/Kebab.js.map +1 -1
  163. package/components/Kebab/Kebab.styles.d.ts +10 -10
  164. package/components/Kebab/Kebab.styles.js +11 -34
  165. package/components/Kebab/Kebab.styles.js.map +1 -1
  166. package/components/Link/Link.d.ts +0 -1
  167. package/components/Link/Link.js +23 -18
  168. package/components/Link/Link.js.map +1 -1
  169. package/components/Link/Link.styles.d.ts +23 -23
  170. package/components/Link/Link.styles.js +25 -81
  171. package/components/Link/Link.styles.js.map +1 -1
  172. package/components/Link/LinkIcon.js +4 -6
  173. package/components/Link/LinkIcon.js.map +1 -1
  174. package/components/Loader/Loader.d.ts +0 -2
  175. package/components/Loader/Loader.js +2 -3
  176. package/components/Loader/Loader.js.map +1 -1
  177. package/components/Loader/Loader.styles.d.ts +7 -7
  178. package/components/Loader/Loader.styles.js +8 -25
  179. package/components/Loader/Loader.styles.js.map +1 -1
  180. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js +15 -21
  181. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.js.map +1 -1
  182. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.d.ts +3 -2
  183. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js +5 -13
  184. package/components/MaskedInput/ColorableInputElement/ColorableInputElement.styles.js.map +1 -1
  185. package/components/MaskedInput/MaskedInput.styles.d.ts +3 -3
  186. package/components/MaskedInput/MaskedInput.styles.js +5 -14
  187. package/components/MaskedInput/MaskedInput.styles.js.map +1 -1
  188. package/components/MaskedInput/MaskedInputLegacy.js +4 -6
  189. package/components/MaskedInput/MaskedInputLegacy.js.map +1 -1
  190. package/components/MaskedInputV2/MaskedInputV2.js +4 -6
  191. package/components/MaskedInputV2/MaskedInputV2.js.map +1 -1
  192. package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +3 -3
  193. package/components/MaskedInputV2/MaskedInputV2.styles.js +5 -14
  194. package/components/MaskedInputV2/MaskedInputV2.styles.js.map +1 -1
  195. package/components/MaskedInputV2/internal/MaskOverlay.js +8 -8
  196. package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -1
  197. package/components/MaskedInputV2/internal/MaskedCore.js +7 -5
  198. package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -1
  199. package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +7 -7
  200. package/components/MaskedInputV2/internal/MaskedInternal.styles.js +9 -25
  201. package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +1 -1
  202. package/components/MenuFooter/MenuFooter.js +10 -12
  203. package/components/MenuFooter/MenuFooter.js.map +1 -1
  204. package/components/MenuFooter/MenuFooter.styles.d.ts +9 -9
  205. package/components/MenuFooter/MenuFooter.styles.js +10 -32
  206. package/components/MenuFooter/MenuFooter.styles.js.map +1 -1
  207. package/components/MenuHeader/MenuHeader.js +9 -11
  208. package/components/MenuHeader/MenuHeader.js.map +1 -1
  209. package/components/MenuHeader/MenuHeader.styles.d.ts +9 -9
  210. package/components/MenuHeader/MenuHeader.styles.js +10 -32
  211. package/components/MenuHeader/MenuHeader.styles.js.map +1 -1
  212. package/components/MenuItem/MenuItem.d.ts +0 -1
  213. package/components/MenuItem/MenuItem.js +21 -21
  214. package/components/MenuItem/MenuItem.js.map +1 -1
  215. package/components/MenuItem/MenuItem.mixins.d.ts +6 -0
  216. package/components/MenuItem/MenuItem.mixins.js +7 -1
  217. package/components/MenuItem/MenuItem.mixins.js.map +1 -1
  218. package/components/MenuItem/MenuItem.styles.d.ts +26 -26
  219. package/components/MenuItem/MenuItem.styles.js +28 -85
  220. package/components/MenuItem/MenuItem.styles.js.map +1 -1
  221. package/components/MenuSeparator/MenuSeparator.js +4 -6
  222. package/components/MenuSeparator/MenuSeparator.js.map +1 -1
  223. package/components/MenuSeparator/MenuSeparator.styles.d.ts +4 -4
  224. package/components/MenuSeparator/MenuSeparator.styles.js +5 -16
  225. package/components/MenuSeparator/MenuSeparator.styles.js.map +1 -1
  226. package/components/MiniModal/MiniModal.styles.d.ts +10 -10
  227. package/components/MiniModal/MiniModal.styles.js +11 -35
  228. package/components/MiniModal/MiniModal.styles.js.map +1 -1
  229. package/components/MiniModal/MiniModalBody.js +3 -3
  230. package/components/MiniModal/MiniModalBody.js.map +1 -1
  231. package/components/MiniModal/MiniModalFooter.js +4 -6
  232. package/components/MiniModal/MiniModalFooter.js.map +1 -1
  233. package/components/MiniModal/MiniModalHeader.js +4 -6
  234. package/components/MiniModal/MiniModalHeader.js.map +1 -1
  235. package/components/MiniModal/MiniModalIndent.js +2 -4
  236. package/components/MiniModal/MiniModalIndent.js.map +1 -1
  237. package/components/MiniModal/getMiniModalTheme.js +39 -13
  238. package/components/MiniModal/getMiniModalTheme.js.map +1 -1
  239. package/components/Modal/Modal.d.ts +0 -1
  240. package/components/Modal/Modal.js +8 -8
  241. package/components/Modal/Modal.js.map +1 -1
  242. package/components/Modal/Modal.styles.d.ts +50 -50
  243. package/components/Modal/Modal.styles.js +52 -161
  244. package/components/Modal/Modal.styles.js.map +1 -1
  245. package/components/Modal/ModalBody.d.ts +0 -1
  246. package/components/Modal/ModalBody.js +7 -7
  247. package/components/Modal/ModalBody.js.map +1 -1
  248. package/components/Modal/ModalClose.js +7 -9
  249. package/components/Modal/ModalClose.js.map +1 -1
  250. package/components/Modal/ModalFooter.js +3 -3
  251. package/components/Modal/ModalFooter.js.map +1 -1
  252. package/components/Modal/ModalHeader.js +3 -3
  253. package/components/Modal/ModalHeader.js.map +1 -1
  254. package/components/Modal/ModalSeparator.js +4 -6
  255. package/components/Modal/ModalSeparator.js.map +1 -1
  256. package/components/Paging/Paging.d.ts +0 -2
  257. package/components/Paging/Paging.js +32 -37
  258. package/components/Paging/Paging.js.map +1 -1
  259. package/components/Paging/Paging.styles.d.ts +31 -31
  260. package/components/Paging/Paging.styles.js +32 -97
  261. package/components/Paging/Paging.styles.js.map +1 -1
  262. package/components/PasswordInput/PasswordInput.d.ts +0 -2
  263. package/components/PasswordInput/PasswordInput.js +6 -11
  264. package/components/PasswordInput/PasswordInput.js.map +1 -1
  265. package/components/PasswordInput/PasswordInput.styles.d.ts +10 -10
  266. package/components/PasswordInput/PasswordInput.styles.js +11 -34
  267. package/components/PasswordInput/PasswordInput.styles.js.map +1 -1
  268. package/components/Radio/Radio.d.ts +8 -1
  269. package/components/Radio/Radio.js +59 -28
  270. package/components/Radio/Radio.js.map +1 -1
  271. package/components/Radio/Radio.styles.d.ts +33 -30
  272. package/components/Radio/Radio.styles.js +35 -95
  273. package/components/Radio/Radio.styles.js.map +1 -1
  274. package/components/RadioGroup/RadioGroup.d.ts +0 -1
  275. package/components/RadioGroup/RadioGroup.js +1 -2
  276. package/components/RadioGroup/RadioGroup.js.map +1 -1
  277. package/components/RadioGroup/RadioGroup.styles.d.ts +5 -5
  278. package/components/RadioGroup/RadioGroup.styles.js +6 -22
  279. package/components/RadioGroup/RadioGroup.styles.js.map +1 -1
  280. package/components/ScrollContainer/ScrollBar.d.ts +1 -3
  281. package/components/ScrollContainer/ScrollBar.js +9 -14
  282. package/components/ScrollContainer/ScrollBar.js.map +1 -1
  283. package/components/ScrollContainer/ScrollContainer.d.ts +0 -1
  284. package/components/ScrollContainer/ScrollContainer.js +1 -1
  285. package/components/ScrollContainer/ScrollContainer.js.map +1 -1
  286. package/components/ScrollContainer/ScrollContainer.styles.d.ts +13 -13
  287. package/components/ScrollContainer/ScrollContainer.styles.js +15 -43
  288. package/components/ScrollContainer/ScrollContainer.styles.js.map +1 -1
  289. package/components/Select/Select.d.ts +0 -1
  290. package/components/Select/Select.js +12 -12
  291. package/components/Select/Select.js.map +1 -1
  292. package/components/Select/Select.styles.d.ts +17 -17
  293. package/components/Select/Select.styles.js +18 -55
  294. package/components/Select/Select.styles.js.map +1 -1
  295. package/components/Select/selectTheme.js +31 -7
  296. package/components/Select/selectTheme.js.map +1 -1
  297. package/components/SidePage/SidePage.d.ts +0 -2
  298. package/components/SidePage/SidePage.js +8 -10
  299. package/components/SidePage/SidePage.js.map +1 -1
  300. package/components/SidePage/SidePage.styles.d.ts +49 -49
  301. package/components/SidePage/SidePage.styles.js +50 -156
  302. package/components/SidePage/SidePage.styles.js.map +1 -1
  303. package/components/SidePage/SidePageBody.d.ts +0 -1
  304. package/components/SidePage/SidePageBody.js +7 -8
  305. package/components/SidePage/SidePageBody.js.map +1 -1
  306. package/components/SidePage/SidePageCloseButton.js +6 -8
  307. package/components/SidePage/SidePageCloseButton.js.map +1 -1
  308. package/components/SidePage/SidePageContainer.d.ts +0 -2
  309. package/components/SidePage/SidePageContainer.js +11 -13
  310. package/components/SidePage/SidePageContainer.js.map +1 -1
  311. package/components/SidePage/SidePageFooter.d.ts +0 -2
  312. package/components/SidePage/SidePageFooter.js +11 -13
  313. package/components/SidePage/SidePageFooter.js.map +1 -1
  314. package/components/SidePage/SidePageHeader.d.ts +0 -1
  315. package/components/SidePage/SidePageHeader.js +10 -10
  316. package/components/SidePage/SidePageHeader.js.map +1 -1
  317. package/components/Spinner/Spinner.d.ts +0 -2
  318. package/components/Spinner/Spinner.js +7 -10
  319. package/components/Spinner/Spinner.js.map +1 -1
  320. package/components/Spinner/Spinner.styles.d.ts +12 -12
  321. package/components/Spinner/Spinner.styles.js +13 -41
  322. package/components/Spinner/Spinner.styles.js.map +1 -1
  323. package/components/Sticky/Sticky.d.ts +0 -1
  324. package/components/Sticky/Sticky.js +1 -1
  325. package/components/Sticky/Sticky.js.map +1 -1
  326. package/components/Sticky/Sticky.styles.d.ts +7 -6
  327. package/components/Sticky/Sticky.styles.js +8 -25
  328. package/components/Sticky/Sticky.styles.js.map +1 -1
  329. package/components/Switcher/Switcher.d.ts +0 -1
  330. package/components/Switcher/Switcher.js +6 -6
  331. package/components/Switcher/Switcher.js.map +1 -1
  332. package/components/Switcher/Switcher.styles.d.ts +11 -11
  333. package/components/Switcher/Switcher.styles.js +12 -37
  334. package/components/Switcher/Switcher.styles.js.map +1 -1
  335. package/components/Switcher/switcherTheme.js +12 -4
  336. package/components/Switcher/switcherTheme.js.map +1 -1
  337. package/components/Tabs/Indicator.d.ts +0 -1
  338. package/components/Tabs/Indicator.js +2 -2
  339. package/components/Tabs/Indicator.js.map +1 -1
  340. package/components/Tabs/Indicator.styles.d.ts +7 -7
  341. package/components/Tabs/Indicator.styles.js +8 -25
  342. package/components/Tabs/Indicator.styles.js.map +1 -1
  343. package/components/Tabs/Tab.d.ts +0 -2
  344. package/components/Tabs/Tab.js +19 -24
  345. package/components/Tabs/Tab.js.map +1 -1
  346. package/components/Tabs/Tab.styles.d.ts +27 -27
  347. package/components/Tabs/Tab.styles.js +30 -99
  348. package/components/Tabs/Tab.styles.js.map +1 -1
  349. package/components/Tabs/Tabs.d.ts +0 -2
  350. package/components/Tabs/Tabs.js +24 -29
  351. package/components/Tabs/Tabs.js.map +1 -1
  352. package/components/Tabs/Tabs.styles.d.ts +6 -6
  353. package/components/Tabs/Tabs.styles.js +8 -25
  354. package/components/Tabs/Tabs.styles.js.map +1 -1
  355. package/components/Textarea/Textarea.d.ts +0 -2
  356. package/components/Textarea/Textarea.js +17 -24
  357. package/components/Textarea/Textarea.js.map +1 -1
  358. package/components/Textarea/Textarea.styles.d.ts +26 -22
  359. package/components/Textarea/Textarea.styles.js +27 -71
  360. package/components/Textarea/Textarea.styles.js.map +1 -1
  361. package/components/Textarea/TextareaCounter.js +22 -14
  362. package/components/Textarea/TextareaCounter.js.map +1 -1
  363. package/components/TimePicker/TimePicker.styles.d.ts +11 -11
  364. package/components/TimePicker/TimePicker.styles.js +12 -37
  365. package/components/TimePicker/TimePicker.styles.js.map +1 -1
  366. package/components/TimePicker/TimePickerItems.js +6 -6
  367. package/components/TimePicker/TimePickerItems.js.map +1 -1
  368. package/components/TimePicker/TimePickerPopup.js +1 -1
  369. package/components/TimePicker/TimePickerPopup.js.map +1 -1
  370. package/components/Toast/Toast.d.ts +0 -1
  371. package/components/Toast/Toast.js +9 -6
  372. package/components/Toast/Toast.js.map +1 -1
  373. package/components/Toast/Toast.styles.d.ts +6 -5
  374. package/components/Toast/Toast.styles.js +7 -22
  375. package/components/Toast/Toast.styles.js.map +1 -1
  376. package/components/Toast/ToastView.d.ts +0 -1
  377. package/components/Toast/ToastView.js +9 -17
  378. package/components/Toast/ToastView.js.map +1 -1
  379. package/components/Toast/ToastView.styles.d.ts +19 -17
  380. package/components/Toast/ToastView.styles.js +20 -65
  381. package/components/Toast/ToastView.styles.js.map +1 -1
  382. package/components/Toggle/Toggle.d.ts +1 -1
  383. package/components/Toggle/Toggle.js +55 -39
  384. package/components/Toggle/Toggle.js.map +1 -1
  385. package/components/Toggle/Toggle.styles.d.ts +47 -46
  386. package/components/Toggle/Toggle.styles.js +48 -143
  387. package/components/Toggle/Toggle.styles.js.map +1 -1
  388. package/components/Token/Token.d.ts +0 -2
  389. package/components/Token/Token.js +5 -10
  390. package/components/Token/Token.js.map +1 -1
  391. package/components/Token/Token.styles.d.ts +20 -19
  392. package/components/Token/Token.styles.js +22 -62
  393. package/components/Token/Token.styles.js.map +1 -1
  394. package/components/Token/TokenView.js +8 -10
  395. package/components/Token/TokenView.js.map +1 -1
  396. package/components/TokenInput/TextWidthHelper.d.ts +0 -1
  397. package/components/TokenInput/TextWidthHelper.js +4 -4
  398. package/components/TokenInput/TextWidthHelper.js.map +1 -1
  399. package/components/TokenInput/TokenInput.d.ts +1 -2
  400. package/components/TokenInput/TokenInput.js +20 -22
  401. package/components/TokenInput/TokenInput.js.map +1 -1
  402. package/components/TokenInput/TokenInput.styles.d.ts +21 -20
  403. package/components/TokenInput/TokenInput.styles.js +22 -66
  404. package/components/TokenInput/TokenInput.styles.js.map +1 -1
  405. package/components/Tooltip/Tooltip.d.ts +0 -1
  406. package/components/Tooltip/Tooltip.js +12 -12
  407. package/components/Tooltip/Tooltip.js.map +1 -1
  408. package/components/Tooltip/Tooltip.styles.d.ts +11 -10
  409. package/components/Tooltip/Tooltip.styles.js +12 -34
  410. package/components/Tooltip/Tooltip.styles.js.map +1 -1
  411. package/index.d.ts +4 -0
  412. package/index.js +12 -0
  413. package/index.js.map +1 -1
  414. package/internal/ClearCrossIcon/ClearCrossIcon.js +7 -9
  415. package/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
  416. package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +11 -12
  417. package/internal/ClearCrossIcon/ClearCrossIcon.styles.js +12 -35
  418. package/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
  419. package/internal/CloseButtonIcon/CloseButtonIcon.d.ts +21 -11
  420. package/internal/CloseButtonIcon/CloseButtonIcon.js +28 -13
  421. package/internal/CloseButtonIcon/CloseButtonIcon.js.map +1 -1
  422. package/internal/CloseButtonIcon/CloseButtonIcon.styles.d.ts +8 -8
  423. package/internal/CloseButtonIcon/CloseButtonIcon.styles.js +9 -23
  424. package/internal/CloseButtonIcon/CloseButtonIcon.styles.js.map +1 -1
  425. package/internal/CommonWrapper/CommonWrapper.d.ts +5 -1
  426. package/internal/CommonWrapper/CommonWrapper.js +107 -6
  427. package/internal/CommonWrapper/CommonWrapper.js.map +1 -1
  428. package/internal/CustomComboBox/ComboBoxView.d.ts +1 -2
  429. package/internal/CustomComboBox/ComboBoxView.js +8 -7
  430. package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  431. package/internal/CustomComboBox/CustomComboBox.styles.d.ts +5 -3
  432. package/internal/CustomComboBox/CustomComboBox.styles.js +6 -16
  433. package/internal/CustomComboBox/CustomComboBox.styles.js.map +1 -1
  434. package/internal/DateSelect/DateSelect.d.ts +0 -1
  435. package/internal/DateSelect/DateSelect.js +2 -2
  436. package/internal/DateSelect/DateSelect.js.map +1 -1
  437. package/internal/DateSelect/DateSelect.styles.d.ts +5 -5
  438. package/internal/DateSelect/DateSelect.styles.js +7 -19
  439. package/internal/DateSelect/DateSelect.styles.js.map +1 -1
  440. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.d.ts +15 -1
  441. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js +36 -15
  442. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.js.map +1 -1
  443. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.d.ts +5 -0
  444. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js +7 -0
  445. package/internal/HideBodyVerticalScroll/HideBodyVerticalScroll.styles.js.map +1 -0
  446. package/internal/InputLikeText/InputLikeText.d.ts +0 -1
  447. package/internal/InputLikeText/InputLikeText.js +21 -17
  448. package/internal/InputLikeText/InputLikeText.js.map +1 -1
  449. package/internal/InputLikeText/InputLikeText.styles.d.ts +7 -7
  450. package/internal/InputLikeText/InputLikeText.styles.js +8 -28
  451. package/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
  452. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +0 -1
  453. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +14 -14
  454. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -1
  455. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -2
  456. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +4 -13
  457. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -1
  458. package/internal/MaskCharLowLine/MaskCharLowLine.styles.d.ts +3 -2
  459. package/internal/MaskCharLowLine/MaskCharLowLine.styles.js +4 -13
  460. package/internal/MaskCharLowLine/MaskCharLowLine.styles.js.map +1 -1
  461. package/internal/Menu/Menu.d.ts +0 -1
  462. package/internal/Menu/Menu.js +9 -9
  463. package/internal/Menu/Menu.js.map +1 -1
  464. package/internal/Menu/Menu.styles.d.ts +15 -15
  465. package/internal/Menu/Menu.styles.js +16 -49
  466. package/internal/Menu/Menu.styles.js.map +1 -1
  467. package/internal/MenuMessage/MenuMessage.js +10 -10
  468. package/internal/MenuMessage/MenuMessage.js.map +1 -1
  469. package/internal/MenuMessage/MenuMessage.styles.d.ts +10 -10
  470. package/internal/MenuMessage/MenuMessage.styles.js +11 -39
  471. package/internal/MenuMessage/MenuMessage.styles.js.map +1 -1
  472. package/internal/MobilePopup/MobilePopup.d.ts +0 -1
  473. package/internal/MobilePopup/MobilePopup.js +23 -11
  474. package/internal/MobilePopup/MobilePopup.js.map +1 -1
  475. package/internal/MobilePopup/MobilePopup.styles.d.ts +16 -16
  476. package/internal/MobilePopup/MobilePopup.styles.js +17 -55
  477. package/internal/MobilePopup/MobilePopup.styles.js.map +1 -1
  478. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.d.ts +0 -1
  479. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js +5 -5
  480. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.js.map +1 -1
  481. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.d.ts +6 -6
  482. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js +7 -23
  483. package/internal/MobilePopup/MobilePopupFooter/MobilePopupFooter.styles.js.map +1 -1
  484. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.d.ts +0 -1
  485. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js +10 -10
  486. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.js.map +1 -1
  487. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.d.ts +13 -13
  488. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js +14 -45
  489. package/internal/MobilePopup/MobilePopupHeader/MobilePopupHeader.styles.js.map +1 -1
  490. package/internal/NativeDateInput/NativeDateInput.d.ts +0 -1
  491. package/internal/NativeDateInput/NativeDateInput.js +1 -1
  492. package/internal/NativeDateInput/NativeDateInput.js.map +1 -1
  493. package/internal/NativeDateInput/NativeDateInput.styles.d.ts +3 -2
  494. package/internal/NativeDateInput/NativeDateInput.styles.js +4 -13
  495. package/internal/NativeDateInput/NativeDateInput.styles.js.map +1 -1
  496. package/internal/NativeTimeInput/NativeTimeInput.js +1 -2
  497. package/internal/NativeTimeInput/NativeTimeInput.js.map +1 -1
  498. package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +3 -2
  499. package/internal/NativeTimeInput/NativeTimeInput.styles.js +4 -13
  500. package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +1 -1
  501. package/internal/Popup/Popup.d.ts +0 -1
  502. package/internal/Popup/Popup.js +5 -5
  503. package/internal/Popup/Popup.js.map +1 -1
  504. package/internal/Popup/Popup.styles.d.ts +21 -21
  505. package/internal/Popup/Popup.styles.js +22 -67
  506. package/internal/Popup/Popup.styles.js.map +1 -1
  507. package/internal/Popup/PopupPin.d.ts +0 -1
  508. package/internal/Popup/PopupPin.js +1 -1
  509. package/internal/Popup/PopupPin.js.map +1 -1
  510. package/internal/Popup/PopupPin.styles.d.ts +9 -8
  511. package/internal/Popup/PopupPin.styles.js +10 -31
  512. package/internal/Popup/PopupPin.styles.js.map +1 -1
  513. package/internal/PopupMenu/PopupMenu.d.ts +0 -1
  514. package/internal/PopupMenu/PopupMenu.js +1 -1
  515. package/internal/PopupMenu/PopupMenu.js.map +1 -1
  516. package/internal/PopupMenu/PopupMenu.styles.d.ts +4 -3
  517. package/internal/PopupMenu/PopupMenu.styles.js +5 -16
  518. package/internal/PopupMenu/PopupMenu.styles.js.map +1 -1
  519. package/internal/RenderContainer/RenderInnerContainer.js +4 -2
  520. package/internal/RenderContainer/RenderInnerContainer.js.map +1 -1
  521. package/internal/ResizeDetector/ResizeDetector.d.ts +0 -1
  522. package/internal/ResizeDetector/ResizeDetector.js +1 -1
  523. package/internal/ResizeDetector/ResizeDetector.js.map +1 -1
  524. package/internal/ResizeDetector/ResizeDetector.styles.d.ts +7 -6
  525. package/internal/ResizeDetector/ResizeDetector.styles.js +8 -25
  526. package/internal/ResizeDetector/ResizeDetector.styles.js.map +1 -1
  527. package/internal/SpinnerIcon/SpinnerIcon.js +2 -2
  528. package/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
  529. package/internal/SpinnerIcon/SpinnerIcon.styles.d.ts +6 -5
  530. package/internal/SpinnerIcon/SpinnerIcon.styles.js +7 -22
  531. package/internal/SpinnerIcon/SpinnerIcon.styles.js.map +1 -1
  532. package/internal/TextWidthHelper/TextWidthHelper.d.ts +0 -1
  533. package/internal/TextWidthHelper/TextWidthHelper.js +1 -1
  534. package/internal/TextWidthHelper/TextWidthHelper.js.map +1 -1
  535. package/internal/TextWidthHelper/TextWidthHelper.styles.d.ts +4 -3
  536. package/internal/TextWidthHelper/TextWidthHelper.styles.js +5 -16
  537. package/internal/TextWidthHelper/TextWidthHelper.styles.js.map +1 -1
  538. package/internal/TimeInput/TimeFragments.js +19 -15
  539. package/internal/TimeInput/TimeFragments.js.map +1 -1
  540. package/internal/TimeInput/TimeFragments.styles.d.ts +19 -31
  541. package/internal/TimeInput/TimeFragments.styles.js +20 -76
  542. package/internal/TimeInput/TimeFragments.styles.js.map +1 -1
  543. package/internal/TimeInput/TimeInput.js +4 -4
  544. package/internal/TimeInput/TimeInput.js.map +1 -1
  545. package/internal/TimeInput/TimeInput.styles.d.ts +6 -6
  546. package/internal/TimeInput/TimeInput.styles.js +7 -22
  547. package/internal/TimeInput/TimeInput.styles.js.map +1 -1
  548. package/internal/icons2022/BaseIcon.js +8 -1
  549. package/internal/icons2022/BaseIcon.js.map +1 -1
  550. package/internal/icons2022/BaseIcon.styles.d.ts +5 -2
  551. package/internal/icons2022/BaseIcon.styles.js +6 -14
  552. package/internal/icons2022/BaseIcon.styles.js.map +1 -1
  553. package/internal/icons2022/LoadingIcon.js +3 -5
  554. package/internal/icons2022/LoadingIcon.js.map +1 -1
  555. package/internal/themes/BasicTheme.d.ts +10 -0
  556. package/internal/themes/BasicTheme.js +17 -6
  557. package/internal/themes/BasicTheme.js.map +1 -1
  558. package/internal/themes/DarkTheme6_0.js +62 -342
  559. package/internal/themes/DarkTheme6_0.js.map +1 -1
  560. package/internal/themes/DarkTheme6_1.js +11 -3
  561. package/internal/themes/DarkTheme6_1.js.map +1 -1
  562. package/internal/themes/DarkTheme6_4.js +11 -1
  563. package/internal/themes/DarkTheme6_4.js.map +1 -1
  564. package/lib/Upgrades.d.ts +12 -2
  565. package/lib/Upgrades.js +12 -16
  566. package/lib/Upgrades.js.map +1 -1
  567. package/lib/classNames.generated.d.ts +1235 -0
  568. package/lib/classNames.generated.js +1233 -0
  569. package/lib/classNames.generated.js.map +1 -0
  570. package/lib/globalObject.js +4 -1
  571. package/lib/globalObject.js.map +1 -1
  572. package/lib/renderEnvironment/RenderEnvironmentContext.d.ts +38 -6
  573. package/lib/renderEnvironment/RenderEnvironmentContext.js +21 -19
  574. package/lib/renderEnvironment/RenderEnvironmentContext.js.map +1 -1
  575. package/lib/renderEnvironment/RenderEnvironmentDecorator.js +6 -3
  576. package/lib/renderEnvironment/RenderEnvironmentDecorator.js.map +1 -1
  577. package/lib/styles/baselineCompensation.d.ts +63 -0
  578. package/lib/styles/baselineCompensation.js +122 -0
  579. package/lib/styles/baselineCompensation.js.map +1 -0
  580. package/lib/theming/Emotion.d.ts +43 -9
  581. package/lib/theming/Emotion.js +70 -35
  582. package/lib/theming/Emotion.js.map +1 -1
  583. package/lib/theming/declaredTheme.d.ts +43 -0
  584. package/lib/theming/declaredTheme.js +56 -0
  585. package/lib/theming/declaredTheme.js.map +1 -0
  586. package/lib/theming/hashString.d.ts +19 -0
  587. package/lib/theming/hashString.js +52 -0
  588. package/lib/theming/hashString.js.map +1 -0
  589. package/lib/theming/staticStyles.d.ts +17 -0
  590. package/lib/theming/staticStyles.js +8 -0
  591. package/lib/theming/staticStyles.js.map +1 -0
  592. package/lib/theming/staticThemeDelta.d.ts +17 -0
  593. package/lib/theming/staticThemeDelta.js +37 -0
  594. package/lib/theming/staticThemeDelta.js.map +1 -0
  595. package/lib/theming/staticThemeVars.d.ts +21 -0
  596. package/lib/theming/staticThemeVars.js +35 -0
  597. package/lib/theming/staticThemeVars.js.map +1 -0
  598. package/lib/theming/themeCssVarsClass.d.ts +89 -0
  599. package/lib/theming/themeCssVarsClass.js +253 -0
  600. package/lib/theming/themeCssVarsClass.js.map +1 -0
  601. package/lib/theming/themeCssVarsDelta.d.ts +13 -0
  602. package/lib/theming/themeCssVarsDelta.js +67 -0
  603. package/lib/theming/themeCssVarsDelta.js.map +1 -0
  604. package/lib/theming/themeToCssVars.d.ts +47 -0
  605. package/lib/theming/themeToCssVars.js +861 -0
  606. package/lib/theming/themeToCssVars.js.map +1 -0
  607. package/package.json +47 -6
  608. package/react-ui-tailwind.css +544 -0
  609. package/react-ui-themes.css +8628 -0
  610. package/react-ui-token-map.json +9029 -0
  611. package/react-ui.css +7776 -0
  612. package/react-ui.layer.css +7778 -0
  613. package/themes/dark-6-0.css +1439 -0
  614. package/themes/dark-6-0.scoped.css +1439 -0
  615. package/themes/dark-6-1.css +1439 -0
  616. package/themes/dark-6-1.scoped.css +1439 -0
  617. package/themes/dark.css +1439 -0
  618. package/themes/dark.scoped.css +1439 -0
  619. package/themes/light-6-0.css +1437 -0
  620. package/themes/light-6-0.scoped.css +1437 -0
  621. package/themes/light-6-1.css +1437 -0
  622. package/themes/light-6-1.scoped.css +1437 -0
  623. package/themes/light.css +1437 -0
  624. package/themes/light.scoped.css +1437 -0
  625. package/components/Button/Button.mixins.d.ts +0 -4
  626. package/components/Button/Button.mixins.js +0 -21
  627. package/components/Button/Button.mixins.js.map +0 -1
  628. package/components/Checkbox/Checkbox.mixins.d.ts +0 -4
  629. package/components/Checkbox/Checkbox.mixins.js +0 -18
  630. package/components/Checkbox/Checkbox.mixins.js.map +0 -1
  631. package/components/FileUploader/FileUploader.mixins.d.ts +0 -1
  632. package/components/FileUploader/FileUploader.mixins.js +0 -4
  633. package/components/FileUploader/FileUploader.mixins.js.map +0 -1
  634. package/components/Link/Link.mixins.d.ts +0 -2
  635. package/components/Link/Link.mixins.js +0 -7
  636. package/components/Link/Link.mixins.js.map +0 -1
  637. package/components/MenuFooter/MenuFooter.mixins.d.ts +0 -2
  638. package/components/MenuFooter/MenuFooter.mixins.js +0 -8
  639. package/components/MenuFooter/MenuFooter.mixins.js.map +0 -1
  640. package/components/MenuHeader/MenuHeader.mixins.d.ts +0 -2
  641. package/components/MenuHeader/MenuHeader.mixins.js +0 -8
  642. package/components/MenuHeader/MenuHeader.mixins.js.map +0 -1
  643. package/components/Radio/Radio.mixins.d.ts +0 -7
  644. package/components/Radio/Radio.mixins.js +0 -30
  645. package/components/Radio/Radio.mixins.js.map +0 -1
  646. package/components/Tabs/helpers.d.ts +0 -6
  647. package/components/Tabs/helpers.js +0 -25
  648. package/components/Tabs/helpers.js.map +0 -1
  649. package/components/Textarea/Textarea.mixins.d.ts +0 -2
  650. package/components/Textarea/Textarea.mixins.js +0 -7
  651. package/components/Textarea/Textarea.mixins.js.map +0 -1
  652. package/components/Toggle/Toggle.mixins.d.ts +0 -8
  653. package/components/Toggle/Toggle.mixins.js +0 -32
  654. package/components/Toggle/Toggle.mixins.js.map +0 -1
  655. package/components/Token/Token.mixins.d.ts +0 -1
  656. package/components/Token/Token.mixins.js +0 -4
  657. package/components/Token/Token.mixins.js.map +0 -1
  658. package/components/TokenInput/TokenInput.mixins.d.ts +0 -2
  659. package/components/TokenInput/TokenInput.mixins.js +0 -7
  660. package/components/TokenInput/TokenInput.mixins.js.map +0 -1
  661. package/lib/chars.d.ts +0 -8
  662. package/lib/chars.js +0 -9
  663. package/lib/chars.js.map +0 -1
  664. package/lib/styles/Mixins.d.ts +0 -2
  665. package/lib/styles/Mixins.js +0 -7
  666. package/lib/styles/Mixins.js.map +0 -1
  667. package/lib/styles/UiFont.d.ts +0 -3
  668. package/lib/styles/UiFont.js +0 -18
  669. package/lib/styles/UiFont.js.map +0 -1
  670. package/lib/styles/getLabGrotesqueBaselineCompensation.d.ts +0 -1
  671. package/lib/styles/getLabGrotesqueBaselineCompensation.js +0 -10
  672. package/lib/styles/getLabGrotesqueBaselineCompensation.js.map +0 -1
  673. package/lib/theming/AnimationKeyframes.d.ts +0 -7
  674. package/lib/theming/AnimationKeyframes.js +0 -24
  675. package/lib/theming/AnimationKeyframes.js.map +0 -1
  676. package/lib/theming/useTheme.d.ts +0 -2
  677. package/lib/theming/useTheme.js +0 -6
  678. package/lib/theming/useTheme.js.map +0 -1
  679. package/typings/stylis-plugin-extra-scope.d.ts +0 -3
@@ -1,59 +1,29 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { ZERO_WIDTH_SPACE_CSS } from '../../../lib/chars.js';
6
- import { memoizeGetStyles } from '../../../lib/theming/Emotion.js';
7
- import { getStyles } from '../Input.styles.js';
8
- export var getStylesLayout = memoizeGetStyles(function (emotion) {
9
- var styles = getStyles(emotion);
10
- return {
11
- root: function (t) {
12
- return styles.root(t);
13
- },
14
- input: function () {
15
- return emotion.css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-width: 0;\n overflow: hidden;\n position: relative;\n width: 100%;\n display: flex;\n "], ["\n min-width: 0;\n overflow: hidden;\n position: relative;\n width: 100%;\n display: flex;\n "])));
16
- },
17
- aside: function () {
18
- return emotion.css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::before {\n content: '", "';\n }\n "], ["\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::before {\n content: '", "';\n }\n "])), ZERO_WIDTH_SPACE_CSS);
19
- },
20
- icon: function (t) {
21
- return emotion.css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputIconColor);
22
- },
23
- iconFocus: function (t) {
24
- return emotion.css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputFocusedIconColor);
25
- },
26
- iconDisabled: function (t) {
27
- return emotion.css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n cursor: default;\n color: ", ";\n "], ["\n cursor: default;\n color: ", ";\n "])), t.inputIconColorDisabled);
28
- },
29
- text: function (t) {
30
- return emotion.css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputPlaceholderColor);
31
- },
32
- text6_4: function (t) {
33
- return emotion.css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputAffixColor);
34
- },
35
- textDisabled: function (t) {
36
- return emotion.css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputPlaceholderColorDisabled);
37
- },
38
- counter: function (t) {
39
- return emotion.css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n font-variant-numeric: tabular-nums;\n color: ", ";\n "], ["\n font-variant-numeric: tabular-nums;\n color: ", ";\n "])), t.inputCounterColor);
40
- },
41
- counterSmall: function (t) {
42
- return emotion.css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), t.inputCounterMarginLeftSmall);
43
- },
44
- counterMedium: function (t) {
45
- return emotion.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), t.inputCounterMarginLeftMedium);
46
- },
47
- counterLarge: function (t) {
48
- return emotion.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), t.inputCounterMarginLeftLarge);
49
- },
50
- counterError: function (t) {
51
- return emotion.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), t.inputCounterColorError);
52
- },
53
- counterHelp: function (t) {
54
- return emotion.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n margin-left: ", ";\n "], ["\n margin-left: ", ";\n "])), t.inputCounterHelpMarginLeft);
55
- },
56
- };
1
+ import { staticStyles } from '../../../lib/theming/staticStyles.js';
2
+ /** Правила — в `InputLayout.css`; здесь только имена классов. */
3
+ export var getStylesLayout = staticStyles({
4
+ root: 'react-ui-InputLayout-StylesLayout-root',
5
+ input: 'react-ui-InputLayout-StylesLayout-input',
6
+ aside: 'react-ui-InputLayout-StylesLayout-aside',
7
+ icon: 'react-ui-InputLayout-StylesLayout-icon',
8
+ iconSizeSmall: 'react-ui-InputLayout-StylesLayout-iconSizeSmall',
9
+ iconSizeMedium: 'react-ui-InputLayout-StylesLayout-iconSizeMedium',
10
+ iconSizeLarge: 'react-ui-InputLayout-StylesLayout-iconSizeLarge',
11
+ iconGapLeftSmall: 'react-ui-InputLayout-StylesLayout-iconGapLeftSmall',
12
+ iconGapLeftMedium: 'react-ui-InputLayout-StylesLayout-iconGapLeftMedium',
13
+ iconGapLeftLarge: 'react-ui-InputLayout-StylesLayout-iconGapLeftLarge',
14
+ iconGapRightSmall: 'react-ui-InputLayout-StylesLayout-iconGapRightSmall',
15
+ iconGapRightMedium: 'react-ui-InputLayout-StylesLayout-iconGapRightMedium',
16
+ iconGapRightLarge: 'react-ui-InputLayout-StylesLayout-iconGapRightLarge',
17
+ iconFocus: 'react-ui-InputLayout-StylesLayout-iconFocus',
18
+ iconDisabled: 'react-ui-InputLayout-StylesLayout-iconDisabled',
19
+ text: 'react-ui-InputLayout-StylesLayout-text',
20
+ text6_4: 'react-ui-InputLayout-StylesLayout-text6_4',
21
+ textDisabled: 'react-ui-InputLayout-StylesLayout-textDisabled',
22
+ counter: 'react-ui-InputLayout-StylesLayout-counter',
23
+ counterSmall: 'react-ui-InputLayout-StylesLayout-counterSmall',
24
+ counterMedium: 'react-ui-InputLayout-StylesLayout-counterMedium',
25
+ counterLarge: 'react-ui-InputLayout-StylesLayout-counterLarge',
26
+ counterError: 'react-ui-InputLayout-StylesLayout-counterError',
27
+ counterHelp: 'react-ui-InputLayout-StylesLayout-counterHelp',
57
28
  });
58
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14;
59
29
  //# sourceMappingURL=InputLayout.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLayout.styles.js","sourceRoot":"","sources":["InputLayout.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;A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C,iBAAiB,EAC5B;QACJ,CAAC;QACD,YAAY,YAAC,CAAQ;YACnB,OAAO,OAAO,CAAC,GAAG,2GAAA,yBACD,EAA6B,WAC7C,KADgB,CAAC,CAAC,2BAA2B,EAC5C;QACJ,CAAC;QACD,aAAa,YAAC,CAAQ;YACpB,OAAO,OAAO,CAAC,GAAG,2GAAA,yBACD,EAA8B,WAC9C,KADgB,CAAC,CAAC,4BAA4B,EAC7C;QACJ,CAAC;QACD,YAAY,YAAC,CAAQ;YACnB,OAAO,OAAO,CAAC,GAAG,2GAAA,yBACD,EAA6B,WAC7C,KADgB,CAAC,CAAC,2BAA2B,EAC5C;QACJ,CAAC;QACD,YAAY,YAAC,CAAQ;YACnB,OAAO,OAAO,CAAC,GAAG,qGAAA,mBACP,EAAwB,WAClC,KADU,CAAC,CAAC,sBAAsB,EACjC;QACJ,CAAC;QACD,WAAW,YAAC,CAAQ;YAClB,OAAO,OAAO,CAAC,GAAG,2GAAA,yBACD,EAA4B,WAC5C,KADgB,CAAC,CAAC,0BAA0B,EAC3C;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { ZERO_WIDTH_SPACE_CSS } from '../../../lib/chars.js';\nimport { memoizeGetStyles } from '../../../lib/theming/Emotion.js';\nimport type { Theme } from '../../../lib/theming/Theme.js';\nimport { getStyles } from '../Input.styles.js';\n\nexport const getStylesLayout = memoizeGetStyles((emotion: Emotion) => {\n const styles = getStyles(emotion);\n\n return {\n root(t: Theme) {\n return styles.root(t);\n },\n input() {\n return emotion.css`\n min-width: 0;\n overflow: hidden;\n position: relative;\n width: 100%;\n display: flex;\n `;\n },\n aside() {\n return emotion.css`\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n\n &::before {\n content: '${ZERO_WIDTH_SPACE_CSS}';\n }\n `;\n },\n icon(t: Theme) {\n return emotion.css`\n color: ${t.inputIconColor};\n `;\n },\n iconFocus(t: Theme) {\n return emotion.css`\n color: ${t.inputFocusedIconColor};\n `;\n },\n iconDisabled(t: Theme) {\n return emotion.css`\n cursor: default;\n color: ${t.inputIconColorDisabled};\n `;\n },\n text(t: Theme) {\n return emotion.css`\n color: ${t.inputPlaceholderColor};\n `;\n },\n\n text6_4(t: Theme) {\n return emotion.css`\n color: ${t.inputAffixColor};\n `;\n },\n\n textDisabled(t: Theme) {\n return emotion.css`\n color: ${t.inputPlaceholderColorDisabled};\n `;\n },\n counter(t: Theme) {\n return emotion.css`\n font-variant-numeric: tabular-nums;\n color: ${t.inputCounterColor};\n `;\n },\n counterSmall(t: Theme) {\n return emotion.css`\n margin-left: ${t.inputCounterMarginLeftSmall};\n `;\n },\n counterMedium(t: Theme) {\n return emotion.css`\n margin-left: ${t.inputCounterMarginLeftMedium};\n `;\n },\n counterLarge(t: Theme) {\n return emotion.css`\n margin-left: ${t.inputCounterMarginLeftLarge};\n `;\n },\n counterError(t: Theme) {\n return emotion.css`\n color: ${t.inputCounterColorError};\n `;\n },\n counterHelp(t: Theme) {\n return emotion.css`\n margin-left: ${t.inputCounterHelpMarginLeft};\n `;\n },\n };\n});\n"]}
1
+ {"version":3,"file":"InputLayout.styles.js","sourceRoot":"","sources":["InputLayout.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,iEAAiE;AACjE,MAAM,CAAC,IAAM,eAAe,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,wCAAwC;IAC9C,KAAK,EAAE,yCAAyC;IAChD,KAAK,EAAE,yCAAyC;IAChD,IAAI,EAAE,wCAAwC;IAC9C,aAAa,EAAE,iDAAiD;IAChE,cAAc,EAAE,kDAAkD;IAClE,aAAa,EAAE,iDAAiD;IAChE,gBAAgB,EAAE,oDAAoD;IACtE,iBAAiB,EAAE,qDAAqD;IACxE,gBAAgB,EAAE,oDAAoD;IACtE,iBAAiB,EAAE,qDAAqD;IACxE,kBAAkB,EAAE,sDAAsD;IAC1E,iBAAiB,EAAE,qDAAqD;IACxE,SAAS,EAAE,6CAA6C;IACxD,YAAY,EAAE,gDAAgD;IAC9D,IAAI,EAAE,wCAAwC;IAC9C,OAAO,EAAE,2CAA2C;IACpD,YAAY,EAAE,gDAAgD;IAC9D,OAAO,EAAE,2CAA2C;IACpD,YAAY,EAAE,gDAAgD;IAC9D,aAAa,EAAE,iDAAiD;IAChE,YAAY,EAAE,gDAAgD;IAC9D,YAAY,EAAE,gDAAgD;IAC9D,WAAW,EAAE,+CAA+C;CAC7D,CAAC,CAAC","sourcesContent":["import { staticStyles } from '../../../lib/theming/staticStyles.js';\n\n/** Правила — в `InputLayout.css`; здесь только имена классов. */\nexport const getStylesLayout = staticStyles({\n root: 'react-ui-InputLayout-StylesLayout-root',\n input: 'react-ui-InputLayout-StylesLayout-input',\n aside: 'react-ui-InputLayout-StylesLayout-aside',\n icon: 'react-ui-InputLayout-StylesLayout-icon',\n iconSizeSmall: 'react-ui-InputLayout-StylesLayout-iconSizeSmall',\n iconSizeMedium: 'react-ui-InputLayout-StylesLayout-iconSizeMedium',\n iconSizeLarge: 'react-ui-InputLayout-StylesLayout-iconSizeLarge',\n iconGapLeftSmall: 'react-ui-InputLayout-StylesLayout-iconGapLeftSmall',\n iconGapLeftMedium: 'react-ui-InputLayout-StylesLayout-iconGapLeftMedium',\n iconGapLeftLarge: 'react-ui-InputLayout-StylesLayout-iconGapLeftLarge',\n iconGapRightSmall: 'react-ui-InputLayout-StylesLayout-iconGapRightSmall',\n iconGapRightMedium: 'react-ui-InputLayout-StylesLayout-iconGapRightMedium',\n iconGapRightLarge: 'react-ui-InputLayout-StylesLayout-iconGapRightLarge',\n iconFocus: 'react-ui-InputLayout-StylesLayout-iconFocus',\n iconDisabled: 'react-ui-InputLayout-StylesLayout-iconDisabled',\n text: 'react-ui-InputLayout-StylesLayout-text',\n text6_4: 'react-ui-InputLayout-StylesLayout-text6_4',\n textDisabled: 'react-ui-InputLayout-StylesLayout-textDisabled',\n counter: 'react-ui-InputLayout-StylesLayout-counter',\n counterSmall: 'react-ui-InputLayout-StylesLayout-counterSmall',\n counterMedium: 'react-ui-InputLayout-StylesLayout-counterMedium',\n counterLarge: 'react-ui-InputLayout-StylesLayout-counterLarge',\n counterError: 'react-ui-InputLayout-StylesLayout-counterError',\n counterHelp: 'react-ui-InputLayout-StylesLayout-counterHelp',\n});\n"]}
@@ -15,7 +15,8 @@ import { Tooltip } from '../../../components/Tooltip/Tooltip.js';
15
15
  import { QuestionCircleIcon16Light } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.js';
16
16
  import { QuestionCircleIcon20Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.js';
17
17
  import { QuestionCircleIcon24Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.js';
18
- import { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';
18
+ import { useStyles } from '../../../lib/renderEnvironment/index.js';
19
+ import { concatClassNames as cx } from '../../../lib/theming/Emotion.js';
19
20
  import { ThemeContext } from '../../../lib/theming/ThemeContext.js';
20
21
  import { isFunction } from '../../../lib/utils.js';
21
22
  import { InputDataTids } from '../Input.js';
@@ -25,7 +26,6 @@ export var InputLayoutAsideCounter = function (_a) {
25
26
  var _b;
26
27
  var length = _a.length, inputValue = _a.inputValue, help = _a.help, onCloseHelp = _a.onCloseHelp, size = _a.size;
27
28
  var theme = React.useContext(ThemeContext);
28
- var cx = useEmotion().cx;
29
29
  var stylesLayout = useStyles(getStylesLayout);
30
30
  var renderTooltipContent = useCallback(function () {
31
31
  if (typeof help === 'function') {
@@ -55,21 +55,21 @@ export var InputLayoutAsideCounter = function (_a) {
55
55
  var getCounterSizeClassName = function () {
56
56
  switch (size) {
57
57
  case 'large':
58
- return stylesLayout.counterLarge(theme);
58
+ return stylesLayout.counterLarge();
59
59
  case 'medium':
60
- return stylesLayout.counterMedium(theme);
60
+ return stylesLayout.counterMedium();
61
61
  case 'small':
62
62
  default:
63
- return stylesLayout.counterSmall(theme);
63
+ return stylesLayout.counterSmall();
64
64
  }
65
65
  };
66
66
  var inputValueLength = inputValue ? inputValue.length : 0;
67
67
  var counterValue = length - inputValueLength;
68
68
  var isNegativeValue = counterValue < 0;
69
- return (React.createElement("span", { "data-tid": InputDataTids.counter, className: cx(asideClassName, getCounterSizeClassName(), stylesLayout.counter(theme), (_b = {},
70
- _b[stylesLayout.counterError(theme)] = isNegativeValue,
69
+ return (React.createElement("span", { "data-tid": InputDataTids.counter, className: cx(asideClassName, getCounterSizeClassName(), stylesLayout.counter(), (_b = {},
70
+ _b[stylesLayout.counterError()] = isNegativeValue,
71
71
  _b)) },
72
72
  isNegativeValue ? "".concat(MINUS_SIGN).concat(-counterValue) : counterValue,
73
- help && React.createElement("span", { className: stylesLayout.counterHelp(theme) }, counterHelp)));
73
+ help && React.createElement("span", { className: stylesLayout.counterHelp() }, counterHelp)));
74
74
  };
75
75
  //# sourceMappingURL=InputLayoutAsideCounter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLayoutAsideCounter.js","sourceRoot":"","sources":["InputLayoutAsideCounter.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6EAA6E,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,EAAE,2BAA2B,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACn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AC;AACJ,CAAC,CAAC","sourcesContent":["import type { SyntheticEvent } from 'react';\nimport React, { useCallback } from 'react';\n\nimport { MINUS_SIGN } from '../../../components/CurrencyInput/constants.js';\nimport { Tooltip } from '../../../components/Tooltip/Tooltip.js';\nimport { QuestionCircleIcon16Light } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.js';\nimport { QuestionCircleIcon20Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.js';\nimport { QuestionCircleIcon24Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.js';\nimport { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { isFunction } from '../../../lib/utils.js';\nimport { InputDataTids, type InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\n\nexport interface InputLayoutAsideCounterProps {\n length: number;\n inputValue: InputProps['value'];\n help: InputProps['counterHelp'];\n onCloseHelp?: () => void;\n size?: SizeProp;\n}\n\nconst handleHelpMouseDown = (e: SyntheticEvent) => e.preventDefault();\n\nexport const InputLayoutAsideCounter: React.FunctionComponent<InputLayoutAsideCounterProps> = ({\n length,\n inputValue,\n help,\n onCloseHelp,\n size,\n}) => {\n const theme = React.useContext(ThemeContext);\n const { cx } = useEmotion();\n const stylesLayout = useStyles(getStylesLayout);\n\n const renderTooltipContent = useCallback(() => {\n if (typeof help === 'function') {\n return help();\n }\n return help;\n }, [help]);\n\n const getHelpIcon = () => {\n switch (size) {\n case 'large':\n return <QuestionCircleIcon24Regular {...helpIconProps} />;\n case 'medium':\n return <QuestionCircleIcon20Regular {...helpIconProps} />;\n case 'small':\n default:\n return <QuestionCircleIcon16Light {...helpIconProps} />;\n }\n };\n const helpIconProps = {\n onMouseDown: handleHelpMouseDown,\n color: theme.inputCounterHelpIconColor,\n 'data-tid': InputDataTids.counterHelpIcon,\n style: { cursor: 'pointer' },\n };\n const counterHelp = isFunction(help) ? (\n help()\n ) : (\n <Tooltip\n pos={'right bottom'}\n trigger={'click'}\n render={renderTooltipContent}\n onCloseClick={onCloseHelp}\n size={size}\n >\n {getHelpIcon()}\n </Tooltip>\n );\n\n const asideClassName = stylesLayout.aside();\n const getCounterSizeClassName = () => {\n switch (size) {\n case 'large':\n return stylesLayout.counterLarge(theme);\n case 'medium':\n return stylesLayout.counterMedium(theme);\n case 'small':\n default:\n return stylesLayout.counterSmall(theme);\n }\n };\n\n const inputValueLength = inputValue ? inputValue.length : 0;\n const counterValue = length - inputValueLength;\n const isNegativeValue = counterValue < 0;\n\n return (\n <span\n data-tid={InputDataTids.counter}\n className={cx(asideClassName, getCounterSizeClassName(), stylesLayout.counter(theme), {\n [stylesLayout.counterError(theme)]: isNegativeValue,\n })}\n >\n {isNegativeValue ? `${MINUS_SIGN}${-counterValue}` : counterValue}\n {help && <span className={stylesLayout.counterHelp(theme)}>{counterHelp}</span>}\n </span>\n );\n};\n"]}
1
+ {"version":3,"file":"InputLayoutAsideCounter.js","sourceRoot":"","sources":["InputLayoutAsideCounter.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6EAA6E,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,EAAE,2BAA2B,EAAE,MAAM,+EAA+E,CAAC;AAC5H,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,gBAAgB,IAAI,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,O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port { MINUS_SIGN } from '../../../components/CurrencyInput/constants.js';\nimport { Tooltip } from '../../../components/Tooltip/Tooltip.js';\nimport { QuestionCircleIcon16Light } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon16Light.js';\nimport { QuestionCircleIcon20Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon20Regular.js';\nimport { QuestionCircleIcon24Regular } from '../../../internal/icons2022/QuestionCircleIcon/QuestionCircleIcon24Regular.js';\nimport { useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { concatClassNames as cx } from '../../../lib/theming/Emotion.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { isFunction } from '../../../lib/utils.js';\nimport { InputDataTids, type InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\n\nexport interface InputLayoutAsideCounterProps {\n length: number;\n inputValue: InputProps['value'];\n help: InputProps['counterHelp'];\n onCloseHelp?: () => void;\n size?: SizeProp;\n}\n\nconst handleHelpMouseDown = (e: SyntheticEvent) => e.preventDefault();\n\nexport const InputLayoutAsideCounter: React.FunctionComponent<InputLayoutAsideCounterProps> = ({\n length,\n inputValue,\n help,\n onCloseHelp,\n size,\n}) => {\n const theme = React.useContext(ThemeContext);\n const stylesLayout = useStyles(getStylesLayout);\n\n const renderTooltipContent = useCallback(() => {\n if (typeof help === 'function') {\n return help();\n }\n return help;\n }, [help]);\n\n const getHelpIcon = () => {\n switch (size) {\n case 'large':\n return <QuestionCircleIcon24Regular {...helpIconProps} />;\n case 'medium':\n return <QuestionCircleIcon20Regular {...helpIconProps} />;\n case 'small':\n default:\n return <QuestionCircleIcon16Light {...helpIconProps} />;\n }\n };\n const helpIconProps = {\n onMouseDown: handleHelpMouseDown,\n color: theme.inputCounterHelpIconColor,\n 'data-tid': InputDataTids.counterHelpIcon,\n style: { cursor: 'pointer' },\n };\n const counterHelp = isFunction(help) ? (\n help()\n ) : (\n <Tooltip\n pos={'right bottom'}\n trigger={'click'}\n render={renderTooltipContent}\n onCloseClick={onCloseHelp}\n size={size}\n >\n {getHelpIcon()}\n </Tooltip>\n );\n\n const asideClassName = stylesLayout.aside();\n const getCounterSizeClassName = () => {\n switch (size) {\n case 'large':\n return stylesLayout.counterLarge();\n case 'medium':\n return stylesLayout.counterMedium();\n case 'small':\n default:\n return stylesLayout.counterSmall();\n }\n };\n\n const inputValueLength = inputValue ? inputValue.length : 0;\n const counterValue = length - inputValueLength;\n const isNegativeValue = counterValue < 0;\n\n return (\n <span\n data-tid={InputDataTids.counter}\n className={cx(asideClassName, getCounterSizeClassName(), stylesLayout.counter(), {\n [stylesLayout.counterError()]: isNegativeValue,\n })}\n >\n {isNegativeValue ? `${MINUS_SIGN}${-counterValue}` : counterValue}\n {help && <span className={stylesLayout.counterHelp()}>{counterHelp}</span>}\n </span>\n );\n};\n"]}
@@ -1,43 +1,37 @@
1
1
  import React from 'react';
2
+ import { ALIASES_TO_SIZES } from '../../../internal/icons2022/iconConstants.js';
2
3
  import { isElement } from '../../../lib/react-is.js';
3
- import { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';
4
- import { ThemeContext } from '../../../lib/theming/ThemeContext.js';
4
+ import { useStyles } from '../../../lib/renderEnvironment/index.js';
5
+ import { concatClassNames as cx } from '../../../lib/theming/Emotion.js';
5
6
  import { isKonturIcon } from '../../../lib/utils.js';
6
7
  import { getStylesLayout } from './InputLayout.styles.js';
7
8
  import { InputLayoutContext } from './InputLayoutContext.js';
9
+ /** Классы размера иконки и отступа от поля — по размеру контрола и стороне. */
10
+ var SIZE_CLASS = {
11
+ small: 'iconSizeSmall',
12
+ medium: 'iconSizeMedium',
13
+ large: 'iconSizeLarge',
14
+ };
15
+ var GAP_CLASS = {
16
+ left: { small: 'iconGapLeftSmall', medium: 'iconGapLeftMedium', large: 'iconGapLeftLarge' },
17
+ right: { small: 'iconGapRightSmall', medium: 'iconGapRightMedium', large: 'iconGapRightLarge' },
18
+ };
8
19
  export var InputLayoutAsideIcon = function (_a) {
9
20
  var _b;
10
21
  var _c = _a.icon, icon = _c === void 0 ? null : _c, side = _a.side;
11
- var theme = React.useContext(ThemeContext);
12
- var cx = useEmotion().cx;
13
22
  var stylesLayout = useStyles(getStylesLayout);
14
23
  var _d = React.useContext(InputLayoutContext), focused = _d.focused, disabled = _d.disabled, size = _d.size;
15
- var sizes = {
16
- small: parseInt(theme.inputIconSizeSmall),
17
- medium: parseInt(theme.inputIconSizeMedium),
18
- large: parseInt(theme.inputIconSizeLarge),
19
- };
20
- var gaps = {
21
- small: parseInt(theme.inputIconGapSmall),
22
- medium: parseInt(theme.inputIconGapMedium),
23
- large: parseInt(theme.inputIconGapLarge),
24
- };
25
24
  var _icon = icon instanceof Function ? icon() : icon;
26
25
  if (isElement(icon) && isKonturIcon(icon)) {
27
26
  var iconProps = icon.props;
27
+ // Число по алиасу, а не значение темы: иконке нужен именно размер в
28
+ // пикселях — по нему она выбирает отрисовку, а иконки из общего пакета
29
+ // алиас в атрибут `width` кладут как есть и остаются вовсе без размера.
30
+ // Точный размер поверх этого задаёт класс со ссылкой на переменную темы.
28
31
  _icon = React.cloneElement(icon, {
29
- size: (_b = iconProps.size) !== null && _b !== void 0 ? _b : sizes[size],
32
+ size: (_b = iconProps.size) !== null && _b !== void 0 ? _b : ALIASES_TO_SIZES[size],
30
33
  });
31
34
  }
32
- var style = {};
33
- if (side) {
34
- if (side === 'right') {
35
- style.marginLeft = gaps[size];
36
- }
37
- else {
38
- style.marginRight = gaps[size];
39
- }
40
- }
41
- return _icon ? (React.createElement("span", { style: style, className: cx(stylesLayout.aside(), stylesLayout.icon(theme), focused && stylesLayout.iconFocus(theme), disabled && stylesLayout.iconDisabled(theme)) }, _icon)) : null;
35
+ return _icon ? (React.createElement("span", { className: cx(stylesLayout.aside(), stylesLayout.icon(), stylesLayout[SIZE_CLASS[size]](), stylesLayout[GAP_CLASS[side][size]](), focused && stylesLayout.iconFocus(), disabled && stylesLayout.iconDisabled()) }, _icon)) : null;
42
36
  };
43
37
  //# sourceMappingURL=InputLayoutAsideIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLayoutAsideIcon.js","sourceRoot":"","sources":["InputLayoutAsideIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,MAAM,CAAC,IAAM,oBAAoB,GAAuD,UAAC,EAAqB;;QAAnB,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA,EAAE,IAAI,UAAA;IAC1G,IAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,IAAA,EAAE,GAAK,UAAU,EAAE,GAAjB,CAAkB;IAC5B,IAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAA,KAA8B,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAhE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,IAAI,UAAyC,CAAC;IAEzE,IAAM,KAAK,GAA6B;QACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACzC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,mBAAmB,CAAC;QAC3C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC;KAC1C,CAAC;IACF,IAAM,IAAI,GAA6B;QACrC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACxC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,kBAAkB,CAAC;QAC1C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,iBAAiB,CAAC;KACzC,CAAC;IAEF,IAAI,KAAK,GAAG,IAAI,YAAY,QAAQ,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IACrD,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,IAAM,SAAS,GAAG,IAAI,CAAC,KAAkB,CAAC;QAC1C,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,MAAA,SAAS,CAAC,IAAI,mCAAI,KAAK,CAAC,IAAI,CAAC;SACvB,CAAC,CAAC;IAClB,CAAC;IAED,IAAM,KAAK,GAAwB,EAAE,CAAC;IACtC,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACrB,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,EAAE,CACX,YAAY,CAAC,KAAK,EAAE,EACpB,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EACxB,OAAO,IAAI,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,EACxC,QAAQ,IAAI,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAC7C,IAEA,KAAK,CACD,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { IconProps } from '../../../internal/icons2022/BaseIcon.js';\nimport { isElement } from '../../../lib/react-is.js';\nimport { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { isKonturIcon } from '../../../lib/utils.js';\nimport type { InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\nimport { InputLayoutContext } from './InputLayoutContext.js';\n\nexport interface InputLayoutAsideIconProps {\n icon: InputProps['leftIcon'] | InputProps['rightIcon'];\n side: 'left' | 'right';\n}\n\nexport const InputLayoutAsideIcon: React.FunctionComponent<InputLayoutAsideIconProps> = ({ icon = null, side }) => {\n const theme = React.useContext(ThemeContext);\n const { cx } = useEmotion();\n const stylesLayout = useStyles(getStylesLayout);\n const { focused, disabled, size } = React.useContext(InputLayoutContext);\n\n const sizes: Record<SizeProp, number> = {\n small: parseInt(theme.inputIconSizeSmall),\n medium: parseInt(theme.inputIconSizeMedium),\n large: parseInt(theme.inputIconSizeLarge),\n };\n const gaps: Record<SizeProp, number> = {\n small: parseInt(theme.inputIconGapSmall),\n medium: parseInt(theme.inputIconGapMedium),\n large: parseInt(theme.inputIconGapLarge),\n };\n\n let _icon = icon instanceof Function ? icon() : icon;\n if (isElement(icon) && isKonturIcon(icon)) {\n const iconProps = icon.props as IconProps;\n _icon = React.cloneElement(icon, {\n size: iconProps.size ?? sizes[size],\n } as IconProps);\n }\n\n const style: React.CSSProperties = {};\n if (side) {\n if (side === 'right') {\n style.marginLeft = gaps[size];\n } else {\n style.marginRight = gaps[size];\n }\n }\n\n return _icon ? (\n <span\n style={style}\n className={cx(\n stylesLayout.aside(),\n stylesLayout.icon(theme),\n focused && stylesLayout.iconFocus(theme),\n disabled && stylesLayout.iconDisabled(theme),\n )}\n >\n {_icon}\n </span>\n ) : null;\n};\n"]}
1
+ {"version":3,"file":"InputLayoutAsideIcon.js","sourceRoot":"","sources":["InputLayoutAsideIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OA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SAAS,GAAG,IAAI,CAAC,KAAkB,CAAC;QAC1C,oEAAoE;QACpE,uEAAuE;QACvE,wEAAwE;QACxE,yEAAyE;QACzE,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,MAAA,SAAS,CAAC,IAAI,mCAAI,gBAAgB,CAAC,IAAI,CAAC;SAClC,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,8BACE,SAAS,EAAE,EAAE,CACX,YAAY,CAAC,KAAK,EAAE,EACpB,YAAY,CAAC,IAAI,EAAE,EACnB,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,EAChC,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EACrC,OAAO,IAAI,YAAY,CAAC,SAAS,EAAE,EACnC,QAAQ,IAAI,YAAY,CAAC,YAAY,EAAE,CACxC,IAEA,KAAK,CACD,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport type { IconProps } from '../../../internal/icons2022/BaseIcon.js';\nimport { ALIASES_TO_SIZES } from '../../../internal/icons2022/iconConstants.js';\nimport { isElement } from '../../../lib/react-is.js';\nimport { useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { concatClassNames as cx } from '../../../lib/theming/Emotion.js';\nimport type { SizeProp } from '../../../lib/types/props.js';\nimport { isKonturIcon } from '../../../lib/utils.js';\nimport type { InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\nimport { InputLayoutContext } from './InputLayoutContext.js';\n\nexport interface InputLayoutAsideIconProps {\n icon: InputProps['leftIcon'] | InputProps['rightIcon'];\n side: 'left' | 'right';\n}\n\n/** Классы размера иконки и отступа от поля — по размеру контрола и стороне. */\nconst SIZE_CLASS: Record<SizeProp, 'iconSizeSmall' | 'iconSizeMedium' | 'iconSizeLarge'> = {\n small: 'iconSizeSmall',\n medium: 'iconSizeMedium',\n large: 'iconSizeLarge',\n};\n\nconst GAP_CLASS: Record<'left' | 'right', Record<SizeProp, keyof ReturnType<typeof getStylesLayout>>> = {\n left: { small: 'iconGapLeftSmall', medium: 'iconGapLeftMedium', large: 'iconGapLeftLarge' },\n right: { small: 'iconGapRightSmall', medium: 'iconGapRightMedium', large: 'iconGapRightLarge' },\n};\n\nexport const InputLayoutAsideIcon: React.FunctionComponent<InputLayoutAsideIconProps> = ({ icon = null, side }) => {\n const stylesLayout = useStyles(getStylesLayout);\n const { focused, disabled, size } = React.useContext(InputLayoutContext);\n\n let _icon = icon instanceof Function ? icon() : icon;\n if (isElement(icon) && isKonturIcon(icon)) {\n const iconProps = icon.props as IconProps;\n // Число по алиасу, а не значение темы: иконке нужен именно размер в\n // пикселях — по нему она выбирает отрисовку, а иконки из общего пакета\n // алиас в атрибут `width` кладут как есть и остаются вовсе без размера.\n // Точный размер поверх этого задаёт класс со ссылкой на переменную темы.\n _icon = React.cloneElement(icon, {\n size: iconProps.size ?? ALIASES_TO_SIZES[size],\n } as IconProps);\n }\n\n return _icon ? (\n <span\n className={cx(\n stylesLayout.aside(),\n stylesLayout.icon(),\n stylesLayout[SIZE_CLASS[size]](),\n stylesLayout[GAP_CLASS[side][size]](),\n focused && stylesLayout.iconFocus(),\n disabled && stylesLayout.iconDisabled(),\n )}\n >\n {_icon}\n </span>\n ) : null;\n};\n"]}
@@ -1,17 +1,17 @@
1
1
  import React from 'react';
2
- import { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';
2
+ import { useStyles } from '../../../lib/renderEnvironment/index.js';
3
+ import { concatClassNames as cx } from '../../../lib/theming/Emotion.js';
3
4
  import { ThemeContext } from '../../../lib/theming/ThemeContext.js';
4
5
  import { isThemeGTE } from '../../../lib/theming/ThemeHelpers.js';
5
6
  import { getStylesLayout } from './InputLayout.styles.js';
6
7
  import { InputLayoutContext } from './InputLayoutContext.js';
7
8
  export var InputLayoutAsideText = function (_a) {
8
9
  var _b = _a.text, text = _b === void 0 ? null : _b;
9
- var theme = React.useContext(ThemeContext);
10
- var cx = useEmotion().cx;
11
10
  var stylesLayout = useStyles(getStylesLayout);
12
11
  var disabled = React.useContext(InputLayoutContext).disabled;
12
+ var theme = React.useContext(ThemeContext);
13
13
  var themeGTE6_4 = isThemeGTE(theme, '6.4');
14
14
  var asideClassName = stylesLayout.aside();
15
- return text ? (React.createElement("span", { className: cx(asideClassName, stylesLayout.text(theme), themeGTE6_4 && stylesLayout.text6_4(theme), disabled && stylesLayout.textDisabled(theme)) }, text)) : null;
15
+ return text ? (React.createElement("span", { className: cx(asideClassName, stylesLayout.text(), themeGTE6_4 && stylesLayout.text6_4(), disabled && stylesLayout.textDisabled()) }, text)) : null;
16
16
  };
17
17
  //# sourceMappingURL=InputLayoutAsideText.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputLayoutAsideText.js","sourceRoot":"","sources":["InputLayoutAsideText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,MAAM,CAAC,IAAM,oBAAoB,GAAuD,UAAC,EAAe;QAAb,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA;IACpG,IAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,IAAA,EAAE,GAAK,UAAU,EAAE,GAAjB,CAAkB;IAC5B,IAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;IACxC,IAAA,QAAQ,GAAK,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,SAAzC,CAA0C;IAC1D,IAAM,WAAW,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7C,IAAM,cAAc,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC;IAE5C,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,8BACE,SAAS,EAAE,EAAE,CACX,cAAc,EACd,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EACxB,WAAW,IAAI,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,EAC1C,QAAQ,IAAI,YAAY,CAAC,YAAY,CAAC,KAAK,CAAC,CAC7C,IAEA,IAAI,CACA,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { useEmotion, useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport { isThemeGTE } from '../../../lib/theming/ThemeHelpers.js';\nimport type { InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\nimport { InputLayoutContext } from './InputLayoutContext.js';\n\nexport interface InputLayoutAsideTextProps {\n text: InputProps['prefix'] | InputProps['suffix'];\n}\n\nexport const InputLayoutAsideText: React.FunctionComponent<InputLayoutAsideTextProps> = ({ text = null }) => {\n const theme = React.useContext(ThemeContext);\n const { cx } = useEmotion();\n const stylesLayout = useStyles(getStylesLayout);\n const { disabled } = React.useContext(InputLayoutContext);\n const themeGTE6_4 = isThemeGTE(theme, '6.4');\n const asideClassName = stylesLayout.aside();\n\n return text ? (\n <span\n className={cx(\n asideClassName,\n stylesLayout.text(theme),\n themeGTE6_4 && stylesLayout.text6_4(theme),\n disabled && stylesLayout.textDisabled(theme),\n )}\n >\n {text}\n </span>\n ) : null;\n};\n"]}
1
+ {"version":3,"file":"InputLayoutAsideText.js","sourceRoot":"","sources":["InputLayoutAsideText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,gBAAgB,IAAI,EAAE,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,MAAM,CAAC,IAAM,oBAAoB,GAAuD,UAAC,EAAe;QAAb,YAAW,EAAX,IAAI,mBAAG,IAAI,KAAA;IACpG,IAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;IACxC,IAAA,QAAQ,GAAK,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,SAAzC,CAA0C;IAC1D,IAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAC7C,IAAM,WAAW,GAAG,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7C,IAAM,cAAc,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC;IAE5C,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,8BACE,SAAS,EAAE,EAAE,CACX,cAAc,EACd,YAAY,CAAC,IAAI,EAAE,EACnB,WAAW,IAAI,YAAY,CAAC,OAAO,EAAE,EACrC,QAAQ,IAAI,YAAY,CAAC,YAAY,EAAE,CACxC,IAEA,IAAI,CACA,CACR,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport { useStyles } from '../../../lib/renderEnvironment/index.js';\nimport { concatClassNames as cx } from '../../../lib/theming/Emotion.js';\nimport { ThemeContext } from '../../../lib/theming/ThemeContext.js';\nimport { isThemeGTE } from '../../../lib/theming/ThemeHelpers.js';\nimport type { InputProps } from '../Input.js';\nimport { getStylesLayout } from './InputLayout.styles.js';\nimport { InputLayoutContext } from './InputLayoutContext.js';\n\nexport interface InputLayoutAsideTextProps {\n text: InputProps['prefix'] | InputProps['suffix'];\n}\n\nexport const InputLayoutAsideText: React.FunctionComponent<InputLayoutAsideTextProps> = ({ text = null }) => {\n const stylesLayout = useStyles(getStylesLayout);\n const { disabled } = React.useContext(InputLayoutContext);\n const theme = React.useContext(ThemeContext);\n const themeGTE6_4 = isThemeGTE(theme, '6.4');\n const asideClassName = stylesLayout.aside();\n\n return text ? (\n <span\n className={cx(\n asideClassName,\n stylesLayout.text(),\n themeGTE6_4 && stylesLayout.text6_4(),\n disabled && stylesLayout.textDisabled(),\n )}\n >\n {text}\n </span>\n ) : null;\n};\n"]}
@@ -42,7 +42,6 @@ export declare class Kebab extends React.Component<KebabProps, KebabState> {
42
42
  private getProps;
43
43
  state: KebabState;
44
44
  private globalObject;
45
- private emotion;
46
45
  private cx;
47
46
  private styles;
48
47
  private theme;
@@ -79,7 +79,7 @@ var Kebab = /** @class */ (function (_super) {
79
79
  captionProps.toggleMenu();
80
80
  }
81
81
  };
82
- return (React.createElement("span", { role: "button", "data-tid": KebabDataTids.caption, tabIndex: disabled ? -1 : 0, onClick: handleCaptionClick, onKeyDown: handleCaptionKeyDown, onFocus: _this.handleFocus, onBlur: _this.handleBlur, className: _this.cx(_this.styles.kebab(_this.theme), size === 'small' && _this.styles.kebabSmall(_this.theme), size === 'medium' && _this.styles.kebabMedium(_this.theme), size === 'large' && _this.styles.kebabLarge(_this.theme), captionProps.opened && _this.styles.opened(_this.theme), disabled && _this.styles.disabled(), _this.state.focusedByTab && _this.styles.focused(_this.theme)), "aria-describedby": _this.props['aria-describedby'] }, _this.renderIcon()));
82
+ return (React.createElement("span", { role: "button", "data-tid": KebabDataTids.caption, tabIndex: disabled ? -1 : 0, onClick: handleCaptionClick, onKeyDown: handleCaptionKeyDown, onFocus: _this.handleFocus, onBlur: _this.handleBlur, className: _this.cx(_this.styles.kebab(), size === 'small' && _this.styles.kebabSmall(), size === 'medium' && _this.styles.kebabMedium(), size === 'large' && _this.styles.kebabLarge(), captionProps.opened && _this.styles.opened(), disabled && _this.styles.disabled(), _this.state.focusedByTab && _this.styles.focused()), "aria-describedby": _this.props['aria-describedby'] }, _this.renderIcon()));
83
83
  };
84
84
  _this.handleCaptionKeyDown = function (e, openMenu) {
85
85
  if (someKeys(isKeyEnter, isKeySpace, isKeyArrowVertical)(e)) {
@@ -122,7 +122,7 @@ var Kebab = /** @class */ (function (_super) {
122
122
  };
123
123
  Kebab.prototype.render = function () {
124
124
  var _this = this;
125
- this.styles = getStyles(this.emotion);
125
+ this.styles = getStyles();
126
126
  return (React.createElement(ThemeContext.Consumer, null, function (theme) {
127
127
  _this.theme = theme;
128
128
  return (React.createElement(ThemeContext.Provider, { value: ThemeFactory.create({
@@ -1 +1 @@
1
- {"version":3,"file":"Kebab.js","sourceRoot":"","sources":["Kebab.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAIlH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAAK,YAAY,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAE7E,OAAO,EAAE,QAAQ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AAC,IAAI,CAAC,EAAE,CAAC;YAC1C,IAAM,SAAS,GAAG,IAAI,CAAC,KAAkB,CAAC;YAC1C,IAAM,KAAK,GAA6B;gBACtC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;gBAC9C,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC;gBAChD,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;aAC/C,CAAC;YAEF,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;gBAC9B,IAAI,EAAE,MAAA,SAAS,CAAC,IAAI,mCAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;gBACxC,KAAK,EAAE,MAAA,SAAS,CAAC,KAAK,mCAAI,IAAI,CAAC,KAAK,CAAC,cAAc;aACvC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;IAxLa,yBAAmB,GAAG,OAAO,AAAV,CAAW;IAC9B,iBAAW,GAAG,OAAO,AAAV,CAAW;IAEtB,kBAAY,GAAiB;QACzC,MAAM,EAAE,cAAM,OAAA,SAAS,EAAT,CAAS;QACvB,OAAO,EAAE,cAAM,OAAA,SAAS,EAAT,CAAS;QACxB,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,CAAC;QACnE,iBAAiB,EAAE,SAAS;KAC7B,AALyB,CAKxB;IATS,KAAK;QAHjB,qBAAqB;QACrB,QAAQ;QACR,QAAQ;OACI,KAAK,CA0LjB;IAAD,YAAC;CAAA,AA1LD,CAA2B,KAAK,CAAC,SAAS,GA0LzC;SA1LY,KAAK","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\nimport type { AriaAttributes, HTMLAttributes, JSX } from 'react';\nimport React from 'react';\n\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes.js';\nimport type { IconProps } from '../../internal/icons2022/BaseIcon.js';\nimport type { PopupPositionsType } from '../../internal/Popup/index.js';\nimport type { PopupMenuCaptionProps, PopupMenuProps } from '../../internal/PopupMenu/index.js';\nimport { PopupMenu } from '../../internal/PopupMenu/index.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { isTestEnv } from '../../lib/currentEnvironment.js';\nimport { isKeyArrowVertical, isKeyEnter, isKeySpace, someKeys } from '../../lib/events/keyboard/identifiers.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport * as LayoutEvents from '../../lib/LayoutEvents.js';\nimport { isElement } from '../../lib/react-is.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { isKonturIcon } from '../../lib/utils.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { getStyles } from './Kebab.styles.js';\nimport { KebabIcon } from './KebabIcon.js';\n\nexport interface KebabProps\n extends\n Pick<AriaAttributes, 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n Pick<PopupMenuProps, 'onOpen' | 'onClose' | 'popupMenuId' | 'preventIconsOffset'>,\n CommonProps {\n /** Размер кнопки. */\n size?: SizeProp;\n\n /** Список доступных позиций выпадающего меню относительно кнопки.\n * @default ['bottom left', 'bottom right', 'top left', 'top right'].\n */\n positions?: PopupPositionsType[];\n\n /** Максимальная высота меню. */\n menuMaxHeight?: number | string;\n\n /** Блокирует кнопку. */\n disabled?: boolean;\n\n /** Отключает анимацию выпадающего меню. */\n disableAnimations?: boolean;\n\n /** Заменяет иконку кебаба у кнопки. */\n icon?: React.ReactNode;\n\n /** @ignore */\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n}\n\nexport const KebabDataTids = {\n caption: 'Kebab__caption',\n} as const;\n\nexport interface KebabState {\n anchor: Nullable<HTMLElement>;\n focusedByTab: boolean;\n}\n\ntype DefaultProps = Required<Pick<KebabProps, 'onOpen' | 'onClose' | 'positions' | 'disableAnimations'>>;\n\n/**\n * Кебаб-меню содержит действия с объектом.\n */\n@withRenderEnvironment\n@rootNode\n@withSize\nexport class Kebab extends React.Component<KebabProps, KebabState> {\n public static __KONTUR_REACT_UI__ = 'Kebab';\n public static displayName = 'Kebab';\n\n public static defaultProps: DefaultProps = {\n onOpen: () => undefined,\n onClose: () => undefined,\n positions: ['bottom left', 'bottom right', 'top left', 'top right'],\n disableAnimations: isTestEnv,\n };\n\n private getProps = createPropsGetter(Kebab.defaultProps);\n\n public state: KebabState = {\n focusedByTab: false,\n anchor: null,\n };\n\n private globalObject!: GlobalObject;\n private emotion!: Emotion;\n private cx!: Emotion['cx'];\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private size!: SizeProp;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private keyListener!: KeyListener;\n\n private listener: {\n remove: () => void;\n } = {\n remove: () => undefined,\n };\n\n public componentDidMount() {\n this.keyListener = new KeyListener(this.globalObject);\n /** addListener'у нужен колбэк в аргумент */\n this.listener = LayoutEvents.addListener(() => undefined, this.globalObject);\n }\n\n public componentWillUnmount() {\n this.listener.remove();\n }\n\n public render(): JSX.Element {\n this.styles = getStyles(this.emotion);\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <ThemeContext.Provider\n value={ThemeFactory.create(\n {\n popupMargin: theme.kebabMargin,\n },\n theme,\n )}\n >\n {this.renderMain()}\n </ThemeContext.Provider>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { disabled } = this.props;\n const { positions, disableAnimations, onOpen, onClose } = this.getProps();\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props} {...getVisualStateDataAttributes({ disabled })}>\n <PopupMenu\n id={this.props.id}\n popupHasPin={false}\n preventIconsOffset={this.props.preventIconsOffset}\n positions={positions}\n onChangeMenuState={this.handleChangeMenuState}\n caption={this.renderCaption}\n disableAnimations={disableAnimations}\n menuMaxHeight={this.props.menuMaxHeight}\n onOpen={onOpen}\n onClose={onClose}\n popupMenuId={this.props.popupMenuId}\n aria-label={this.props['aria-label']}\n >\n {!disabled && this.props.children}\n </PopupMenu>\n </CommonWrapper>\n );\n }\n\n private renderCaption = (captionProps: PopupMenuCaptionProps) => {\n const { disabled } = this.getProps();\n const size = this.size;\n const handleCaptionKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disabled) {\n this.handleCaptionKeyDown(event, captionProps.openMenu);\n }\n };\n\n const handleCaptionClick = () => {\n if (!disabled) {\n captionProps.toggleMenu();\n }\n };\n\n return (\n <span\n role=\"button\"\n data-tid={KebabDataTids.caption}\n tabIndex={disabled ? -1 : 0}\n onClick={handleCaptionClick}\n onKeyDown={handleCaptionKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n className={this.cx(\n this.styles.kebab(this.theme),\n size === 'small' && this.styles.kebabSmall(this.theme),\n size === 'medium' && this.styles.kebabMedium(this.theme),\n size === 'large' && this.styles.kebabLarge(this.theme),\n captionProps.opened && this.styles.opened(this.theme),\n disabled && this.styles.disabled(),\n this.state.focusedByTab && this.styles.focused(this.theme),\n )}\n aria-describedby={this.props['aria-describedby']}\n >\n {this.renderIcon()}\n </span>\n );\n };\n\n private handleCaptionKeyDown = (\n e: React.KeyboardEvent<HTMLDivElement>,\n openMenu: PopupMenuCaptionProps['openMenu'],\n ) => {\n if (someKeys(isKeyEnter, isKeySpace, isKeyArrowVertical)(e)) {\n e.preventDefault();\n openMenu(true);\n }\n };\n\n private handleChangeMenuState = (isOpened: boolean, restoreFocus: boolean): void => {\n this.setState({\n focusedByTab: !isOpened && restoreFocus,\n });\n };\n\n private handleFocus = () => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n }\n };\n\n private handleBlur = () => {\n this.setState({\n focusedByTab: false,\n });\n };\n\n private renderIcon() {\n const { icon = <KebabIcon /> } = this.getProps();\n\n if (isElement(icon) && isKonturIcon(icon)) {\n const iconProps = icon.props as IconProps;\n const sizes: Record<SizeProp, number> = {\n small: parseInt(this.theme.kebabIconSizeSmall),\n medium: parseInt(this.theme.kebabIconSizeMedium),\n large: parseInt(this.theme.kebabIconSizeLarge),\n };\n\n return React.cloneElement(icon, {\n size: iconProps.size ?? sizes[this.size],\n color: iconProps.color ?? this.theme.kebabIconColor,\n } as IconProps);\n }\n\n return icon;\n }\n}\n"]}
1
+ {"version":3,"file":"Kebab.js","sourceRoot":"","sources":["Kebab.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oEAAoE,CAAC;AAIlH,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AAChH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,KAA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I,CAAC,EAAE,CAAC;YAC1C,IAAM,SAAS,GAAG,IAAI,CAAC,KAAkB,CAAC;YAC1C,IAAM,KAAK,GAA6B;gBACtC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;gBAC9C,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC;gBAChD,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC;aAC/C,CAAC;YAEF,OAAO,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE;gBAC9B,IAAI,EAAE,MAAA,SAAS,CAAC,IAAI,mCAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;gBACxC,KAAK,EAAE,MAAA,SAAS,CAAC,KAAK,mCAAI,IAAI,CAAC,KAAK,CAAC,cAAc;aACvC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;IAvLa,yBAAmB,GAAG,OAAO,AAAV,CAAW;IAC9B,iBAAW,GAAG,OAAO,AAAV,CAAW;IAEtB,kBAAY,GAAiB;QACzC,MAAM,EAAE,cAAM,OAAA,SAAS,EAAT,CAAS;QACvB,OAAO,EAAE,cAAM,OAAA,SAAS,EAAT,CAAS;QACxB,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,CAAC;QACnE,iBAAiB,EAAE,SAAS;KAC7B,AALyB,CAKxB;IATS,KAAK;QAHjB,qBAAqB;QACrB,QAAQ;QACR,QAAQ;OACI,KAAK,CAyLjB;IAAD,YAAC;CAAA,AAzLD,CAA2B,KAAK,CAAC,SAAS,GAyLzC;SAzLY,KAAK","sourcesContent":["import type { AriaAttributes, HTMLAttributes, JSX } from 'react';\nimport React from 'react';\n\nimport type { CommonProps } from '../../internal/CommonWrapper/index.js';\nimport { CommonWrapper } from '../../internal/CommonWrapper/index.js';\nimport { getVisualStateDataAttributes } from '../../internal/CommonWrapper/utils/getVisualStateDataAttributes.js';\nimport type { IconProps } from '../../internal/icons2022/BaseIcon.js';\nimport type { PopupPositionsType } from '../../internal/Popup/index.js';\nimport type { PopupMenuCaptionProps, PopupMenuProps } from '../../internal/PopupMenu/index.js';\nimport { PopupMenu } from '../../internal/PopupMenu/index.js';\nimport { createPropsGetter } from '../../lib/createPropsGetter.js';\nimport { isTestEnv } from '../../lib/currentEnvironment.js';\nimport { isKeyArrowVertical, isKeyEnter, isKeySpace, someKeys } from '../../lib/events/keyboard/identifiers.js';\nimport { KeyListener } from '../../lib/events/keyListener.js';\nimport type { GlobalObject } from '../../lib/globalObject.js';\nimport * as LayoutEvents from '../../lib/LayoutEvents.js';\nimport { isElement } from '../../lib/react-is.js';\nimport { withRenderEnvironment } from '../../lib/renderEnvironment/index.js';\nimport type { TGetRootNode, TSetRootNode } from '../../lib/rootNode/index.js';\nimport { rootNode } from '../../lib/rootNode/index.js';\nimport { withSize } from '../../lib/size/SizeDecorator.js';\nimport type { ClassNames } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory.js';\nimport type { SizeProp } from '../../lib/types/props.js';\nimport { isKonturIcon } from '../../lib/utils.js';\nimport type { Nullable } from '../../typings/utility-types.js';\nimport { getStyles } from './Kebab.styles.js';\nimport { KebabIcon } from './KebabIcon.js';\n\nexport interface KebabProps\n extends\n Pick<AriaAttributes, 'aria-label'>,\n Pick<HTMLAttributes<HTMLElement>, 'id'>,\n Pick<PopupMenuProps, 'onOpen' | 'onClose' | 'popupMenuId' | 'preventIconsOffset'>,\n CommonProps {\n /** Размер кнопки. */\n size?: SizeProp;\n\n /** Список доступных позиций выпадающего меню относительно кнопки.\n * @default ['bottom left', 'bottom right', 'top left', 'top right'].\n */\n positions?: PopupPositionsType[];\n\n /** Максимальная высота меню. */\n menuMaxHeight?: number | string;\n\n /** Блокирует кнопку. */\n disabled?: boolean;\n\n /** Отключает анимацию выпадающего меню. */\n disableAnimations?: boolean;\n\n /** Заменяет иконку кебаба у кнопки. */\n icon?: React.ReactNode;\n\n /** @ignore */\n 'aria-describedby'?: AriaAttributes['aria-describedby'];\n}\n\nexport const KebabDataTids = {\n caption: 'Kebab__caption',\n} as const;\n\nexport interface KebabState {\n anchor: Nullable<HTMLElement>;\n focusedByTab: boolean;\n}\n\ntype DefaultProps = Required<Pick<KebabProps, 'onOpen' | 'onClose' | 'positions' | 'disableAnimations'>>;\n\n/**\n * Кебаб-меню содержит действия с объектом.\n */\n@withRenderEnvironment\n@rootNode\n@withSize\nexport class Kebab extends React.Component<KebabProps, KebabState> {\n public static __KONTUR_REACT_UI__ = 'Kebab';\n public static displayName = 'Kebab';\n\n public static defaultProps: DefaultProps = {\n onOpen: () => undefined,\n onClose: () => undefined,\n positions: ['bottom left', 'bottom right', 'top left', 'top right'],\n disableAnimations: isTestEnv,\n };\n\n private getProps = createPropsGetter(Kebab.defaultProps);\n\n public state: KebabState = {\n focusedByTab: false,\n anchor: null,\n };\n\n private globalObject!: GlobalObject;\n private cx!: ClassNames;\n private styles!: ReturnType<typeof getStyles>;\n private theme!: Theme;\n private size!: SizeProp;\n public getRootNode!: TGetRootNode;\n private setRootNode!: TSetRootNode;\n private keyListener!: KeyListener;\n\n private listener: {\n remove: () => void;\n } = {\n remove: () => undefined,\n };\n\n public componentDidMount() {\n this.keyListener = new KeyListener(this.globalObject);\n /** addListener'у нужен колбэк в аргумент */\n this.listener = LayoutEvents.addListener(() => undefined, this.globalObject);\n }\n\n public componentWillUnmount() {\n this.listener.remove();\n }\n\n public render(): JSX.Element {\n this.styles = getStyles();\n\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = theme;\n return (\n <ThemeContext.Provider\n value={ThemeFactory.create(\n {\n popupMargin: theme.kebabMargin,\n },\n theme,\n )}\n >\n {this.renderMain()}\n </ThemeContext.Provider>\n );\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const { disabled } = this.props;\n const { positions, disableAnimations, onOpen, onClose } = this.getProps();\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props} {...getVisualStateDataAttributes({ disabled })}>\n <PopupMenu\n id={this.props.id}\n popupHasPin={false}\n preventIconsOffset={this.props.preventIconsOffset}\n positions={positions}\n onChangeMenuState={this.handleChangeMenuState}\n caption={this.renderCaption}\n disableAnimations={disableAnimations}\n menuMaxHeight={this.props.menuMaxHeight}\n onOpen={onOpen}\n onClose={onClose}\n popupMenuId={this.props.popupMenuId}\n aria-label={this.props['aria-label']}\n >\n {!disabled && this.props.children}\n </PopupMenu>\n </CommonWrapper>\n );\n }\n\n private renderCaption = (captionProps: PopupMenuCaptionProps) => {\n const { disabled } = this.getProps();\n const size = this.size;\n const handleCaptionKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (!disabled) {\n this.handleCaptionKeyDown(event, captionProps.openMenu);\n }\n };\n\n const handleCaptionClick = () => {\n if (!disabled) {\n captionProps.toggleMenu();\n }\n };\n\n return (\n <span\n role=\"button\"\n data-tid={KebabDataTids.caption}\n tabIndex={disabled ? -1 : 0}\n onClick={handleCaptionClick}\n onKeyDown={handleCaptionKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n className={this.cx(\n this.styles.kebab(),\n size === 'small' && this.styles.kebabSmall(),\n size === 'medium' && this.styles.kebabMedium(),\n size === 'large' && this.styles.kebabLarge(),\n captionProps.opened && this.styles.opened(),\n disabled && this.styles.disabled(),\n this.state.focusedByTab && this.styles.focused(),\n )}\n aria-describedby={this.props['aria-describedby']}\n >\n {this.renderIcon()}\n </span>\n );\n };\n\n private handleCaptionKeyDown = (\n e: React.KeyboardEvent<HTMLDivElement>,\n openMenu: PopupMenuCaptionProps['openMenu'],\n ) => {\n if (someKeys(isKeyEnter, isKeySpace, isKeyArrowVertical)(e)) {\n e.preventDefault();\n openMenu(true);\n }\n };\n\n private handleChangeMenuState = (isOpened: boolean, restoreFocus: boolean): void => {\n this.setState({\n focusedByTab: !isOpened && restoreFocus,\n });\n };\n\n private handleFocus = () => {\n if (!this.props.disabled) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n this.globalObject.requestAnimationFrame?.(() => {\n if (this.keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n }\n };\n\n private handleBlur = () => {\n this.setState({\n focusedByTab: false,\n });\n };\n\n private renderIcon() {\n const { icon = <KebabIcon /> } = this.getProps();\n\n if (isElement(icon) && isKonturIcon(icon)) {\n const iconProps = icon.props as IconProps;\n const sizes: Record<SizeProp, number> = {\n small: parseInt(this.theme.kebabIconSizeSmall),\n medium: parseInt(this.theme.kebabIconSizeMedium),\n large: parseInt(this.theme.kebabIconSizeLarge),\n };\n\n return React.cloneElement(icon, {\n size: iconProps.size ?? sizes[this.size],\n color: iconProps.color ?? this.theme.kebabIconColor,\n } as IconProps);\n }\n\n return icon;\n }\n}\n"]}
@@ -1,11 +1,11 @@
1
- import type { Theme } from '../../lib/theming/Theme.js';
2
- export declare const getStyles: import("../../lib/theming/Emotion.js").StylesGetter<{
3
- kebab(t: Theme): string;
4
- kebabSmall(t: Theme): string;
5
- kebabMedium(t: Theme): string;
6
- kebabLarge(t: Theme): string;
7
- focused(t: Theme): string;
8
- opened(t: Theme): string;
9
- disabled(): string;
10
- menu(t: Theme): string;
1
+ /** Правила — в `Kebab.css`; здесь только имена классов. */
2
+ export declare const getStyles: (ignored?: unknown) => import("../../lib/theming/staticStyles.js").StaticStyles<{
3
+ kebab: string;
4
+ kebabSmall: string;
5
+ kebabMedium: string;
6
+ kebabLarge: string;
7
+ focused: string;
8
+ opened: string;
9
+ disabled: string;
10
+ menu: string;
11
11
  }>;
@@ -1,36 +1,13 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { memoizeGetStyles } from '../../lib/theming/Emotion.js';
6
- export var getStyles = memoizeGetStyles(function (_a) {
7
- var css = _a.css;
8
- return ({
9
- kebab: function (t) {
10
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n border: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n user-select: none;\n cursor: pointer;\n outline: 0;\n transition: background 0.12s ease-out;\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &:active {\n background: ", ";\n }\n "], ["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n border: ", ";\n box-sizing: border-box;\n border-radius: ", ";\n user-select: none;\n cursor: pointer;\n outline: 0;\n transition: background 0.12s ease-out;\n background: ", ";\n\n &:hover {\n background: ", ";\n }\n\n &:active {\n background: ", ";\n }\n "])), t.kebabBorder, t.kebabBorderRadius, t.kebabBackground, t.kebabBackgroundHover, t.kebabBackgroundActive);
11
- },
12
- kebabSmall: function (t) {
13
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n "], ["\n width: ", ";\n height: ", ";\n "])), t.kebabSizeSmall, t.kebabSizeSmall);
14
- },
15
- kebabMedium: function (t) {
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n "], ["\n width: ", ";\n height: ", ";\n "])), t.kebabSizeMedium, t.kebabSizeMedium);
17
- },
18
- kebabLarge: function (t) {
19
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n "], ["\n width: ", ";\n height: ", ";\n "])), t.kebabSizeLarge, t.kebabSizeLarge);
20
- },
21
- focused: function (t) {
22
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n border-color: ", ";\n "], ["\n background: ", ";\n border-color: ", ";\n "])), t.kebabBackgroundHover, t.borderColorFocus);
23
- },
24
- opened: function (t) {
25
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n background: ", " !important; // override kebab:hover style\n cursor: default;\n "], ["\n background: ", " !important; // override kebab:hover style\n cursor: default;\n "])), t.kebabBackgroundActive);
26
- },
27
- disabled: function () {
28
- return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n cursor: default;\n\n &:hover {\n background: none;\n }\n "], ["\n cursor: default;\n\n &:hover {\n background: none;\n }\n "])));
29
- },
30
- menu: function (t) {
31
- return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n overflow: hidden;\n border-radius: ", ";\n "], ["\n overflow: hidden;\n border-radius: ", ";\n "])), t.popupBorderRadius);
32
- },
33
- });
1
+ import { staticStyles } from '../../lib/theming/staticStyles.js';
2
+ /** Правила — в `Kebab.css`; здесь только имена классов. */
3
+ export var getStyles = staticStyles({
4
+ kebab: 'react-ui-Kebab-kebab',
5
+ kebabSmall: 'react-ui-Kebab-kebabSmall',
6
+ kebabMedium: 'react-ui-Kebab-kebabMedium',
7
+ kebabLarge: 'react-ui-Kebab-kebabLarge',
8
+ focused: 'react-ui-Kebab-focused',
9
+ opened: 'react-ui-Kebab-opened',
10
+ disabled: 'react-ui-Kebab-disabled',
11
+ menu: 'react-ui-Kebab-menu',
34
12
  });
35
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
36
13
  //# sourceMappingURL=Kebab.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Kebab.styles.js","sourceRoot":"","sources":["Kebab.styles.ts"],"names":[],"mappings":";;;;AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,MAAM,CAAC,IAAM,SAAS,GAAG,gBAAgB,CAAC,UAAC,EAAgB;QAAd,GAAG,SAAA;IAAgB,OAAA,CAAC;QAC/D,KAAK,YAAC,CAAQ;YACZ,OAAO,GAAG,0gBAAA,sIAKE,EAAa,yDAEN,EAAmB,0IAKtB,EAAiB,4CAGf,EAAsB,sDAItB,EAAuB,kBAExC,KAhBW,CAAC,CAAC,WAAW,EAEN,CAAC,CAAC,iBAAiB,EAKtB,CAAC,CAAC,eAAe,EAGf,CAAC,CAAC,oBAAoB,EAItB,CAAC,CAAC,qBAAqB,EAEvC;QACJ,CAAC;QAED,UAAU,YAAC,CAAQ;YACjB,OAAO,GAAG,oHAAA,iBACC,EAAgB,mBACf,EAAgB,SAC3B,KAFU,CAAC,CAAC,cAAc,EACf,CAAC,CAAC,cAAc,EAC1B;QACJ,CAAC;QAED,WAAW,YAAC,CAAQ;YAClB,OAAO,GAAG,oHAAA,iBACC,EAAiB,mBAChB,EAAiB,SAC5B,KAFU,CAAC,CAAC,eAAe,EAChB,CAAC,CAAC,eAAe,EAC3B;QACJ,CAAC;QAED,UAAU,YAAC,CAAQ;YACjB,OAAO,GAAG,oHAAA,iBACC,EAAgB,mBACf,EAAgB,SAC3B,KAFU,CAAC,CAAC,cAAc,EACf,CAAC,CAAC,cAAc,EAC1B;QACJ,CAAC;QAED,OAAO,YAAC,CAAQ;YACd,OAAO,GAAG,+HAAA,sBACM,EAAsB,yBACpB,EAAkB,SACnC,KAFe,CAAC,CAAC,oBAAoB,EACpB,CAAC,CAAC,gBAAgB,EAClC;QACJ,CAAC;QAED,MAAM,YAAC,CAAQ;YACb,OAAO,GAAG,qKAAA,sBACM,EAAuB,0EAEtC,KAFe,CAAC,CAAC,qBAAqB,EAErC;QACJ,CAAC;QAED,QAAQ;YACN,OAAO,GAAG,0JAAA,uFAMT,KAAC;QACJ,CAAC;QAED,IAAI,YAAC,CAAQ;YACX,OAAO,GAAG,gIAAA,kDAES,EAAmB,SACrC,KADkB,CAAC,CAAC,iBAAiB,EACpC;QACJ,CAAC;KACF,CAAC;AA7E8D,CA6E9D,CAAC,CAAC","sourcesContent":["import type { Emotion } from '@emotion/css/create-instance';\n\nimport { memoizeGetStyles } from '../../lib/theming/Emotion.js';\nimport type { Theme } from '../../lib/theming/Theme.js';\n\nexport const getStyles = memoizeGetStyles(({ css }: Emotion) => ({\n kebab(t: Theme) {\n return css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n border: ${t.kebabBorder};\n box-sizing: border-box;\n border-radius: ${t.kebabBorderRadius};\n user-select: none;\n cursor: pointer;\n outline: 0;\n transition: background 0.12s ease-out;\n background: ${t.kebabBackground};\n\n &:hover {\n background: ${t.kebabBackgroundHover};\n }\n\n &:active {\n background: ${t.kebabBackgroundActive};\n }\n `;\n },\n\n kebabSmall(t: Theme) {\n return css`\n width: ${t.kebabSizeSmall};\n height: ${t.kebabSizeSmall};\n `;\n },\n\n kebabMedium(t: Theme) {\n return css`\n width: ${t.kebabSizeMedium};\n height: ${t.kebabSizeMedium};\n `;\n },\n\n kebabLarge(t: Theme) {\n return css`\n width: ${t.kebabSizeLarge};\n height: ${t.kebabSizeLarge};\n `;\n },\n\n focused(t: Theme) {\n return css`\n background: ${t.kebabBackgroundHover};\n border-color: ${t.borderColorFocus};\n `;\n },\n\n opened(t: Theme) {\n return css`\n background: ${t.kebabBackgroundActive} !important; // override kebab:hover style\n cursor: default;\n `;\n },\n\n disabled() {\n return css`\n cursor: default;\n\n &:hover {\n background: none;\n }\n `;\n },\n\n menu(t: Theme) {\n return css`\n overflow: hidden;\n border-radius: ${t.popupBorderRadius};\n `;\n },\n}));\n"]}
1
+ {"version":3,"file":"Kebab.styles.js","sourceRoot":"","sources":["Kebab.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,2DAA2D;AAC3D,MAAM,CAAC,IAAM,SAAS,GAAG,YAAY,CAAC;IACpC,KAAK,EAAE,sBAAsB;IAC7B,UAAU,EAAE,2BAA2B;IACvC,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE,2BAA2B;IACvC,OAAO,EAAE,wBAAwB;IACjC,MAAM,EAAE,uBAAuB;IAC/B,QAAQ,EAAE,yBAAyB;IACnC,IAAI,EAAE,qBAAqB;CAC5B,CAAC,CAAC","sourcesContent":["import { staticStyles } from '../../lib/theming/staticStyles.js';\n\n/** Правила — в `Kebab.css`; здесь только имена классов. */\nexport const getStyles = staticStyles({\n kebab: 'react-ui-Kebab-kebab',\n kebabSmall: 'react-ui-Kebab-kebabSmall',\n kebabMedium: 'react-ui-Kebab-kebabMedium',\n kebabLarge: 'react-ui-Kebab-kebabLarge',\n focused: 'react-ui-Kebab-focused',\n opened: 'react-ui-Kebab-opened',\n disabled: 'react-ui-Kebab-disabled',\n menu: 'react-ui-Kebab-menu',\n});\n"]}
@@ -50,7 +50,6 @@ export declare class Link<C extends ButtonLinkAllowedValues = typeof LINK_DEFAUL
50
50
  private getProps;
51
51
  state: LinkState;
52
52
  private globalObject;
53
- private emotion;
54
53
  private cx;
55
54
  private styles;
56
55
  private theme;