@skbkontur/react-ui 0.0.0-c13bb5f4ca → 0.0.0-c37930b3b1

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 (501) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/cjs/components/Autocomplete/Autocomplete.js +1 -3
  3. package/cjs/components/Autocomplete/Autocomplete.js.map +1 -1
  4. package/cjs/components/Button/Button.js +1 -4
  5. package/cjs/components/Button/Button.js.map +1 -1
  6. package/cjs/components/Button/Button.mixins.d.ts +0 -1
  7. package/cjs/components/Button/Button.mixins.js +2 -9
  8. package/cjs/components/Button/Button.mixins.js.map +1 -1
  9. package/cjs/components/Button/Button.styles.d.ts +0 -3
  10. package/cjs/components/Button/Button.styles.js +63 -87
  11. package/cjs/components/Button/Button.styles.js.map +1 -1
  12. package/cjs/components/Checkbox/Checkbox.d.ts +3 -0
  13. package/cjs/components/Checkbox/Checkbox.js +10 -24
  14. package/cjs/components/Checkbox/Checkbox.js.map +1 -1
  15. package/cjs/components/Checkbox/Checkbox.styles.d.ts +0 -3
  16. package/cjs/components/Checkbox/Checkbox.styles.js +16 -43
  17. package/cjs/components/Checkbox/Checkbox.styles.js.map +1 -1
  18. package/cjs/components/ComboBox/ComboBox.d.ts +4 -7
  19. package/cjs/components/ComboBox/ComboBox.js +3 -14
  20. package/cjs/components/ComboBox/ComboBox.js.map +1 -1
  21. package/cjs/components/CurrencyInput/CurrencyInput.d.ts +0 -1
  22. package/cjs/components/CurrencyInput/CurrencyInput.js +9 -13
  23. package/cjs/components/CurrencyInput/CurrencyInput.js.map +1 -1
  24. package/cjs/components/CurrencyInput/CursorHelper.js +5 -2
  25. package/cjs/components/CurrencyInput/CursorHelper.js.map +1 -1
  26. package/cjs/components/CurrencyLabel/CurrencyLabel.js +2 -2
  27. package/cjs/components/CurrencyLabel/CurrencyLabel.js.map +1 -1
  28. package/cjs/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  29. package/cjs/components/DropdownMenu/DropdownMenu.js +2 -1
  30. package/cjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
  31. package/cjs/components/FileUploader/FileUploader.js +1 -0
  32. package/cjs/components/FileUploader/FileUploader.js.map +1 -1
  33. package/cjs/components/Group/Group.js +1 -3
  34. package/cjs/components/Group/Group.js.map +1 -1
  35. package/cjs/components/Group/Group.styles.d.ts +0 -1
  36. package/cjs/components/Group/Group.styles.js +3 -9
  37. package/cjs/components/Group/Group.styles.js.map +1 -1
  38. package/cjs/components/Input/Input.js +4 -10
  39. package/cjs/components/Input/Input.js.map +1 -1
  40. package/cjs/components/Input/Input.styles.d.ts +0 -6
  41. package/cjs/components/Input/Input.styles.js +16 -67
  42. package/cjs/components/Input/Input.styles.js.map +1 -1
  43. package/cjs/components/Loader/Loader.js +3 -3
  44. package/cjs/components/Loader/Loader.js.map +1 -1
  45. package/cjs/components/MaskedInput/FixedIMaskInput.js +3 -2
  46. package/cjs/components/MaskedInput/FixedIMaskInput.js.map +1 -1
  47. package/cjs/components/MaskedInput/MaskedInput.d.ts +8 -0
  48. package/cjs/components/MaskedInput/MaskedInput.js +23 -2
  49. package/cjs/components/MaskedInput/MaskedInput.js.map +1 -1
  50. package/cjs/components/MenuFooter/MenuFooter.js +0 -1
  51. package/cjs/components/MenuFooter/MenuFooter.js.map +1 -1
  52. package/cjs/components/MenuHeader/MenuHeader.js +0 -1
  53. package/cjs/components/MenuHeader/MenuHeader.js.map +1 -1
  54. package/cjs/components/Modal/Modal.d.ts +1 -1
  55. package/cjs/components/Modal/Modal.js +2 -6
  56. package/cjs/components/Modal/Modal.js.map +1 -1
  57. package/cjs/components/Paging/Paging.d.ts +0 -1
  58. package/cjs/components/Paging/Paging.js +13 -18
  59. package/cjs/components/Paging/Paging.js.map +1 -1
  60. package/cjs/components/PasswordInput/PasswordInput.js +1 -13
  61. package/cjs/components/PasswordInput/PasswordInput.js.map +1 -1
  62. package/cjs/components/Radio/Radio.js +3 -7
  63. package/cjs/components/Radio/Radio.js.map +1 -1
  64. package/cjs/components/Radio/Radio.styles.d.ts +0 -2
  65. package/cjs/components/Radio/Radio.styles.js +19 -31
  66. package/cjs/components/Radio/Radio.styles.js.map +1 -1
  67. package/cjs/components/ResponsiveLayout/decorator.d.ts +1 -1
  68. package/cjs/components/ScrollContainer/ScrollContainer.d.ts +1 -1
  69. package/cjs/components/ScrollContainer/ScrollContainer.js +1 -2
  70. package/cjs/components/ScrollContainer/ScrollContainer.js.map +1 -1
  71. package/cjs/components/ScrollContainer/ScrollContainer.styles.d.ts +0 -1
  72. package/cjs/components/ScrollContainer/ScrollContainer.styles.js +10 -20
  73. package/cjs/components/ScrollContainer/ScrollContainer.styles.js.map +1 -1
  74. package/cjs/components/SidePage/SidePage.js +1 -2
  75. package/cjs/components/SidePage/SidePage.js.map +1 -1
  76. package/cjs/components/Spinner/Spinner.js +0 -1
  77. package/cjs/components/Spinner/Spinner.js.map +1 -1
  78. package/cjs/components/Spinner/Spinner.styles.js +10 -15
  79. package/cjs/components/Spinner/Spinner.styles.js.map +1 -1
  80. package/cjs/components/Sticky/Sticky.js +3 -1
  81. package/cjs/components/Sticky/Sticky.js.map +1 -1
  82. package/cjs/components/Textarea/Textarea.d.ts +0 -1
  83. package/cjs/components/Textarea/Textarea.js +4 -5
  84. package/cjs/components/Textarea/Textarea.js.map +1 -1
  85. package/cjs/components/Toast/ToastStatic.js +3 -1
  86. package/cjs/components/Toast/ToastStatic.js.map +1 -1
  87. package/cjs/components/TokenInput/TokenInput.d.ts +2 -0
  88. package/cjs/components/TokenInput/TokenInput.js +40 -24
  89. package/cjs/components/TokenInput/TokenInput.js.map +1 -1
  90. package/cjs/components/Tooltip/Tooltip.d.ts +1 -1
  91. package/cjs/components/Tooltip/Tooltip.js +14 -9
  92. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  93. package/cjs/components/TooltipMenu/TooltipMenu.js +3 -2
  94. package/cjs/components/TooltipMenu/TooltipMenu.js.map +1 -1
  95. package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +3 -2
  96. package/cjs/internal/CustomComboBox/ComboBoxView.js +1 -1
  97. package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  98. package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +4 -6
  99. package/cjs/internal/CustomComboBox/CustomComboBox.js +11 -16
  100. package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
  101. package/cjs/internal/FocusControlWrapper/FocusControlWrapper.stories.d.ts +1 -1
  102. package/cjs/internal/IgnoreLayerClick/IgnoreLayerClick.d.ts +1 -1
  103. package/cjs/internal/InputLikeText/InputLikeText.d.ts +0 -10
  104. package/cjs/internal/InputLikeText/InputLikeText.js +5 -98
  105. package/cjs/internal/InputLikeText/InputLikeText.js.map +1 -1
  106. package/cjs/internal/Menu/Menu.js +2 -7
  107. package/cjs/internal/Menu/Menu.js.map +1 -1
  108. package/cjs/internal/Menu/Menu.styles.d.ts +0 -2
  109. package/cjs/internal/Menu/Menu.styles.js +9 -23
  110. package/cjs/internal/Menu/Menu.styles.js.map +1 -1
  111. package/cjs/internal/Popup/Popup.js +34 -27
  112. package/cjs/internal/Popup/Popup.js.map +1 -1
  113. package/cjs/internal/Popup/PopupPin.js +85 -43
  114. package/cjs/internal/Popup/PopupPin.js.map +1 -1
  115. package/cjs/internal/PopupMenu/validatePositions.js +5 -2
  116. package/cjs/internal/PopupMenu/validatePositions.js.map +1 -1
  117. package/cjs/internal/SpinnerIcon/SpinnerIcon.d.ts +1 -2
  118. package/cjs/internal/SpinnerIcon/SpinnerIcon.js +1 -55
  119. package/cjs/internal/SpinnerIcon/SpinnerIcon.js.map +1 -1
  120. package/cjs/internal/ThemePlayground/helpers.d.ts +1 -1
  121. package/cjs/internal/icons2022/LoadingIcon.js +0 -1
  122. package/cjs/internal/icons2022/LoadingIcon.js.map +1 -1
  123. package/cjs/internal/themes/BasicTheme.js +1 -1
  124. package/cjs/internal/themes/BasicTheme.js.map +1 -1
  125. package/cjs/internal/themes/DarkTheme5_4.d.ts +1 -0
  126. package/cjs/internal/themes/DarkTheme5_4.js +10 -0
  127. package/cjs/internal/themes/DarkTheme5_4.js.map +1 -0
  128. package/cjs/internal/themes/LightTheme5_4.d.ts +1 -0
  129. package/cjs/internal/themes/LightTheme5_4.js +10 -0
  130. package/cjs/internal/themes/LightTheme5_4.js.map +1 -0
  131. package/cjs/lib/client.d.ts +0 -2
  132. package/cjs/lib/client.js +1 -3
  133. package/cjs/lib/client.js.map +1 -1
  134. package/cjs/lib/date/InternalDate.js +5 -4
  135. package/cjs/lib/date/InternalDate.js.map +1 -1
  136. package/cjs/lib/dom/getDOMRect.d.ts +1 -1
  137. package/cjs/lib/dom/getScrollWidth.js +4 -2
  138. package/cjs/lib/dom/getScrollWidth.js.map +1 -1
  139. package/cjs/lib/events/MouseDrag.js +1 -7
  140. package/cjs/lib/events/MouseDrag.js.map +1 -1
  141. package/cjs/lib/events/keyboard/identifiers.js +2 -10
  142. package/cjs/lib/events/keyboard/identifiers.js.map +1 -1
  143. package/cjs/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +1 -0
  144. package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +1 -0
  145. package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +3 -1
  146. package/cjs/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
  147. package/cjs/lib/listenFocusOutside.js +3 -1
  148. package/cjs/lib/listenFocusOutside.js.map +1 -1
  149. package/cjs/lib/needsPolyfillPlaceholder.js +1 -3
  150. package/cjs/lib/needsPolyfillPlaceholder.js.map +1 -1
  151. package/cjs/lib/rootNode/getRootNode.js +2 -2
  152. package/cjs/lib/rootNode/getRootNode.js.map +1 -1
  153. package/cjs/lib/styles/Mixins.js +1 -3
  154. package/cjs/lib/styles/Mixins.js.map +1 -1
  155. package/cjs/lib/theming/ThemeHelpers.js +1 -1
  156. package/cjs/lib/theming/ThemeHelpers.js.map +1 -1
  157. package/cjs/lib/theming/ThemeVersions.d.ts +1 -1
  158. package/cjs/lib/theming/ThemeVersions.js.map +1 -1
  159. package/cjs/lib/theming/themes/DarkTheme.d.ts +1 -0
  160. package/cjs/lib/theming/themes/DarkTheme.js +4 -2
  161. package/cjs/lib/theming/themes/DarkTheme.js.map +1 -1
  162. package/cjs/lib/theming/themes/LightTheme.d.ts +1 -0
  163. package/cjs/lib/theming/themes/LightTheme.js +4 -2
  164. package/cjs/lib/theming/themes/LightTheme.js.map +1 -1
  165. package/cjs/lib/typeGuards.js +1 -1
  166. package/cjs/lib/typeGuards.js.map +1 -1
  167. package/cjs/lib/utils.d.ts +1 -1
  168. package/cjs/lib/withClassWrapper.js +5 -2
  169. package/cjs/lib/withClassWrapper.js.map +1 -1
  170. package/components/Autocomplete/Autocomplete/Autocomplete.js +1 -3
  171. package/components/Autocomplete/Autocomplete/Autocomplete.js.map +1 -1
  172. package/components/Button/Button/Button.js +4 -4
  173. package/components/Button/Button/Button.js.map +1 -1
  174. package/components/Button/Button.mixins/Button.mixins.js +1 -4
  175. package/components/Button/Button.mixins/Button.mixins.js.map +1 -1
  176. package/components/Button/Button.mixins.d.ts +0 -1
  177. package/components/Button/Button.styles/Button.styles.js +64 -73
  178. package/components/Button/Button.styles/Button.styles.js.map +1 -1
  179. package/components/Button/Button.styles.d.ts +0 -3
  180. package/components/Checkbox/Checkbox/Checkbox.js +7 -21
  181. package/components/Checkbox/Checkbox/Checkbox.js.map +1 -1
  182. package/components/Checkbox/Checkbox.d.ts +3 -0
  183. package/components/Checkbox/Checkbox.styles/Checkbox.styles.js +16 -25
  184. package/components/Checkbox/Checkbox.styles/Checkbox.styles.js.map +1 -1
  185. package/components/Checkbox/Checkbox.styles.d.ts +0 -3
  186. package/components/ComboBox/ComboBox/ComboBox.js +0 -8
  187. package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
  188. package/components/ComboBox/ComboBox.d.ts +4 -7
  189. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js +7 -12
  190. package/components/CurrencyInput/CurrencyInput/CurrencyInput.js.map +1 -1
  191. package/components/CurrencyInput/CurrencyInput.d.ts +0 -1
  192. package/components/CurrencyInput/CursorHelper/CursorHelper.js +3 -1
  193. package/components/CurrencyInput/CursorHelper/CursorHelper.js.map +1 -1
  194. package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js +1 -1
  195. package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js.map +1 -1
  196. package/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  197. package/components/DropdownMenu/DropdownMenu/DropdownMenu.js +4 -3
  198. package/components/DropdownMenu/DropdownMenu/DropdownMenu.js.map +1 -1
  199. package/components/FileUploader/FileUploader/FileUploader.js +1 -0
  200. package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
  201. package/components/Group/Group/Group.js +1 -2
  202. package/components/Group/Group/Group.js.map +1 -1
  203. package/components/Group/Group.styles/Group.styles.js +3 -6
  204. package/components/Group/Group.styles/Group.styles.js.map +1 -1
  205. package/components/Group/Group.styles.d.ts +0 -1
  206. package/components/Input/Input/Input.js +7 -7
  207. package/components/Input/Input/Input.js.map +1 -1
  208. package/components/Input/Input.styles/Input.styles.js +16 -34
  209. package/components/Input/Input.styles/Input.styles.js.map +1 -1
  210. package/components/Input/Input.styles.d.ts +0 -6
  211. package/components/Loader/Loader/Loader.js +2 -3
  212. package/components/Loader/Loader/Loader.js.map +1 -1
  213. package/components/MaskedInput/FixedIMaskInput/FixedIMaskInput.js +3 -2
  214. package/components/MaskedInput/FixedIMaskInput/FixedIMaskInput.js.map +1 -1
  215. package/components/MaskedInput/MaskedInput/MaskedInput.js +11 -1
  216. package/components/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
  217. package/components/MaskedInput/MaskedInput.d.ts +8 -0
  218. package/components/MenuFooter/MenuFooter/MenuFooter.js +0 -2
  219. package/components/MenuFooter/MenuFooter/MenuFooter.js.map +1 -1
  220. package/components/MenuHeader/MenuHeader/MenuHeader.js +0 -2
  221. package/components/MenuHeader/MenuHeader/MenuHeader.js.map +1 -1
  222. package/components/Modal/Modal/Modal.js +2 -5
  223. package/components/Modal/Modal/Modal.js.map +1 -1
  224. package/components/Modal/Modal.d.ts +1 -1
  225. package/components/Paging/Paging/Paging.js +11 -20
  226. package/components/Paging/Paging/Paging.js.map +1 -1
  227. package/components/Paging/Paging.d.ts +0 -1
  228. package/components/PasswordInput/PasswordInput/PasswordInput.js +0 -7
  229. package/components/PasswordInput/PasswordInput/PasswordInput.js.map +1 -1
  230. package/components/Radio/Radio/Radio.js +3 -4
  231. package/components/Radio/Radio/Radio.js.map +1 -1
  232. package/components/Radio/Radio.styles/Radio.styles.js +19 -25
  233. package/components/Radio/Radio.styles/Radio.styles.js.map +1 -1
  234. package/components/Radio/Radio.styles.d.ts +0 -2
  235. package/components/ResponsiveLayout/decorator.d.ts +1 -1
  236. package/components/ScrollContainer/ScrollContainer/ScrollContainer.js +1 -2
  237. package/components/ScrollContainer/ScrollContainer/ScrollContainer.js.map +1 -1
  238. package/components/ScrollContainer/ScrollContainer.d.ts +1 -1
  239. package/components/ScrollContainer/ScrollContainer.styles/ScrollContainer.styles.js +10 -13
  240. package/components/ScrollContainer/ScrollContainer.styles/ScrollContainer.styles.js.map +1 -1
  241. package/components/ScrollContainer/ScrollContainer.styles.d.ts +0 -1
  242. package/components/SidePage/SidePage/SidePage.js +1 -2
  243. package/components/SidePage/SidePage/SidePage.js.map +1 -1
  244. package/components/Spinner/Spinner/Spinner.js +0 -1
  245. package/components/Spinner/Spinner/Spinner.js.map +1 -1
  246. package/components/Spinner/Spinner.styles/Spinner.styles.js +2 -3
  247. package/components/Spinner/Spinner.styles/Spinner.styles.js.map +1 -1
  248. package/components/Sticky/Sticky/Sticky.js +3 -1
  249. package/components/Sticky/Sticky/Sticky.js.map +1 -1
  250. package/components/Textarea/Textarea/Textarea.js +5 -7
  251. package/components/Textarea/Textarea/Textarea.js.map +1 -1
  252. package/components/Textarea/Textarea.d.ts +0 -1
  253. package/components/Toast/ToastStatic/ToastStatic.js +3 -1
  254. package/components/Toast/ToastStatic/ToastStatic.js.map +1 -1
  255. package/components/TokenInput/TokenInput/TokenInput.js +37 -30
  256. package/components/TokenInput/TokenInput/TokenInput.js.map +1 -1
  257. package/components/TokenInput/TokenInput.d.ts +2 -0
  258. package/components/Tooltip/Tooltip/Tooltip.js +22 -17
  259. package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
  260. package/components/Tooltip/Tooltip.d.ts +1 -1
  261. package/components/TooltipMenu/TooltipMenu/TooltipMenu.js +4 -3
  262. package/components/TooltipMenu/TooltipMenu/TooltipMenu.js.map +1 -1
  263. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +4 -4
  264. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
  265. package/internal/CustomComboBox/ComboBoxView.d.ts +3 -2
  266. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +10 -16
  267. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
  268. package/internal/CustomComboBox/CustomComboBox.d.ts +4 -6
  269. package/internal/FocusControlWrapper/FocusControlWrapper.stories.d.ts +1 -1
  270. package/internal/IgnoreLayerClick/IgnoreLayerClick.d.ts +1 -1
  271. package/internal/InputLikeText/InputLikeText/InputLikeText.js +13 -95
  272. package/internal/InputLikeText/InputLikeText/InputLikeText.js.map +1 -1
  273. package/internal/InputLikeText/InputLikeText.d.ts +0 -10
  274. package/internal/Menu/Menu/Menu.js +1 -3
  275. package/internal/Menu/Menu/Menu.js.map +1 -1
  276. package/internal/Menu/Menu.styles/Menu.styles.js +9 -15
  277. package/internal/Menu/Menu.styles/Menu.styles.js.map +1 -1
  278. package/internal/Menu/Menu.styles.d.ts +0 -2
  279. package/internal/Popup/Popup/Popup.js +21 -20
  280. package/internal/Popup/Popup/Popup.js.map +1 -1
  281. package/internal/Popup/PopupPin/PopupPin.js +36 -22
  282. package/internal/Popup/PopupPin/PopupPin.js.map +1 -1
  283. package/internal/PopupMenu/validatePositions/validatePositions.js +3 -1
  284. package/internal/PopupMenu/validatePositions/validatePositions.js.map +1 -1
  285. package/internal/SpinnerIcon/SpinnerIcon/SpinnerIcon.js +0 -41
  286. package/internal/SpinnerIcon/SpinnerIcon/SpinnerIcon.js.map +1 -1
  287. package/internal/SpinnerIcon/SpinnerIcon.d.ts +1 -2
  288. package/internal/ThemePlayground/helpers.d.ts +1 -1
  289. package/internal/icons2022/LoadingIcon/LoadingIcon.js +0 -1
  290. package/internal/icons2022/LoadingIcon/LoadingIcon.js.map +1 -1
  291. package/internal/themes/BasicTheme/BasicTheme.js +1 -1
  292. package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
  293. package/internal/themes/DarkTheme5_4/DarkTheme5_4.js +15 -0
  294. package/internal/themes/DarkTheme5_4/DarkTheme5_4.js.map +1 -0
  295. package/internal/themes/DarkTheme5_4/package.json +6 -0
  296. package/internal/themes/DarkTheme5_4.d.ts +1 -0
  297. package/internal/themes/LightTheme5_4/LightTheme5_4.js +15 -0
  298. package/internal/themes/LightTheme5_4/LightTheme5_4.js.map +1 -0
  299. package/internal/themes/LightTheme5_4/package.json +6 -0
  300. package/internal/themes/LightTheme5_4.d.ts +1 -0
  301. package/lib/client/client.js +0 -2
  302. package/lib/client/client.js.map +1 -1
  303. package/lib/client.d.ts +0 -2
  304. package/lib/date/InternalDate/InternalDate.js +5 -4
  305. package/lib/date/InternalDate/InternalDate.js.map +1 -1
  306. package/lib/dom/getDOMRect.d.ts +1 -1
  307. package/lib/dom/getScrollWidth/getScrollWidth.js +3 -1
  308. package/lib/dom/getScrollWidth/getScrollWidth.js.map +1 -1
  309. package/lib/events/MouseDrag/MouseDrag.js +0 -7
  310. package/lib/events/MouseDrag/MouseDrag.js.map +1 -1
  311. package/lib/events/keyboard/identifiers/identifiers.js +1 -10
  312. package/lib/events/keyboard/identifiers/identifiers.js.map +1 -1
  313. package/lib/featureFlagsContext/FeatureFlagsHelpers.d.ts +1 -0
  314. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js +2 -1
  315. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
  316. package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +1 -0
  317. package/lib/listenFocusOutside/listenFocusOutside.js +3 -1
  318. package/lib/listenFocusOutside/listenFocusOutside.js.map +1 -1
  319. package/lib/needsPolyfillPlaceholder/needsPolyfillPlaceholder.js +1 -2
  320. package/lib/needsPolyfillPlaceholder/needsPolyfillPlaceholder.js.map +1 -1
  321. package/lib/rootNode/getRootNode/getRootNode.js +1 -1
  322. package/lib/rootNode/getRootNode/getRootNode.js.map +1 -1
  323. package/lib/styles/Mixins/Mixins.js +1 -1
  324. package/lib/styles/Mixins/Mixins.js.map +1 -1
  325. package/lib/theming/ThemeHelpers/ThemeHelpers.js +1 -1
  326. package/lib/theming/ThemeHelpers/ThemeHelpers.js.map +1 -1
  327. package/lib/theming/ThemeVersions/ThemeVersions.js.map +1 -1
  328. package/lib/theming/ThemeVersions.d.ts +1 -1
  329. package/lib/theming/themes/DarkTheme/DarkTheme.js +3 -1
  330. package/lib/theming/themes/DarkTheme/DarkTheme.js.map +1 -1
  331. package/lib/theming/themes/DarkTheme.d.ts +1 -0
  332. package/lib/theming/themes/LightTheme/LightTheme.js +3 -1
  333. package/lib/theming/themes/LightTheme/LightTheme.js.map +1 -1
  334. package/lib/theming/themes/LightTheme.d.ts +1 -0
  335. package/lib/typeGuards/typeGuards.js +1 -1
  336. package/lib/typeGuards/typeGuards.js.map +1 -1
  337. package/lib/utils.d.ts +1 -1
  338. package/lib/withClassWrapper/withClassWrapper.js +3 -1
  339. package/lib/withClassWrapper/withClassWrapper.js.map +1 -1
  340. package/package.json +4 -10
  341. package/cjs/components/Autocomplete/Autocomplete.md +0 -113
  342. package/cjs/components/Button/Button.md +0 -261
  343. package/cjs/components/Calendar/Calendar.md +0 -276
  344. package/cjs/components/Calendar/CalendarDay.md +0 -70
  345. package/cjs/components/Center/Center.md +0 -26
  346. package/cjs/components/Checkbox/Checkbox.md +0 -171
  347. package/cjs/components/ComboBox/ComboBox.md +0 -574
  348. package/cjs/components/CurrencyInput/CurrencyInput.md +0 -39
  349. package/cjs/components/CurrencyLabel/CurrencyLabel.md +0 -29
  350. package/cjs/components/DateInput/DateInput.md +0 -111
  351. package/cjs/components/DatePicker/DatePicker.md +0 -368
  352. package/cjs/components/Dropdown/Dropdown.md +0 -45
  353. package/cjs/components/DropdownMenu/DropdownMenu.md +0 -290
  354. package/cjs/components/FileUploader/FileUploader.md +0 -131
  355. package/cjs/components/FxInput/FxInput.md +0 -31
  356. package/cjs/components/Gapped/Gapped.md +0 -44
  357. package/cjs/components/GlobalLoader/GlobalLoader.md +0 -97
  358. package/cjs/components/Group/Group.md +0 -19
  359. package/cjs/components/Hint/Hint.md +0 -86
  360. package/cjs/components/Input/Input.md +0 -86
  361. package/cjs/components/Kebab/Kebab.md +0 -306
  362. package/cjs/components/Link/Link.md +0 -182
  363. package/cjs/components/Loader/Loader.md +0 -33
  364. package/cjs/components/MaskedInput/MaskedInput.md +0 -114
  365. package/cjs/components/MenuFooter/MenuFooter.md +0 -27
  366. package/cjs/components/MenuHeader/MenuHeader.md +0 -35
  367. package/cjs/components/MenuItem/MenuItem.md +0 -139
  368. package/cjs/components/MenuSeparator/MenuSeparator.md +0 -14
  369. package/cjs/components/MiniModal/MiniModal.md +0 -231
  370. package/cjs/components/Modal/Modal.md +0 -56
  371. package/cjs/components/Paging/Paging.md +0 -57
  372. package/cjs/components/PasswordInput/PasswordInput.md +0 -29
  373. package/cjs/components/Radio/Radio.md +0 -57
  374. package/cjs/components/RadioGroup/RadioGroup.md +0 -44
  375. package/cjs/components/ResponsiveLayout/ResponsiveLayout.md +0 -75
  376. package/cjs/components/ScrollContainer/ScrollContainer.md +0 -224
  377. package/cjs/components/Select/Select.md +0 -113
  378. package/cjs/components/SidePage/SidePage.md +0 -65
  379. package/cjs/components/SingleToast/SingleToast.md +0 -36
  380. package/cjs/components/Spinner/Spinner.md +0 -36
  381. package/cjs/components/Spinner/SpinnerFallbackAnimation.d.ts +0 -25
  382. package/cjs/components/Spinner/SpinnerFallbackAnimation.js +0 -197
  383. package/cjs/components/Spinner/SpinnerFallbackAnimation.js.map +0 -1
  384. package/cjs/components/Sticky/Sticky.md +0 -28
  385. package/cjs/components/Switcher/Switcher.md +0 -111
  386. package/cjs/components/Tabs/Tab.md +0 -73
  387. package/cjs/components/Tabs/Tabs.md +0 -54
  388. package/cjs/components/Textarea/Textarea.md +0 -58
  389. package/cjs/components/Toast/Toast.md +0 -69
  390. package/cjs/components/Toggle/Toggle.md +0 -110
  391. package/cjs/components/Token/Token.md +0 -48
  392. package/cjs/components/TokenInput/TokenInput.md +0 -277
  393. package/cjs/components/Tooltip/Tooltip.md +0 -322
  394. package/cjs/components/TooltipMenu/TooltipMenu.md +0 -241
  395. package/cjs/internal/DataTids/DATATIDS.md +0 -12
  396. package/cjs/internal/DataTids/DataTids.d.ts +0 -12
  397. package/cjs/internal/DataTids/DataTids.js +0 -50
  398. package/cjs/internal/DataTids/DataTids.js.map +0 -1
  399. package/cjs/internal/DataTids/DataTids.styles.d.ts +0 -7
  400. package/cjs/internal/DataTids/DataTids.styles.js +0 -42
  401. package/cjs/internal/DataTids/DataTids.styles.js.map +0 -1
  402. package/cjs/internal/DataTids/componentsDataTids.d.ts +0 -5
  403. package/cjs/internal/DataTids/componentsDataTids.js +0 -15
  404. package/cjs/internal/DataTids/componentsDataTids.js.map +0 -1
  405. package/cjs/internal/InputLikeText/HiddenInput.d.ts +0 -13
  406. package/cjs/internal/InputLikeText/HiddenInput.js +0 -43
  407. package/cjs/internal/InputLikeText/HiddenInput.js.map +0 -1
  408. package/cjs/internal/ThemePlayground/Playground.md +0 -7
  409. package/cjs/lib/events/fixClickFocusIE.d.ts +0 -1
  410. package/cjs/lib/events/fixClickFocusIE.js +0 -20
  411. package/cjs/lib/events/fixClickFocusIE.js.map +0 -1
  412. package/cjs/lib/events/stopPropagation.d.ts +0 -1
  413. package/cjs/lib/events/stopPropagation.js +0 -7
  414. package/cjs/lib/events/stopPropagation.js.map +0 -1
  415. package/cjs/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +0 -64
  416. package/cjs/lib/locale/LOCALECONTEXT.md +0 -222
  417. package/cjs/lib/theming/ThemeContext.md +0 -265
  418. package/components/Autocomplete/Autocomplete.md +0 -113
  419. package/components/Button/Button.md +0 -261
  420. package/components/Calendar/Calendar.md +0 -276
  421. package/components/Calendar/CalendarDay.md +0 -70
  422. package/components/Center/Center.md +0 -26
  423. package/components/Checkbox/Checkbox.md +0 -171
  424. package/components/ComboBox/ComboBox.md +0 -574
  425. package/components/CurrencyInput/CurrencyInput.md +0 -39
  426. package/components/CurrencyLabel/CurrencyLabel.md +0 -29
  427. package/components/DateInput/DateInput.md +0 -111
  428. package/components/DatePicker/DatePicker.md +0 -368
  429. package/components/Dropdown/Dropdown.md +0 -45
  430. package/components/DropdownMenu/DropdownMenu.md +0 -290
  431. package/components/FileUploader/FileUploader.md +0 -131
  432. package/components/FxInput/FxInput.md +0 -31
  433. package/components/Gapped/Gapped.md +0 -44
  434. package/components/GlobalLoader/GlobalLoader.md +0 -97
  435. package/components/Group/Group.md +0 -19
  436. package/components/Hint/Hint.md +0 -86
  437. package/components/Input/Input.md +0 -86
  438. package/components/Kebab/Kebab.md +0 -306
  439. package/components/Link/Link.md +0 -182
  440. package/components/Loader/Loader.md +0 -33
  441. package/components/MaskedInput/MaskedInput.md +0 -114
  442. package/components/MenuFooter/MenuFooter.md +0 -27
  443. package/components/MenuHeader/MenuHeader.md +0 -35
  444. package/components/MenuItem/MenuItem.md +0 -139
  445. package/components/MenuSeparator/MenuSeparator.md +0 -14
  446. package/components/MiniModal/MiniModal.md +0 -231
  447. package/components/Modal/Modal.md +0 -56
  448. package/components/Paging/Paging.md +0 -57
  449. package/components/PasswordInput/PasswordInput.md +0 -29
  450. package/components/Radio/Radio.md +0 -57
  451. package/components/RadioGroup/RadioGroup.md +0 -44
  452. package/components/ResponsiveLayout/ResponsiveLayout.md +0 -75
  453. package/components/ScrollContainer/ScrollContainer.md +0 -224
  454. package/components/Select/Select.md +0 -113
  455. package/components/SidePage/SidePage.md +0 -65
  456. package/components/SingleToast/SingleToast.md +0 -36
  457. package/components/Spinner/Spinner.md +0 -36
  458. package/components/Spinner/SpinnerFallbackAnimation/SpinnerFallbackAnimation.js +0 -146
  459. package/components/Spinner/SpinnerFallbackAnimation/SpinnerFallbackAnimation.js.map +0 -1
  460. package/components/Spinner/SpinnerFallbackAnimation/package.json +0 -6
  461. package/components/Spinner/SpinnerFallbackAnimation.d.ts +0 -25
  462. package/components/Sticky/Sticky.md +0 -28
  463. package/components/Switcher/Switcher.md +0 -111
  464. package/components/Tabs/Tab.md +0 -73
  465. package/components/Tabs/Tabs.md +0 -54
  466. package/components/Textarea/Textarea.md +0 -58
  467. package/components/Toast/Toast.md +0 -69
  468. package/components/Toggle/Toggle.md +0 -110
  469. package/components/Token/Token.md +0 -48
  470. package/components/TokenInput/TokenInput.md +0 -277
  471. package/components/Tooltip/Tooltip.md +0 -322
  472. package/components/TooltipMenu/TooltipMenu.md +0 -241
  473. package/internal/DataTids/DATATIDS.md +0 -12
  474. package/internal/DataTids/DataTids/DataTids.js +0 -69
  475. package/internal/DataTids/DataTids/DataTids.js.map +0 -1
  476. package/internal/DataTids/DataTids/package.json +0 -6
  477. package/internal/DataTids/DataTids.d.ts +0 -12
  478. package/internal/DataTids/DataTids.styles/DataTids.styles.js +0 -20
  479. package/internal/DataTids/DataTids.styles/DataTids.styles.js.map +0 -1
  480. package/internal/DataTids/DataTids.styles/package.json +0 -6
  481. package/internal/DataTids/DataTids.styles.d.ts +0 -7
  482. package/internal/DataTids/componentsDataTids/componentsDataTids.js +0 -12
  483. package/internal/DataTids/componentsDataTids/componentsDataTids.js.map +0 -1
  484. package/internal/DataTids/componentsDataTids/package.json +0 -6
  485. package/internal/DataTids/componentsDataTids.d.ts +0 -5
  486. package/internal/InputLikeText/HiddenInput/HiddenInput.js +0 -42
  487. package/internal/InputLikeText/HiddenInput/HiddenInput.js.map +0 -1
  488. package/internal/InputLikeText/HiddenInput/package.json +0 -6
  489. package/internal/InputLikeText/HiddenInput.d.ts +0 -13
  490. package/internal/ThemePlayground/Playground.md +0 -7
  491. package/lib/events/fixClickFocusIE/fixClickFocusIE.js +0 -18
  492. package/lib/events/fixClickFocusIE/fixClickFocusIE.js.map +0 -1
  493. package/lib/events/fixClickFocusIE/package.json +0 -6
  494. package/lib/events/fixClickFocusIE.d.ts +0 -1
  495. package/lib/events/stopPropagation/package.json +0 -6
  496. package/lib/events/stopPropagation/stopPropagation.js +0 -7
  497. package/lib/events/stopPropagation/stopPropagation.js.map +0 -1
  498. package/lib/events/stopPropagation.d.ts +0 -1
  499. package/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +0 -64
  500. package/lib/locale/LOCALECONTEXT.md +0 -222
  501. package/lib/theming/ThemeContext.md +0 -265
@@ -1,9 +1,8 @@
1
1
  import { globalObject } from '@skbkontur/global-object';
2
- import { isIE11 } from "../client";
3
2
  var needsPolyfillPlaceholderInternal = function needsPolyfillPlaceholderInternal() {
4
3
  if (globalObject.document) {
5
4
  var supportsPlaceholder = ('placeholder' in globalObject.document.createElement('input'));
6
- if (!supportsPlaceholder || isIE11) {
5
+ if (!supportsPlaceholder) {
7
6
  return true;
8
7
  }
9
8
  }
@@ -1 +1 @@
1
- {"version":3,"names":["globalObject","isIE11","needsPolyfillPlaceholderInternal","document","supportsPlaceholder","createElement","needsPolyfillPlaceholder"],"sources":["needsPolyfillPlaceholder.ts"],"sourcesContent":["import { globalObject } from '@skbkontur/global-object';\n\nimport { isIE11 } from './client';\n\nconst needsPolyfillPlaceholderInternal = () => {\n if (globalObject.document) {\n const supportsPlaceholder = 'placeholder' in globalObject.document.createElement('input');\n if (!supportsPlaceholder || isIE11) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Определяет поддерживает ли браузер аттрибут `placeholder` для тега `input`\n *\n * Равен true, если браузеру нужен полифил для placeholder. Иначе - false\n */\nexport const needsPolyfillPlaceholder = needsPolyfillPlaceholderInternal();\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,0BAA0B;;AAEvD,SAASC,MAAM,QAAQ,UAAU;;AAEjC,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAA,EAAS;EAC7C,IAAIF,YAAY,CAACG,QAAQ,EAAE;IACzB,IAAMC,mBAAmB,IAAG,aAAa,IAAIJ,YAAY,CAACG,QAAQ,CAACE,aAAa,CAAC,OAAO,CAAC;IACzF,IAAI,CAACD,mBAAmB,IAAIH,MAAM,EAAE;MAClC,OAAO,IAAI;IACb;EACF;;EAEA,OAAO,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMK,wBAAwB,GAAGJ,gCAAgC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["globalObject","needsPolyfillPlaceholderInternal","document","supportsPlaceholder","createElement","needsPolyfillPlaceholder"],"sources":["needsPolyfillPlaceholder.ts"],"sourcesContent":["import { globalObject } from '@skbkontur/global-object';\n\nconst needsPolyfillPlaceholderInternal = () => {\n if (globalObject.document) {\n const supportsPlaceholder = 'placeholder' in globalObject.document.createElement('input');\n if (!supportsPlaceholder) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * Определяет поддерживает ли браузер аттрибут `placeholder` для тега `input`\n *\n * Равен true, если браузеру нужен полифил для placeholder. Иначе - false\n */\nexport const needsPolyfillPlaceholder = needsPolyfillPlaceholderInternal();\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,0BAA0B;;AAEvD,IAAMC,gCAAgC,GAAG,SAAnCA,gCAAgCA,CAAA,EAAS;EAC7C,IAAID,YAAY,CAACE,QAAQ,EAAE;IACzB,IAAMC,mBAAmB,IAAG,aAAa,IAAIH,YAAY,CAACE,QAAQ,CAACE,aAAa,CAAC,OAAO,CAAC;IACzF,IAAI,CAACD,mBAAmB,EAAE;MACxB,OAAO,IAAI;IACb;EACF;;EAEA,OAAO,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAME,wBAAwB,GAAGJ,gCAAgC,CAAC,CAAC","ignoreList":[]}
@@ -51,7 +51,7 @@ export var getRootNode = function getRootNode(instance) {
51
51
  // but findDOMNode doesn`t accept everything that instance can be at this point,
52
52
  // so we have to handle exceptions
53
53
  // see https://github.com/facebook/react/blob/cae63505/packages/react-dom/src/__tests__/findDOMNode-test.js#L66-L86
54
- warning(false, '[getRootNode]: can`t fallback to findDOMNode.' + '\n' + 'See https://github.com/skbkontur/retail-ui/blob/master/packages/react-ui/README.md#strictmode' + '\n\n' + e.message);
54
+ warning(false, '[getRootNode]: can`t fallback to findDOMNode.' + '\n' + 'See https://github.com/skbkontur/retail-ui/blob/master/packages/react-ui/README.md#strictmode' + '\n\n' + (e == null ? void 0 : e.message) || String(e));
55
55
  return null;
56
56
  }
57
57
 
@@ -1 +1 @@
1
- {"version":3,"names":["findDOMNode","warning","isElement","isInstanceWithRootNode","getRootNode","instance","rootNode","undefined","e","message"],"sources":["getRootNode.ts"],"sourcesContent":["import { findDOMNode } from 'react-dom';\nimport type React from 'react';\nimport warning from 'warning';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport { isElement } from '../utils';\n\nimport { isInstanceWithRootNode } from './rootNodeDecorator';\n\n/**\n * Extracts component's root Element (HTMLElement/SVGElement) out of it's instance\n * following the \"StrictMode support convention\" (@see README.md#strictmode, #2518).\n *\n * Replaces findDOMNode but falls back to it if \"convention\" is not respected.\n *\n * @param instance Component's instance provided by React.Ref or `this` inside class-components.\n * @returns Component's root `Element` or null\n */\n\nexport const getRootNode = (instance: Nullable<React.ReactInstance>): Nullable<Element> => {\n /**\n * Options of what instance can be:\n * 1. null or undefined\n * 2. DOM Element\n * 3. class Component instance (object)\n * 4. literally anything, returned from useImperativeHandle\n */\n\n if (!instance) {\n // instance can be `null` if component was unmounted\n // also checking undefined for convenient usage\n return null;\n }\n\n if (isElement(instance)) {\n // instance can be an Element already if its coming\n // from Refs of intrinsic elements (<div />, <button />, etc.)\n return instance;\n }\n\n let rootNode;\n\n if (isInstanceWithRootNode(instance)) {\n rootNode = instance.getRootNode();\n }\n\n if (rootNode !== undefined) {\n // the getter exists and has returned something, it should be what we are looking for\n // probably its an Element or null (which is also OK, e.g. Popup/Tooltip/Hint before opening)\n return rootNode;\n }\n\n try {\n // rootNode is undefined, which means that the getter doesn't exists or returns the undefined\n // anyway, it tell us that the convention is not respected,\n // so, we have to fall back to the deprecated findDOMNode, which breaks StrictMode\n // instance can still be a class component or an imperative handle (i.e., anything, except null/undefined/Element)\n rootNode = findDOMNode(instance);\n } catch (e) {\n // but findDOMNode doesn`t accept everything that instance can be at this point,\n // so we have to handle exceptions\n // see https://github.com/facebook/react/blob/cae63505/packages/react-dom/src/__tests__/findDOMNode-test.js#L66-L86\n warning(\n false,\n '[getRootNode]: can`t fallback to findDOMNode.' +\n '\\n' +\n 'See https://github.com/skbkontur/retail-ui/blob/master/packages/react-ui/README.md#strictmode' +\n '\\n\\n' +\n e.message,\n );\n return null;\n }\n\n // the findDOMNode can also return Text, but we are only interested in Elements, so just filter it\n return isElement(rootNode) ? rootNode : null;\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,WAAW;;AAEvC,OAAOC,OAAO,MAAM,SAAS;;;AAG7B,SAASC,SAAS,QAAQ,UAAU;;AAEpC,SAASC,sBAAsB,QAAQ,qBAAqB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,QAAuC,EAAwB;EACzF;AACF;AACA;AACA;AACA;AACA;AACA;;EAEE,IAAI,CAACA,QAAQ,EAAE;IACb;IACA;IACA,OAAO,IAAI;EACb;;EAEA,IAAIH,SAAS,CAACG,QAAQ,CAAC,EAAE;IACvB;IACA;IACA,OAAOA,QAAQ;EACjB;;EAEA,IAAIC,QAAQ;;EAEZ,IAAIH,sBAAsB,CAACE,QAAQ,CAAC,EAAE;IACpCC,QAAQ,GAAGD,QAAQ,CAACD,WAAW,CAAC,CAAC;EACnC;;EAEA,IAAIE,QAAQ,KAAKC,SAAS,EAAE;IAC1B;IACA;IACA,OAAOD,QAAQ;EACjB;;EAEA,IAAI;IACF;IACA;IACA;IACA;IACAA,QAAQ,GAAGN,WAAW,CAACK,QAAQ,CAAC;EAClC,CAAC,CAAC,OAAOG,CAAC,EAAE;IACV;IACA;IACA;IACAP,OAAO;MACL,KAAK;MACL,+CAA+C;MAC7C,IAAI;MACJ,+FAA+F;MAC/F,MAAM;MACNO,CAAC,CAACC;IACN,CAAC;IACD,OAAO,IAAI;EACb;;EAEA;EACA,OAAOP,SAAS,CAACI,QAAQ,CAAC,GAAGA,QAAQ,GAAG,IAAI;AAC9C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["findDOMNode","warning","isElement","isInstanceWithRootNode","getRootNode","instance","rootNode","undefined","e","message","String"],"sources":["getRootNode.ts"],"sourcesContent":["import { findDOMNode } from 'react-dom';\nimport type React from 'react';\nimport warning from 'warning';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport { isElement } from '../utils';\n\nimport { isInstanceWithRootNode } from './rootNodeDecorator';\n\n/**\n * Extracts component's root Element (HTMLElement/SVGElement) out of it's instance\n * following the \"StrictMode support convention\" (@see README.md#strictmode, #2518).\n *\n * Replaces findDOMNode but falls back to it if \"convention\" is not respected.\n *\n * @param instance Component's instance provided by React.Ref or `this` inside class-components.\n * @returns Component's root `Element` or null\n */\n\nexport const getRootNode = (instance: Nullable<React.ReactInstance>): Nullable<Element> => {\n /**\n * Options of what instance can be:\n * 1. null or undefined\n * 2. DOM Element\n * 3. class Component instance (object)\n * 4. literally anything, returned from useImperativeHandle\n */\n\n if (!instance) {\n // instance can be `null` if component was unmounted\n // also checking undefined for convenient usage\n return null;\n }\n\n if (isElement(instance)) {\n // instance can be an Element already if its coming\n // from Refs of intrinsic elements (<div />, <button />, etc.)\n return instance;\n }\n\n let rootNode;\n\n if (isInstanceWithRootNode(instance)) {\n rootNode = instance.getRootNode();\n }\n\n if (rootNode !== undefined) {\n // the getter exists and has returned something, it should be what we are looking for\n // probably its an Element or null (which is also OK, e.g. Popup/Tooltip/Hint before opening)\n return rootNode;\n }\n\n try {\n // rootNode is undefined, which means that the getter doesn't exists or returns the undefined\n // anyway, it tell us that the convention is not respected,\n // so, we have to fall back to the deprecated findDOMNode, which breaks StrictMode\n // instance can still be a class component or an imperative handle (i.e., anything, except null/undefined/Element)\n rootNode = findDOMNode(instance);\n } catch (e) {\n // but findDOMNode doesn`t accept everything that instance can be at this point,\n // so we have to handle exceptions\n // see https://github.com/facebook/react/blob/cae63505/packages/react-dom/src/__tests__/findDOMNode-test.js#L66-L86\n warning(\n false,\n '[getRootNode]: can`t fallback to findDOMNode.' +\n '\\n' +\n 'See https://github.com/skbkontur/retail-ui/blob/master/packages/react-ui/README.md#strictmode' +\n '\\n\\n' +\n (e as Error)?.message || String(e),\n );\n return null;\n }\n\n // the findDOMNode can also return Text, but we are only interested in Elements, so just filter it\n return isElement(rootNode) ? rootNode : null;\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,WAAW;;AAEvC,OAAOC,OAAO,MAAM,SAAS;;;AAG7B,SAASC,SAAS,QAAQ,UAAU;;AAEpC,SAASC,sBAAsB,QAAQ,qBAAqB;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAIC,QAAuC,EAAwB;EACzF;AACF;AACA;AACA;AACA;AACA;AACA;;EAEE,IAAI,CAACA,QAAQ,EAAE;IACb;IACA;IACA,OAAO,IAAI;EACb;;EAEA,IAAIH,SAAS,CAACG,QAAQ,CAAC,EAAE;IACvB;IACA;IACA,OAAOA,QAAQ;EACjB;;EAEA,IAAIC,QAAQ;;EAEZ,IAAIH,sBAAsB,CAACE,QAAQ,CAAC,EAAE;IACpCC,QAAQ,GAAGD,QAAQ,CAACD,WAAW,CAAC,CAAC;EACnC;;EAEA,IAAIE,QAAQ,KAAKC,SAAS,EAAE;IAC1B;IACA;IACA,OAAOD,QAAQ;EACjB;;EAEA,IAAI;IACF;IACA;IACA;IACA;IACAA,QAAQ,GAAGN,WAAW,CAACK,QAAQ,CAAC;EAClC,CAAC,CAAC,OAAOG,CAAC,EAAE;IACV;IACA;IACA;IACAP,OAAO;MACL,KAAK;MACL,+CAA+C;MAC7C,IAAI;MACJ,+FAA+F;MAC/F,MAAM;MACLO,CAAC,oBAADA,CAAC,CAAYC,OAAO,KAAIC,MAAM,CAACF,CAAC;IACrC,CAAC;IACD,OAAO,IAAI;EACb;;EAEA;EACA,OAAON,SAAS,CAACI,QAAQ,CAAC,GAAGA,QAAQ,GAAG,IAAI;AAC9C,CAAC","ignoreList":[]}
@@ -5,5 +5,5 @@ export var resetButton = function resetButton() {
5
5
  return css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n outline: none;\n border: none;\n margin: 0; /* Need for Safari. */\n padding: 0;\n width: auto;\n overflow: visible; /* On IE it's hidden by default. */\n background: transparent;\n\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n\n /* Normalize 'line-height'. Cannot be changed from 'normal' in Firefox 4+. */\n line-height: normal;\n\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n\n /* Corrects inability to style clickable 'input' types in iOS */\n -webkit-appearance: none;\n text-align: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])));
6
6
  };
7
7
  export var resetText = function resetText() {
8
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n letter-spacing: normal;\n line-height: normal;\n font-family: inherit;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n font-stretch: normal;\n\n /* ie11 doesnt support 'initial' */\n text-align: left;\n text-align: initial;\n text-transform: none;\n text-shadow: none;\n "])));
8
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteralLoose(["\n letter-spacing: normal;\n line-height: normal;\n font-family: inherit;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n font-stretch: normal;\n\n text-align: initial;\n text-transform: none;\n text-shadow: none;\n "])));
9
9
  };
@@ -1 +1 @@
1
- {"version":3,"names":["css","resetButton","_templateObject","_taggedTemplateLiteralLoose","resetText","_templateObject2"],"sources":["Mixins.ts"],"sourcesContent":["import { css } from '../theming/Emotion';\n\nexport const resetButton = () => {\n return css`\n outline: none;\n border: none;\n margin: 0; /* Need for Safari. */\n padding: 0;\n width: auto;\n overflow: visible; /* On IE it's hidden by default. */\n background: transparent;\n\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n\n /* Normalize 'line-height'. Cannot be changed from 'normal' in Firefox 4+. */\n line-height: normal;\n\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n\n /* Corrects inability to style clickable 'input' types in iOS */\n -webkit-appearance: none;\n text-align: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n `;\n};\n\nexport const resetText = () => {\n return css`\n letter-spacing: normal;\n line-height: normal;\n font-family: inherit;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n font-stretch: normal;\n\n /* ie11 doesnt support 'initial' */\n text-align: left;\n text-align: initial;\n text-transform: none;\n text-shadow: none;\n `;\n};\n"],"mappings":"sIAAA,SAASA,GAAG,QAAQ,oBAAoB;;AAExC,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA,EAAS;EAC/B,OAAOD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,2BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BZ,CAAC;;AAED,OAAO,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAAS;EAC7B,OAAOJ,GAAG,CAAAK,gBAAA,KAAAA,gBAAA,GAAAF,2BAAA;;;;;;;;;;;;;;;AAeZ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["css","resetButton","_templateObject","_taggedTemplateLiteralLoose","resetText","_templateObject2"],"sources":["Mixins.ts"],"sourcesContent":["import { css } from '../theming/Emotion';\n\nexport const resetButton = () => {\n return css`\n outline: none;\n border: none;\n margin: 0; /* Need for Safari. */\n padding: 0;\n width: auto;\n overflow: visible; /* On IE it's hidden by default. */\n background: transparent;\n\n /* inherit font & color from ancestor */\n color: inherit;\n font: inherit;\n\n /* Normalize 'line-height'. Cannot be changed from 'normal' in Firefox 4+. */\n line-height: normal;\n\n /* Corrects font smoothing for webkit */\n -webkit-font-smoothing: inherit;\n -moz-osx-font-smoothing: inherit;\n\n /* Corrects inability to style clickable 'input' types in iOS */\n -webkit-appearance: none;\n text-align: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n `;\n};\n\nexport const resetText = () => {\n return css`\n letter-spacing: normal;\n line-height: normal;\n font-family: inherit;\n font-weight: normal;\n font-style: normal;\n font-variant: normal;\n font-stretch: normal;\n\n text-align: initial;\n text-transform: none;\n text-shadow: none;\n `;\n};\n"],"mappings":"sIAAA,SAASA,GAAG,QAAQ,oBAAoB;;AAExC,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA,EAAS;EAC/B,OAAOD,GAAG,CAAAE,eAAA,KAAAA,eAAA,GAAAC,2BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BZ,CAAC;;AAED,OAAO,IAAMC,SAAS,GAAG,SAAZA,SAASA,CAAA,EAAS;EAC7B,OAAOJ,GAAG,CAAAK,gBAAA,KAAAA,gBAAA,GAAAF,2BAAA;;;;;;;;;;;;;AAaZ,CAAC","ignoreList":[]}
@@ -79,7 +79,7 @@ export var isThemeGTE = function isThemeGTE(theme, version) {
79
79
  // @ts-expect-error: internal value.
80
80
  theme[REACT_UI_THEME_MARKERS.themeVersion.key];
81
81
  if (!themeVersion) {
82
- warning(true, "[ThemeHelpers]: The theme doesn't have a version. Checking for " + version + ".");
82
+ warning(false, "[ThemeHelpers]: The theme doesn't have a version. Checking for " + version + ".");
83
83
  return false;
84
84
  }
85
85
  return isThemeVersionGTE(themeVersion, version);
@@ -1 +1 @@
1
- {"version":3,"names":["warning","isNonNullable","isThemeVersionGTE","exposeGetters","theme","descriptors","Object","getOwnPropertyDescriptors","keys","forEach","key","descriptor","get","configurable","enumerable","defineProperty","REACT_UI_THEME_MARKERS","darkTheme","value","themeVersion","REACT_UI_DARK_THEME_KEY","isDarkTheme","markAsDarkTheme","_Object$create","create","writable","markThemeVersion","version","_Object$create2","isThemeGTE","findPropertyDescriptor","propName","getPrototypeOf","prototype","hasOwnProperty","call","getOwnPropertyDescriptor","applyMarkers","markers","reduce","markedTheme","marker","createTheme","options","themeClass","prototypeTheme","_options$themeMarkers","themeMarkers","setPrototypeOf","freeze"],"sources":["ThemeHelpers.ts"],"sourcesContent":["import warning from 'warning';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport { isNonNullable } from '../utils';\n\nimport type { Theme, ThemeIn } from './Theme';\nimport type { ThemeVersions } from './ThemeVersions';\nimport { isThemeVersionGTE } from './ThemeVersions';\n\nexport type Marker = (theme: Theme) => Theme;\nexport type Markers = Marker[];\n\n/**\n * Makes all computable theme variables (getters) visible to the Object.keys(theme)\n * @param theme Theme object\n * @returns The given theme object with all getters made enumerable\n */\nexport const exposeGetters = (theme: Theme): Theme => {\n const descriptors = Object.getOwnPropertyDescriptors(theme);\n Object.keys(descriptors).forEach((key) => {\n const descriptor = descriptors[key];\n if (typeof descriptor.get === 'function' && descriptor.configurable) {\n descriptor.enumerable = true;\n Object.defineProperty(theme, key, descriptor);\n }\n });\n return theme;\n};\n\nexport const REACT_UI_THEME_MARKERS: {\n darkTheme: {\n key: string;\n value: true;\n };\n themeVersion: {\n key: string;\n value: ThemeVersions | null;\n };\n} = {\n darkTheme: {\n key: '__IS_REACT_UI_DARK_THEME__',\n value: true,\n },\n themeVersion: {\n key: '__REACT_UI_THEME_VERSION__',\n value: null,\n },\n};\n\n// backward compatible\nexport const REACT_UI_DARK_THEME_KEY = REACT_UI_THEME_MARKERS.darkTheme.key;\n\nexport const isDarkTheme = (theme: Theme | ThemeIn): boolean => {\n // @ts-expect-error: internal value.\n return theme[REACT_UI_THEME_MARKERS.darkTheme.key] === REACT_UI_THEME_MARKERS.darkTheme.value;\n};\n\n/**\n * Marks the given theme as \"dark\"\n * @param theme Theme object\n * @returns The given theme object with a \"dark theme\" mark\n */\nexport const markAsDarkTheme: Marker = (theme) => {\n return Object.create(theme, {\n [REACT_UI_THEME_MARKERS.darkTheme.key]: {\n value: REACT_UI_THEME_MARKERS.darkTheme.value,\n writable: false,\n enumerable: false,\n configurable: false,\n },\n });\n};\n\n/**\n * Creates a marker for the theme, that will mark it with a version\n * @param version Theme version\n * @returns A marker that marks the given theme with the given version once applied\n */\nexport const markThemeVersion: (version: ThemeVersions) => Marker = (version) => (theme) => {\n return Object.create(theme, {\n [REACT_UI_THEME_MARKERS.themeVersion.key]: {\n value: version || REACT_UI_THEME_MARKERS.themeVersion.value,\n writable: false,\n enumerable: false,\n configurable: false,\n },\n });\n};\n\n/**\n * Checks if the given theme's version is \"greater or equal\" then the given version\n * @param theme Theme object\n * @param version A string version\n * @returns Boolean result\n */\nexport const isThemeGTE = (theme: Theme | ThemeIn, version: ThemeVersions): boolean => {\n const themeVersion: Nullable<ThemeVersions> =\n // @ts-expect-error: internal value.\n theme[REACT_UI_THEME_MARKERS.themeVersion.key];\n\n if (!themeVersion) {\n warning(true, `[ThemeHelpers]: The theme doesn't have a version. Checking for ${version}.`);\n return false;\n }\n\n return isThemeVersionGTE(themeVersion, version);\n};\n\n/**\n * Finds the given theme's object property descriptor by its name\n * @param theme Theme object\n * @param propName The property name\n * @returns The found descriptor or an empty object\n */\nexport function findPropertyDescriptor(theme: Theme, propName: string) {\n // TODO: Rewrite for loop.\n // TODO: Enable `no-param-reassign` rule.\n // eslint-disable-next-line no-param-reassign\n for (; isNonNullable(theme); theme = Object.getPrototypeOf(theme)) {\n if (Object.prototype.hasOwnProperty.call(theme, propName)) {\n return Object.getOwnPropertyDescriptor(theme, propName) || {};\n }\n }\n return {};\n}\n\n/**\n * Marks the given theme with the given markers\n * @param theme Theme object\n * @param markers Markers array\n * @returns The given theme marked with the given marks\n */\nexport function applyMarkers(theme: Theme, markers: Markers): Theme {\n return markers.reduce((markedTheme, marker) => {\n return marker(markedTheme);\n }, Object.create(theme));\n}\n\n/**\n * Creates a theme object out of the given class with variables\n * @param options Options object\n * @param options.themeClass A class with variables\n * @param [options.prototypeTheme] An optional prototype theme, that will be the base for the new theme\n * @param [options.themeMarkers] An optional array of markers, that new them will be marked of\n * @returns The new theme object\n */\nexport function createTheme(options: { themeClass: Theme; prototypeTheme?: Theme; themeMarkers?: Markers }): Theme {\n const { themeClass, prototypeTheme, themeMarkers = [] } = options;\n\n if (prototypeTheme) {\n Object.setPrototypeOf(themeClass, prototypeTheme);\n }\n\n const theme = applyMarkers(exposeGetters(themeClass), themeMarkers);\n\n return Object.freeze(theme);\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["warning","isNonNullable","isThemeVersionGTE","exposeGetters","theme","descriptors","Object","getOwnPropertyDescriptors","keys","forEach","key","descriptor","get","configurable","enumerable","defineProperty","REACT_UI_THEME_MARKERS","darkTheme","value","themeVersion","REACT_UI_DARK_THEME_KEY","isDarkTheme","markAsDarkTheme","_Object$create","create","writable","markThemeVersion","version","_Object$create2","isThemeGTE","findPropertyDescriptor","propName","getPrototypeOf","prototype","hasOwnProperty","call","getOwnPropertyDescriptor","applyMarkers","markers","reduce","markedTheme","marker","createTheme","options","themeClass","prototypeTheme","_options$themeMarkers","themeMarkers","setPrototypeOf","freeze"],"sources":["ThemeHelpers.ts"],"sourcesContent":["import warning from 'warning';\n\nimport type { Nullable } from '../../typings/utility-types';\nimport { isNonNullable } from '../utils';\n\nimport type { Theme, ThemeIn } from './Theme';\nimport type { ThemeVersions } from './ThemeVersions';\nimport { isThemeVersionGTE } from './ThemeVersions';\n\nexport type Marker = (theme: Theme) => Theme;\nexport type Markers = Marker[];\n\n/**\n * Makes all computable theme variables (getters) visible to the Object.keys(theme)\n * @param theme Theme object\n * @returns The given theme object with all getters made enumerable\n */\nexport const exposeGetters = (theme: Theme): Theme => {\n const descriptors = Object.getOwnPropertyDescriptors(theme);\n Object.keys(descriptors).forEach((key) => {\n const descriptor = descriptors[key];\n if (typeof descriptor.get === 'function' && descriptor.configurable) {\n descriptor.enumerable = true;\n Object.defineProperty(theme, key, descriptor);\n }\n });\n return theme;\n};\n\nexport const REACT_UI_THEME_MARKERS: {\n darkTheme: {\n key: string;\n value: true;\n };\n themeVersion: {\n key: string;\n value: ThemeVersions | null;\n };\n} = {\n darkTheme: {\n key: '__IS_REACT_UI_DARK_THEME__',\n value: true,\n },\n themeVersion: {\n key: '__REACT_UI_THEME_VERSION__',\n value: null,\n },\n};\n\n// backward compatible\nexport const REACT_UI_DARK_THEME_KEY = REACT_UI_THEME_MARKERS.darkTheme.key;\n\nexport const isDarkTheme = (theme: Theme | ThemeIn): boolean => {\n // @ts-expect-error: internal value.\n return theme[REACT_UI_THEME_MARKERS.darkTheme.key] === REACT_UI_THEME_MARKERS.darkTheme.value;\n};\n\n/**\n * Marks the given theme as \"dark\"\n * @param theme Theme object\n * @returns The given theme object with a \"dark theme\" mark\n */\nexport const markAsDarkTheme: Marker = (theme) => {\n return Object.create(theme, {\n [REACT_UI_THEME_MARKERS.darkTheme.key]: {\n value: REACT_UI_THEME_MARKERS.darkTheme.value,\n writable: false,\n enumerable: false,\n configurable: false,\n },\n });\n};\n\n/**\n * Creates a marker for the theme, that will mark it with a version\n * @param version Theme version\n * @returns A marker that marks the given theme with the given version once applied\n */\nexport const markThemeVersion: (version: ThemeVersions) => Marker = (version) => (theme) => {\n return Object.create(theme, {\n [REACT_UI_THEME_MARKERS.themeVersion.key]: {\n value: version || REACT_UI_THEME_MARKERS.themeVersion.value,\n writable: false,\n enumerable: false,\n configurable: false,\n },\n });\n};\n\n/**\n * Checks if the given theme's version is \"greater or equal\" then the given version\n * @param theme Theme object\n * @param version A string version\n * @returns Boolean result\n */\nexport const isThemeGTE = (theme: Theme | ThemeIn, version: ThemeVersions): boolean => {\n const themeVersion: Nullable<ThemeVersions> =\n // @ts-expect-error: internal value.\n theme[REACT_UI_THEME_MARKERS.themeVersion.key];\n\n if (!themeVersion) {\n warning(false, `[ThemeHelpers]: The theme doesn't have a version. Checking for ${version}.`);\n return false;\n }\n\n return isThemeVersionGTE(themeVersion, version);\n};\n\n/**\n * Finds the given theme's object property descriptor by its name\n * @param theme Theme object\n * @param propName The property name\n * @returns The found descriptor or an empty object\n */\nexport function findPropertyDescriptor(theme: Theme, propName: string) {\n // TODO: Rewrite for loop.\n // TODO: Enable `no-param-reassign` rule.\n // eslint-disable-next-line no-param-reassign\n for (; isNonNullable(theme); theme = Object.getPrototypeOf(theme)) {\n if (Object.prototype.hasOwnProperty.call(theme, propName)) {\n return Object.getOwnPropertyDescriptor(theme, propName) || {};\n }\n }\n return {};\n}\n\n/**\n * Marks the given theme with the given markers\n * @param theme Theme object\n * @param markers Markers array\n * @returns The given theme marked with the given marks\n */\nexport function applyMarkers(theme: Theme, markers: Markers): Theme {\n return markers.reduce((markedTheme, marker) => {\n return marker(markedTheme);\n }, Object.create(theme));\n}\n\n/**\n * Creates a theme object out of the given class with variables\n * @param options Options object\n * @param options.themeClass A class with variables\n * @param [options.prototypeTheme] An optional prototype theme, that will be the base for the new theme\n * @param [options.themeMarkers] An optional array of markers, that new them will be marked of\n * @returns The new theme object\n */\nexport function createTheme(options: { themeClass: Theme; prototypeTheme?: Theme; themeMarkers?: Markers }): Theme {\n const { themeClass, prototypeTheme, themeMarkers = [] } = options;\n\n if (prototypeTheme) {\n Object.setPrototypeOf(themeClass, prototypeTheme);\n }\n\n const theme = applyMarkers(exposeGetters(themeClass), themeMarkers);\n\n return Object.freeze(theme);\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["parseThemeVersion","str","separator","match","RegExp","major","minor","Number","parseVersionFromThemeName","name","isThemeVersionGTE","v1","v2","parsedV1","parsedV2"],"sources":["ThemeVersions.ts"],"sourcesContent":["export type ThemeVersions = '5.0' | '5.1' | '5.2' | '5.3';\nexport interface ThemeVersionParsed {\n major: number;\n minor: number;\n}\n\n/**\n * Converts a string theme version to the object with numbers\n * @param str A string with version (e.g. \"1.0\")\n * @param [separator=\".\"] Optional major and minor string separator. By default is \".\"\n * @returns An object of type { major: number; minor: number } or null, if the given string is invalid\n */\nexport const parseThemeVersion = (str: string, separator: string = '\\\\.'): ThemeVersionParsed | null => {\n const match = str.match(new RegExp(`(\\\\d+)${separator}(\\\\d+)`));\n const major = match?.[1];\n const minor = match?.[2];\n\n if (!major || !minor) {\n return null;\n }\n\n return {\n major: Number(major),\n minor: Number(minor),\n };\n};\n\n/**\n * Extracts a version from a theme name\n * @param name A string theme name (e.g. \"LIGHT_THEME_1_0\")\n * @returns An object of type { major: number; minor: number } or null, if the given string is invalid or contains no version\n */\nexport const parseVersionFromThemeName = (name: string): ThemeVersionParsed | null => {\n return parseThemeVersion(name, '_');\n};\n\n/**\n * Checks if one string theme version is \"greater or equal\" than another one\n * @param v1 The version being compared (e.g. \"1.0\")\n * @param v2 The version being compared to (e.g. \"2.0\")\n * @returns Boolean result\n */\nexport const isThemeVersionGTE = (v1: ThemeVersions, v2: ThemeVersions): boolean => {\n const parsedV1 = parseThemeVersion(v1);\n const parsedV2 = parseThemeVersion(v2);\n\n if (!parsedV1 || !parsedV2) {\n return false;\n }\n\n if (parsedV1.major > parsedV2.major) {\n return true;\n } else if (parsedV1.major === parsedV2.major) {\n return parsedV1.minor >= parsedV2.minor;\n }\n\n return false;\n};\n"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,GAAW,EAAEC,SAAiB,EAAwC,KAAzDA,SAAiB,cAAjBA,SAAiB,GAAG,KAAK;EACtE,IAAMC,KAAK,GAAGF,GAAG,CAACE,KAAK,CAAC,IAAIC,MAAM,YAAUF,SAAS,WAAQ,CAAC,CAAC;EAC/D,IAAMG,KAAK,GAAGF,KAAK,oBAALA,KAAK,CAAG,CAAC,CAAC;EACxB,IAAMG,KAAK,GAAGH,KAAK,oBAALA,KAAK,CAAG,CAAC,CAAC;;EAExB,IAAI,CAACE,KAAK,IAAI,CAACC,KAAK,EAAE;IACpB,OAAO,IAAI;EACb;;EAEA,OAAO;IACLD,KAAK,EAAEE,MAAM,CAACF,KAAK,CAAC;IACpBC,KAAK,EAAEC,MAAM,CAACD,KAAK;EACrB,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAME,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAIC,IAAY,EAAgC;EACpF,OAAOT,iBAAiB,CAACS,IAAI,EAAE,GAAG,CAAC;AACrC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,EAAiB,EAAEC,EAAiB,EAAc;EAClF,IAAMC,QAAQ,GAAGb,iBAAiB,CAACW,EAAE,CAAC;EACtC,IAAMG,QAAQ,GAAGd,iBAAiB,CAACY,EAAE,CAAC;;EAEtC,IAAI,CAACC,QAAQ,IAAI,CAACC,QAAQ,EAAE;IAC1B,OAAO,KAAK;EACd;;EAEA,IAAID,QAAQ,CAACR,KAAK,GAAGS,QAAQ,CAACT,KAAK,EAAE;IACnC,OAAO,IAAI;EACb,CAAC,MAAM,IAAIQ,QAAQ,CAACR,KAAK,KAAKS,QAAQ,CAACT,KAAK,EAAE;IAC5C,OAAOQ,QAAQ,CAACP,KAAK,IAAIQ,QAAQ,CAACR,KAAK;EACzC;;EAEA,OAAO,KAAK;AACd,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["parseThemeVersion","str","separator","match","RegExp","major","minor","Number","parseVersionFromThemeName","name","isThemeVersionGTE","v1","v2","parsedV1","parsedV2"],"sources":["ThemeVersions.ts"],"sourcesContent":["export type ThemeVersions = '5.0' | '5.1' | '5.2' | '5.3' | '5.4';\nexport interface ThemeVersionParsed {\n major: number;\n minor: number;\n}\n\n/**\n * Converts a string theme version to the object with numbers\n * @param str A string with version (e.g. \"1.0\")\n * @param [separator=\".\"] Optional major and minor string separator. By default is \".\"\n * @returns An object of type { major: number; minor: number } or null, if the given string is invalid\n */\nexport const parseThemeVersion = (str: string, separator: string = '\\\\.'): ThemeVersionParsed | null => {\n const match = str.match(new RegExp(`(\\\\d+)${separator}(\\\\d+)`));\n const major = match?.[1];\n const minor = match?.[2];\n\n if (!major || !minor) {\n return null;\n }\n\n return {\n major: Number(major),\n minor: Number(minor),\n };\n};\n\n/**\n * Extracts a version from a theme name\n * @param name A string theme name (e.g. \"LIGHT_THEME_1_0\")\n * @returns An object of type { major: number; minor: number } or null, if the given string is invalid or contains no version\n */\nexport const parseVersionFromThemeName = (name: string): ThemeVersionParsed | null => {\n return parseThemeVersion(name, '_');\n};\n\n/**\n * Checks if one string theme version is \"greater or equal\" than another one\n * @param v1 The version being compared (e.g. \"1.0\")\n * @param v2 The version being compared to (e.g. \"2.0\")\n * @returns Boolean result\n */\nexport const isThemeVersionGTE = (v1: ThemeVersions, v2: ThemeVersions): boolean => {\n const parsedV1 = parseThemeVersion(v1);\n const parsedV2 = parseThemeVersion(v2);\n\n if (!parsedV1 || !parsedV2) {\n return false;\n }\n\n if (parsedV1.major > parsedV2.major) {\n return true;\n } else if (parsedV1.major === parsedV2.major) {\n return parsedV1.minor >= parsedV2.minor;\n }\n\n return false;\n};\n"],"mappings":";;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,GAAW,EAAEC,SAAiB,EAAwC,KAAzDA,SAAiB,cAAjBA,SAAiB,GAAG,KAAK;EACtE,IAAMC,KAAK,GAAGF,GAAG,CAACE,KAAK,CAAC,IAAIC,MAAM,YAAUF,SAAS,WAAQ,CAAC,CAAC;EAC/D,IAAMG,KAAK,GAAGF,KAAK,oBAALA,KAAK,CAAG,CAAC,CAAC;EACxB,IAAMG,KAAK,GAAGH,KAAK,oBAALA,KAAK,CAAG,CAAC,CAAC;;EAExB,IAAI,CAACE,KAAK,IAAI,CAACC,KAAK,EAAE;IACpB,OAAO,IAAI;EACb;;EAEA,OAAO;IACLD,KAAK,EAAEE,MAAM,CAACF,KAAK,CAAC;IACpBC,KAAK,EAAEC,MAAM,CAACD,KAAK;EACrB,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,IAAME,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAIC,IAAY,EAAgC;EACpF,OAAOT,iBAAiB,CAACS,IAAI,EAAE,GAAG,CAAC;AACrC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,IAAMC,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,EAAiB,EAAEC,EAAiB,EAAc;EAClF,IAAMC,QAAQ,GAAGb,iBAAiB,CAACW,EAAE,CAAC;EACtC,IAAMG,QAAQ,GAAGd,iBAAiB,CAACY,EAAE,CAAC;;EAEtC,IAAI,CAACC,QAAQ,IAAI,CAACC,QAAQ,EAAE;IAC1B,OAAO,KAAK;EACd;;EAEA,IAAID,QAAQ,CAACR,KAAK,GAAGS,QAAQ,CAACT,KAAK,EAAE;IACnC,OAAO,IAAI;EACb,CAAC,MAAM,IAAIQ,QAAQ,CAACR,KAAK,KAAKS,QAAQ,CAACT,KAAK,EAAE;IAC5C,OAAOQ,QAAQ,CAACP,KAAK,IAAIQ,QAAQ,CAACR,KAAK;EACzC;;EAEA,OAAO,KAAK;AACd,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- export type ThemeVersions = '5.0' | '5.1' | '5.2' | '5.3';
1
+ export type ThemeVersions = '5.0' | '5.1' | '5.2' | '5.3' | '5.4';
2
2
  export interface ThemeVersionParsed {
3
3
  major: number;
4
4
  minor: number;
@@ -2,8 +2,10 @@ import { DarkTheme5_0 } from "../../../../internal/themes/DarkTheme5_0";
2
2
  import { DarkTheme5_1 } from "../../../../internal/themes/DarkTheme5_1";
3
3
  import { DarkTheme5_2 } from "../../../../internal/themes/DarkTheme5_2";
4
4
  import { DarkTheme5_3 } from "../../../../internal/themes/DarkTheme5_3";
5
+ import { DarkTheme5_4 } from "../../../../internal/themes/DarkTheme5_4";
5
6
  export var DARK_THEME_5_0 = DarkTheme5_0;
6
7
  export var DARK_THEME_5_1 = DarkTheme5_1;
7
8
  export var DARK_THEME_5_2 = DarkTheme5_2;
8
9
  export var DARK_THEME_5_3 = DarkTheme5_3;
9
- export var DARK_THEME = DARK_THEME_5_3;
10
+ export var DARK_THEME_5_4 = DarkTheme5_4;
11
+ export var DARK_THEME = DARK_THEME_5_4;
@@ -1 +1 @@
1
- {"version":3,"names":["DarkTheme5_0","DarkTheme5_1","DarkTheme5_2","DarkTheme5_3","DARK_THEME_5_0","DARK_THEME_5_1","DARK_THEME_5_2","DARK_THEME_5_3","DARK_THEME"],"sources":["DarkTheme.ts"],"sourcesContent":["import { DarkTheme5_0 } from '../../../internal/themes/DarkTheme5_0';\nimport { DarkTheme5_1 } from '../../../internal/themes/DarkTheme5_1';\nimport { DarkTheme5_2 } from '../../../internal/themes/DarkTheme5_2';\nimport { DarkTheme5_3 } from '../../../internal/themes/DarkTheme5_3';\n\nexport const DARK_THEME_5_0 = DarkTheme5_0;\nexport const DARK_THEME_5_1 = DarkTheme5_1;\nexport const DARK_THEME_5_2 = DarkTheme5_2;\nexport const DARK_THEME_5_3 = DarkTheme5_3;\n\nexport const DARK_THEME = DARK_THEME_5_3;\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;;AAEpE,OAAO,IAAMC,cAAc,GAAGJ,YAAY;AAC1C,OAAO,IAAMK,cAAc,GAAGJ,YAAY;AAC1C,OAAO,IAAMK,cAAc,GAAGJ,YAAY;AAC1C,OAAO,IAAMK,cAAc,GAAGJ,YAAY;;AAE1C,OAAO,IAAMK,UAAU,GAAGD,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["DarkTheme5_0","DarkTheme5_1","DarkTheme5_2","DarkTheme5_3","DarkTheme5_4","DARK_THEME_5_0","DARK_THEME_5_1","DARK_THEME_5_2","DARK_THEME_5_3","DARK_THEME_5_4","DARK_THEME"],"sources":["DarkTheme.ts"],"sourcesContent":["import { DarkTheme5_0 } from '../../../internal/themes/DarkTheme5_0';\nimport { DarkTheme5_1 } from '../../../internal/themes/DarkTheme5_1';\nimport { DarkTheme5_2 } from '../../../internal/themes/DarkTheme5_2';\nimport { DarkTheme5_3 } from '../../../internal/themes/DarkTheme5_3';\nimport { DarkTheme5_4 } from '../../../internal/themes/DarkTheme5_4';\n\nexport const DARK_THEME_5_0 = DarkTheme5_0;\nexport const DARK_THEME_5_1 = DarkTheme5_1;\nexport const DARK_THEME_5_2 = DarkTheme5_2;\nexport const DARK_THEME_5_3 = DarkTheme5_3;\nexport const DARK_THEME_5_4 = DarkTheme5_4;\n\nexport const DARK_THEME = DARK_THEME_5_4;\n"],"mappings":"AAAA,SAASA,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;AACpE,SAASC,YAAY,QAAQ,uCAAuC;;AAEpE,OAAO,IAAMC,cAAc,GAAGL,YAAY;AAC1C,OAAO,IAAMM,cAAc,GAAGL,YAAY;AAC1C,OAAO,IAAMM,cAAc,GAAGL,YAAY;AAC1C,OAAO,IAAMM,cAAc,GAAGL,YAAY;AAC1C,OAAO,IAAMM,cAAc,GAAGL,YAAY;;AAE1C,OAAO,IAAMM,UAAU,GAAGD,cAAc","ignoreList":[]}
@@ -2,4 +2,5 @@ export declare const DARK_THEME_5_0: Readonly<typeof import("../../../internal/t
2
2
  export declare const DARK_THEME_5_1: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
3
3
  export declare const DARK_THEME_5_2: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
4
4
  export declare const DARK_THEME_5_3: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
5
+ export declare const DARK_THEME_5_4: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
5
6
  export declare const DARK_THEME: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
@@ -2,8 +2,10 @@ import { LightTheme5_0 } from "../../../../internal/themes/LightTheme5_0";
2
2
  import { LightTheme5_1 } from "../../../../internal/themes/LightTheme5_1";
3
3
  import { LightTheme5_2 } from "../../../../internal/themes/LightTheme5_2";
4
4
  import { LightTheme5_3 } from "../../../../internal/themes/LightTheme5_3";
5
+ import { LightTheme5_4 } from "../../../../internal/themes/LightTheme5_4";
5
6
  export var LIGHT_THEME_5_0 = LightTheme5_0;
6
7
  export var LIGHT_THEME_5_1 = LightTheme5_1;
7
8
  export var LIGHT_THEME_5_2 = LightTheme5_2;
8
9
  export var LIGHT_THEME_5_3 = LightTheme5_3;
9
- export var LIGHT_THEME = LIGHT_THEME_5_3;
10
+ export var LIGHT_THEME_5_4 = LightTheme5_4;
11
+ export var LIGHT_THEME = LIGHT_THEME_5_4;
@@ -1 +1 @@
1
- {"version":3,"names":["LightTheme5_0","LightTheme5_1","LightTheme5_2","LightTheme5_3","LIGHT_THEME_5_0","LIGHT_THEME_5_1","LIGHT_THEME_5_2","LIGHT_THEME_5_3","LIGHT_THEME"],"sources":["LightTheme.ts"],"sourcesContent":["import { LightTheme5_0 } from '../../../internal/themes/LightTheme5_0';\nimport { LightTheme5_1 } from '../../../internal/themes/LightTheme5_1';\nimport { LightTheme5_2 } from '../../../internal/themes/LightTheme5_2';\nimport { LightTheme5_3 } from '../../../internal/themes/LightTheme5_3';\n\nexport const LIGHT_THEME_5_0 = LightTheme5_0;\nexport const LIGHT_THEME_5_1 = LightTheme5_1;\nexport const LIGHT_THEME_5_2 = LightTheme5_2;\nexport const LIGHT_THEME_5_3 = LightTheme5_3;\n\nexport const LIGHT_THEME = LIGHT_THEME_5_3;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;;AAEtE,OAAO,IAAMC,eAAe,GAAGJ,aAAa;AAC5C,OAAO,IAAMK,eAAe,GAAGJ,aAAa;AAC5C,OAAO,IAAMK,eAAe,GAAGJ,aAAa;AAC5C,OAAO,IAAMK,eAAe,GAAGJ,aAAa;;AAE5C,OAAO,IAAMK,WAAW,GAAGD,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["LightTheme5_0","LightTheme5_1","LightTheme5_2","LightTheme5_3","LightTheme5_4","LIGHT_THEME_5_0","LIGHT_THEME_5_1","LIGHT_THEME_5_2","LIGHT_THEME_5_3","LIGHT_THEME_5_4","LIGHT_THEME"],"sources":["LightTheme.ts"],"sourcesContent":["import { LightTheme5_0 } from '../../../internal/themes/LightTheme5_0';\nimport { LightTheme5_1 } from '../../../internal/themes/LightTheme5_1';\nimport { LightTheme5_2 } from '../../../internal/themes/LightTheme5_2';\nimport { LightTheme5_3 } from '../../../internal/themes/LightTheme5_3';\nimport { LightTheme5_4 } from '../../../internal/themes/LightTheme5_4';\n\nexport const LIGHT_THEME_5_0 = LightTheme5_0;\nexport const LIGHT_THEME_5_1 = LightTheme5_1;\nexport const LIGHT_THEME_5_2 = LightTheme5_2;\nexport const LIGHT_THEME_5_3 = LightTheme5_3;\nexport const LIGHT_THEME_5_4 = LightTheme5_4;\n\nexport const LIGHT_THEME = LIGHT_THEME_5_4;\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;AACtE,SAASC,aAAa,QAAQ,wCAAwC;;AAEtE,OAAO,IAAMC,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;AAC5C,OAAO,IAAMM,eAAe,GAAGL,aAAa;;AAE5C,OAAO,IAAMM,WAAW,GAAGD,eAAe","ignoreList":[]}
@@ -2,4 +2,5 @@ export declare const LIGHT_THEME_5_0: Readonly<typeof import("../../../internal/
2
2
  export declare const LIGHT_THEME_5_1: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
3
3
  export declare const LIGHT_THEME_5_2: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
4
4
  export declare const LIGHT_THEME_5_3: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
5
+ export declare const LIGHT_THEME_5_4: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
5
6
  export declare const LIGHT_THEME: Readonly<typeof import("../../../internal/themes/BasicTheme").BasicThemeClass>;
@@ -1,5 +1,5 @@
1
1
  import warning from 'warning';
2
2
  export function catchUnreachableWarning(guard, returnValue) {
3
- warning(true, "Unsupported kind: " + JSON.stringify(guard));
3
+ warning(false, "Unsupported kind: " + JSON.stringify(guard));
4
4
  return returnValue;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"names":["warning","catchUnreachableWarning","guard","returnValue","JSON","stringify"],"sources":["typeGuards.ts"],"sourcesContent":["import warning from 'warning';\n\nexport function catchUnreachableWarning<T>(guard: never, returnValue: T): T {\n warning(true, `Unsupported kind: ${JSON.stringify(guard)}`);\n return returnValue;\n}\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,SAAS;;AAE7B,OAAO,SAASC,uBAAuBA,CAAIC,KAAY,EAAEC,WAAc,EAAK;EAC1EH,OAAO,CAAC,IAAI,yBAAuBI,IAAI,CAACC,SAAS,CAACH,KAAK,CAAG,CAAC;EAC3D,OAAOC,WAAW;AACpB","ignoreList":[]}
1
+ {"version":3,"names":["warning","catchUnreachableWarning","guard","returnValue","JSON","stringify"],"sources":["typeGuards.ts"],"sourcesContent":["import warning from 'warning';\n\nexport function catchUnreachableWarning<T>(guard: never, returnValue: T): T {\n warning(false, `Unsupported kind: ${JSON.stringify(guard)}`);\n return returnValue;\n}\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,SAAS;;AAE7B,OAAO,SAASC,uBAAuBA,CAAIC,KAAY,EAAEC,WAAc,EAAK;EAC1EH,OAAO,CAAC,KAAK,yBAAuBI,IAAI,CAACC,SAAS,CAACH,KAAK,CAAG,CAAC;EAC5D,OAAOC,WAAW;AACpB","ignoreList":[]}
package/lib/utils.d.ts CHANGED
@@ -78,7 +78,7 @@ export declare const extractDataProps: <T extends Record<string, any>>(props: T)
78
78
  * @returns `true` if `inputString` starts with one of keys, else `false`.
79
79
  */
80
80
  export declare const startsWithOneOf: (searchKeys: string[], inputString: string) => boolean;
81
- export declare const isButton: (child: React.ReactNode) => child is React.ReactElement<ButtonProps<"button">, string | React.JSXElementConstructor<any>>;
81
+ export declare const isButton: (child: React.ReactNode) => child is React.ReactElement<ButtonProps, string | React.JSXElementConstructor<any>>;
82
82
  export declare const isInput: (child: React.ReactNode) => child is React.ReactElement<InputProps, string | React.JSXElementConstructor<any>>;
83
83
  export declare const isFxInput: (child: React.ReactNode) => child is React.ReactElement<FxInputProps, string | React.JSXElementConstructor<any>>;
84
84
  export declare const isAutocomplete: (child: React.ReactNode) => child is React.ReactElement<AutocompleteProps, string | React.JSXElementConstructor<any>>;
@@ -1,12 +1,14 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
3
3
  import React from 'react';
4
+ import warning from 'warning';
4
5
  import { getDisplayName } from "../getDisplayName";
5
6
  var removePostfix = function removePostfix(word, postfixRegex) {
6
7
  var regexContent = postfixRegex.source.replace(/\$$/, '');
7
8
  var isCorrectPostfix = postfixRegex.test(word);
8
9
  if (!isCorrectPostfix) {
9
- throw new Error("Component's displayName property must end with '" + regexContent + "' in order to be wrapped in withClassWrapper HOC");
10
+ warning(false, "Component's displayName property must end with '" + regexContent + "' in order to be wrapped in withClassWrapper HOC");
11
+ return word;
10
12
  }
11
13
  return word.replace(postfixRegex, '');
12
14
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","getDisplayName","removePostfix","word","postfixRegex","regexContent","source","replace","isCorrectPostfix","test","Error","withClassWrapper","RFC","_ClassWrapper","fullName","nameWithoutPostfix","_React$Component","ClassWrapper","_this","_len","arguments","length","args","Array","_key","call","apply","concat","instancePropertiesRef","createRef","_inheritsLoose","_proto","prototype","componentDidMount","current","Object","defineProperties","getOwnPropertyDescriptors","render","createElement","FC","_extends","instanceRef","props","Component","__KONTUR_REACT_UI__","displayName"],"sources":["withClassWrapper.tsx"],"sourcesContent":["import React from 'react';\n\nimport type { ReactUIComponentWithRef } from './forwardRefAndName';\nimport { getDisplayName } from './getDisplayName';\n\nconst removePostfix = (word: string, postfixRegex: RegExp) => {\n const regexContent = postfixRegex.source.replace(/\\$$/, '');\n\n const isCorrectPostfix = postfixRegex.test(word);\n if (!isCorrectPostfix) {\n throw new Error(\n `Component's displayName property must end with '${regexContent}' in order to be wrapped in withClassWrapper HOC`,\n );\n }\n\n return word.replace(postfixRegex, '');\n};\n\n/**\n * HOC for moving from Class to Functional components.\n *\n * Used to remove distinctions between Class and Functional refs.\n *\n * @param RFC Functional component wrapped in forwardRefAndName.\n * @returns Class component that wraps Functional component.\n */\nexport function withClassWrapper<T, P>(RFC: ReactUIComponentWithRef<T, P>) {\n const fullName = getDisplayName(RFC);\n const nameWithoutPostfix = removePostfix(fullName, /FC$/);\n\n return class ClassWrapper extends React.Component<P> {\n public instancePropertiesRef = React.createRef<T>();\n\n componentDidMount() {\n if (this.instancePropertiesRef.current) {\n Object.defineProperties(this, Object.getOwnPropertyDescriptors(this.instancePropertiesRef.current));\n }\n }\n\n public static __KONTUR_REACT_UI__ = nameWithoutPostfix;\n public static displayName = nameWithoutPostfix;\n\n public static FC = RFC;\n\n render() {\n return (\n // @ts-expect-error: TypeScript is not able to understand that both types (class one and functional one) have ref.\n <ClassWrapper.FC\n // Returns methods defined in useImperativeHandle.\n instanceRef={this.instancePropertiesRef}\n {...this.props}\n />\n );\n }\n };\n}\n\nexport interface InstanceRefType<T> {\n instanceRef: React.MutableRefObject<T>;\n}\n"],"mappings":"gIAAA,OAAOA,KAAK,MAAM,OAAO;;;AAGzB,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,IAAY,EAAEC,YAAoB,EAAK;EAC5D,IAAMC,YAAY,GAAGD,YAAY,CAACE,MAAM,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;EAE3D,IAAMC,gBAAgB,GAAGJ,YAAY,CAACK,IAAI,CAACN,IAAI,CAAC;EAChD,IAAI,CAACK,gBAAgB,EAAE;IACrB,MAAM,IAAIE,KAAK;IACsCL,YAAY;IACjE,CAAC;EACH;;EAEA,OAAOF,IAAI,CAACI,OAAO,CAACH,YAAY,EAAE,EAAE,CAAC;AACvC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASO,gBAAgBA,CAAOC,GAAkC,EAAE,KAAAC,aAAA;EACzE,IAAMC,QAAQ,GAAGb,cAAc,CAACW,GAAG,CAAC;EACpC,IAAMG,kBAAkB,GAAGb,aAAa,CAACY,QAAQ,EAAE,KAAK,CAAC;;EAEzD,OAAAD,aAAA,0BAAAG,gBAAA,YAAAC,aAAA,OAAAC,KAAA,UAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,KAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA,GAAAN,KAAA,GAAAF,gBAAA,CAAAS,IAAA,CAAAC,KAAA,CAAAV,gBAAA,SAAAW,MAAA,CAAAL,IAAA,WAAAJ,KAAA;MACSU,qBAAqB,gBAAG5B,KAAK,CAAC6B,SAAS,CAAI,CAAC,QAAAX,KAAA,EAAAY,cAAA,CAAAb,YAAA,EAAAD,gBAAA,MAAAe,MAAA,GAAAd,YAAA,CAAAe,SAAA,CAAAD,MAAA;;IAEnDE,iBAAiB,GAAjB,SAAAA,kBAAA,EAAoB;MAClB,IAAI,IAAI,CAACL,qBAAqB,CAACM,OAAO,EAAE;QACtCC,MAAM,CAACC,gBAAgB,CAAC,IAAI,EAAED,MAAM,CAACE,yBAAyB,CAAC,IAAI,CAACT,qBAAqB,CAACM,OAAO,CAAC,CAAC;MACrG;IACF,CAAC,CAAAH,MAAA;;;;;;;IAODO,MAAM,GAAN,SAAAA,OAAA,EAAS;MACP;QACE;QACAtC,KAAA,CAAAuC,aAAA,CAACtB,YAAY,CAACuB,EAAE,EAAAC,QAAA;UACd;UACAC,WAAW,EAAE,IAAI,CAACd,qBAAsB;QACpC,IAAI,CAACe,KAAK;QACf,CAAC;;IAEN,CAAC,QAAA1B,YAAA,GAvB+BjB,KAAK,CAAC4C,SAAS,GAAA/B,aAAA,CASjCgC,mBAAmB,GAAG9B,kBAAkB,EAAAF,aAAA,CACxCiC,WAAW,GAAG/B,kBAAkB,EAAAF,aAAA,CAEhC2B,EAAE,GAAG5B,GAAG,EAAAC,aAAA;;AAa1B","ignoreList":[]}
1
+ {"version":3,"names":["React","warning","getDisplayName","removePostfix","word","postfixRegex","regexContent","source","replace","isCorrectPostfix","test","withClassWrapper","RFC","_ClassWrapper","fullName","nameWithoutPostfix","_React$Component","ClassWrapper","_this","_len","arguments","length","args","Array","_key","call","apply","concat","instancePropertiesRef","createRef","_inheritsLoose","_proto","prototype","componentDidMount","current","Object","defineProperties","getOwnPropertyDescriptors","render","createElement","FC","_extends","instanceRef","props","Component","__KONTUR_REACT_UI__","displayName"],"sources":["withClassWrapper.tsx"],"sourcesContent":["import React from 'react';\nimport warning from 'warning';\n\nimport type { ReactUIComponentWithRef } from './forwardRefAndName';\nimport { getDisplayName } from './getDisplayName';\n\nconst removePostfix = (word: string, postfixRegex: RegExp) => {\n const regexContent = postfixRegex.source.replace(/\\$$/, '');\n\n const isCorrectPostfix = postfixRegex.test(word);\n if (!isCorrectPostfix) {\n warning(\n false,\n `Component's displayName property must end with '${regexContent}' in order to be wrapped in withClassWrapper HOC`,\n );\n return word;\n }\n\n return word.replace(postfixRegex, '');\n};\n\n/**\n * HOC for moving from Class to Functional components.\n *\n * Used to remove distinctions between Class and Functional refs.\n *\n * @param RFC Functional component wrapped in forwardRefAndName.\n * @returns Class component that wraps Functional component.\n */\nexport function withClassWrapper<T, P>(RFC: ReactUIComponentWithRef<T, P>) {\n const fullName = getDisplayName(RFC);\n const nameWithoutPostfix = removePostfix(fullName, /FC$/);\n\n return class ClassWrapper extends React.Component<P> {\n public instancePropertiesRef = React.createRef<T>();\n\n componentDidMount() {\n if (this.instancePropertiesRef.current) {\n Object.defineProperties(this, Object.getOwnPropertyDescriptors(this.instancePropertiesRef.current));\n }\n }\n\n public static __KONTUR_REACT_UI__ = nameWithoutPostfix;\n public static displayName = nameWithoutPostfix;\n\n public static FC = RFC;\n\n render() {\n return (\n // @ts-expect-error: TypeScript is not able to understand that both types (class one and functional one) have ref.\n <ClassWrapper.FC\n // Returns methods defined in useImperativeHandle.\n instanceRef={this.instancePropertiesRef}\n {...this.props}\n />\n );\n }\n };\n}\n\nexport interface InstanceRefType<T> {\n instanceRef: React.MutableRefObject<T>;\n}\n"],"mappings":"gIAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,SAAS;;;AAG7B,SAASC,cAAc,QAAQ,kBAAkB;;AAEjD,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,IAAY,EAAEC,YAAoB,EAAK;EAC5D,IAAMC,YAAY,GAAGD,YAAY,CAACE,MAAM,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;;EAE3D,IAAMC,gBAAgB,GAAGJ,YAAY,CAACK,IAAI,CAACN,IAAI,CAAC;EAChD,IAAI,CAACK,gBAAgB,EAAE;IACrBR,OAAO;MACL,KAAK;MAC8CK,YAAY;IACjE,CAAC;IACD,OAAOF,IAAI;EACb;;EAEA,OAAOA,IAAI,CAACI,OAAO,CAACH,YAAY,EAAE,EAAE,CAAC;AACvC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASM,gBAAgBA,CAAOC,GAAkC,EAAE,KAAAC,aAAA;EACzE,IAAMC,QAAQ,GAAGZ,cAAc,CAACU,GAAG,CAAC;EACpC,IAAMG,kBAAkB,GAAGZ,aAAa,CAACW,QAAQ,EAAE,KAAK,CAAC;;EAEzD,OAAAD,aAAA,0BAAAG,gBAAA,YAAAC,aAAA,OAAAC,KAAA,UAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA,KAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA,GAAAN,KAAA,GAAAF,gBAAA,CAAAS,IAAA,CAAAC,KAAA,CAAAV,gBAAA,SAAAW,MAAA,CAAAL,IAAA,WAAAJ,KAAA;MACSU,qBAAqB,gBAAG5B,KAAK,CAAC6B,SAAS,CAAI,CAAC,QAAAX,KAAA,EAAAY,cAAA,CAAAb,YAAA,EAAAD,gBAAA,MAAAe,MAAA,GAAAd,YAAA,CAAAe,SAAA,CAAAD,MAAA;;IAEnDE,iBAAiB,GAAjB,SAAAA,kBAAA,EAAoB;MAClB,IAAI,IAAI,CAACL,qBAAqB,CAACM,OAAO,EAAE;QACtCC,MAAM,CAACC,gBAAgB,CAAC,IAAI,EAAED,MAAM,CAACE,yBAAyB,CAAC,IAAI,CAACT,qBAAqB,CAACM,OAAO,CAAC,CAAC;MACrG;IACF,CAAC,CAAAH,MAAA;;;;;;;IAODO,MAAM,GAAN,SAAAA,OAAA,EAAS;MACP;QACE;QACAtC,KAAA,CAAAuC,aAAA,CAACtB,YAAY,CAACuB,EAAE,EAAAC,QAAA;UACd;UACAC,WAAW,EAAE,IAAI,CAACd,qBAAsB;QACpC,IAAI,CAACe,KAAK;QACf,CAAC;;IAEN,CAAC,QAAA1B,YAAA,GAvB+BjB,KAAK,CAAC4C,SAAS,GAAA/B,aAAA,CASjCgC,mBAAmB,GAAG9B,kBAAkB,EAAAF,aAAA,CACxCiC,WAAW,GAAG/B,kBAAkB,EAAAF,aAAA,CAEhC2B,EAAE,GAAG5B,GAAG,EAAAC,aAAA;;AAa1B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skbkontur/react-ui",
3
- "version": "0.0.0-c13bb5f4ca",
3
+ "version": "0.0.0-c37930b3b1",
4
4
  "description": "UI Components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "index.js",
@@ -22,16 +22,12 @@
22
22
  "clean": "git clean -fdxqe node_modules",
23
23
  "prerelease": "node scripts/publish/prepublish && yarn build",
24
24
  "release": "npm publish ./build --workspaces=false",
25
- "build-old-docs": "rimraf .styleguide/deploy && yarn run styleguide:build",
26
- "deploy-old-docs": "gh-pages -a -d .styleguide/deploy -r git@github.com:skbkontur/react-ui.git",
27
25
  "storybook": "storybook dev -p 6060",
28
26
  "storybook:build": "cross-env STORYBOOK_REACT_UI_TEST=true storybook build -o .storybook/build --quiet",
29
27
  "storybook:docs-build": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook build --docs -c .storybook-docs -o .storybook/build --quiet",
30
28
  "storybook:test": "cross-env STORYBOOK_REACT_UI_TEST=true storybook dev --ci -p 6060",
31
29
  "storybook:docs": "cross-env STORYBOOK_REACT_UI_DOCS=true storybook dev --docs -p 6061 -c .storybook-docs",
32
30
  "storybook:serve": "yarn serve -l 6060 .storybook/build",
33
- "styleguide": "styleguidist server --config .styleguide/config/dev.config.js",
34
- "styleguide:build": "node .styleguide/build",
35
31
  "lint": "run-p -c lint:*",
36
32
  "lint:eslint": "cross-env TIMING=1 yarn eslint ./",
37
33
  "lint:tsc": "tsc --noEmit --diagnostics",
@@ -52,14 +48,14 @@
52
48
  "@babel/runtime": "^7.24.6",
53
49
  "@emotion/css": "^11.11.2",
54
50
  "@skbkontur/global-object": "^0.4.4",
55
- "@skbkontur/react-imask": "^7.6.4",
51
+ "@skbkontur/react-imask": "^7.6.5",
56
52
  "eventemitter3": "^5.0.1",
57
53
  "invariant": "^2.2.4",
58
54
  "lodash.debounce": "^4.0.8",
59
55
  "lodash.isequal": "^4.5.0",
60
56
  "lodash.throttle": "^4.1.1",
61
57
  "normalize-wheel": "^1.0.1",
62
- "react-focus-lock": "2.11.2",
58
+ "react-focus-lock": "^2.11.2",
63
59
  "react-input-mask": "2.0.4",
64
60
  "react-is": "^18.3.1",
65
61
  "react-transition-group": "^4.4.5",
@@ -85,7 +81,6 @@
85
81
  "@storybook/addon-controls": "7.6.18",
86
82
  "@storybook/addon-docs": "7.6.18",
87
83
  "@storybook/addon-essentials": "7.6.18",
88
- "@storybook/addon-ie11": "0.0.6",
89
84
  "@storybook/addon-interactions": "^7.6.18",
90
85
  "@storybook/addon-links": "7.6.18",
91
86
  "@storybook/blocks": "^7.6.18",
@@ -140,7 +135,6 @@
140
135
  "react": "18.3.1",
141
136
  "react-docgen-typescript": "^2.2.2",
142
137
  "react-dom": "^18.3.1",
143
- "react-styleguidist": "^12.0.1",
144
138
  "rimraf": "^5.0.7",
145
139
  "selenium-webdriver": "^4.27.0",
146
140
  "semver": "^7.6.2",
@@ -151,7 +145,7 @@
151
145
  "style-loader": "^4.0.0",
152
146
  "stylelint": "^16.6.0",
153
147
  "stylelint-config-standard": "^36.0.0",
154
- "typescript": "4.9.4",
148
+ "typescript": "5.4.2",
155
149
  "upath": "^2.0.1",
156
150
  "url-loader": "^4.1.1",
157
151
  "wait-on": "^7.2.0",
@@ -1,113 +0,0 @@
1
- ### Базовый пример
2
- ```jsx harmony
3
- import { Autocomplete } from '@skbkontur/react-ui';
4
-
5
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
6
-
7
- const [value, setValue] = React.useState('Kappa');
8
-
9
- <Autocomplete source={items} value={value} onValueChange={setValue} />;
10
- ```
11
-
12
- ### Очистка Autocomplete
13
- Очистить значение в `Autocomplete` можно только с помощью пустой строки.
14
- ```jsx harmony
15
- import { Autocomplete, Button, Group } from '@skbkontur/react-ui';
16
-
17
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
18
-
19
- const [value, setValue] = React.useState('Kappa');
20
-
21
- <Group>
22
- <Autocomplete source={items} value={value} onValueChange={setValue} />
23
- <Button onClick={() => setValue('')}>Очистить</Button>
24
- </Group>
25
- ```
26
-
27
- ### Размер
28
- ```jsx harmony
29
- import { Autocomplete, Gapped } from '@skbkontur/react-ui';
30
-
31
- const items = ['Маленький', 'Средний', 'Большой'];
32
-
33
- const [valueSmall, setValueSmall] = React.useState('Маленький');
34
- const [valueMedium, setValueMedium] = React.useState('Средний');
35
- const [valueLarge, setValueLarge] = React.useState('Большой');
36
-
37
- <Gapped vertical>
38
- <Autocomplete source={items} value={valueSmall} onValueChange={setValueSmall} size={'small'} />
39
- <Autocomplete source={items} value={valueMedium} onValueChange={setValueMedium} size={'medium'} />
40
- <Autocomplete source={items} value={valueLarge} onValueChange={setValueLarge} size={'large'} />
41
- </Gapped>
42
- ```
43
-
44
- ### Выделение введеного значения при фокусе
45
- ```jsx harmony
46
- import { Autocomplete } from '@skbkontur/react-ui';
47
-
48
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
49
-
50
- const [value, setValue] = React.useState('');
51
-
52
- <Autocomplete source={items} value={value} onValueChange={setValue} selectAllOnFocus />
53
- ```
54
-
55
- ### Иконка
56
- ```jsx harmony
57
- import { Autocomplete, Gapped } from '@skbkontur/react-ui';
58
- import { SearchLoupeIcon16Regular } from '@skbkontur/icons/SearchLoupeIcon16Regular';
59
-
60
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
61
-
62
- const [valueLeft, setValueLeft] = React.useState('');
63
- const [valueRight, setValueRight] = React.useState('');
64
-
65
- <Gapped>
66
- <Autocomplete source={items} value={valueLeft} onValueChange={setValueLeft} leftIcon={<SearchLoupeIcon16Regular />} />
67
- <Autocomplete source={items} value={valueRight} onValueChange={setValueRight} rightIcon={<SearchLoupeIcon16Regular />} />
68
- </Gapped>
69
- ```
70
-
71
- ### Ширина меню
72
- ```jsx harmony
73
- import { Autocomplete } from '@skbkontur/react-ui';
74
-
75
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
76
-
77
- const [value, setValue] = React.useState('');
78
-
79
- <Autocomplete source={items} value={value} onValueChange={setValue} menuWidth={'80%'} />
80
- ```
81
-
82
- ### Расположение выпадающего окна Autocomplete
83
- ```jsx harmony
84
- import { Autocomplete } from '@skbkontur/react-ui';
85
-
86
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
87
-
88
- const [value, setValue] = React.useState('');
89
-
90
- <Autocomplete source={items} value={value} onValueChange={setValue} menuPos={'top'} />
91
- ```
92
-
93
- ### Тень у выпадающего меню
94
- ```jsx harmony
95
- import { Autocomplete } from '@skbkontur/react-ui';
96
-
97
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
98
-
99
- const [value, setValue] = React.useState('');
100
-
101
- <Autocomplete source={items} value={value} onValueChange={setValue} hasShadow />
102
- ```
103
-
104
- ### Режима прозрачной рамки
105
- ```jsx harmony
106
- import { Autocomplete } from '@skbkontur/react-ui';
107
-
108
- const items = ['Grey Face', 'Grey Space', 'Kappa', 'Keepo', 'Resident Sleeper'];
109
-
110
- const [value, setValue] = React.useState('Kappa');
111
-
112
- <Autocomplete source={items} value={value} onValueChange={setValue} borderless />
113
- ```