@skbkontur/react-ui 5.3.6 → 5.4.0-combobox-multiline-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/CHANGELOG.md +0 -63
  2. package/cjs/components/Autocomplete/Autocomplete.md +113 -0
  3. package/cjs/components/Button/Button.md +261 -0
  4. package/cjs/components/Calendar/Calendar.md +276 -0
  5. package/cjs/components/Calendar/CalendarDay.md +70 -0
  6. package/cjs/components/Center/Center.md +26 -0
  7. package/cjs/components/Checkbox/Checkbox.md +171 -0
  8. package/cjs/components/ComboBox/ComboBox.d.ts +11 -5
  9. package/cjs/components/ComboBox/ComboBox.js +10 -1
  10. package/cjs/components/ComboBox/ComboBox.js.map +1 -1
  11. package/cjs/components/ComboBox/ComboBox.md +574 -0
  12. package/cjs/components/CurrencyInput/CurrencyInput.md +39 -0
  13. package/cjs/components/CurrencyLabel/CurrencyLabel.md +29 -0
  14. package/cjs/components/DateInput/DateInput.md +111 -0
  15. package/cjs/components/DatePicker/DatePicker.md +368 -0
  16. package/cjs/components/Dropdown/Dropdown.md +45 -0
  17. package/cjs/components/DropdownMenu/DropdownMenu.md +290 -0
  18. package/cjs/components/FileUploader/FileUploader.js +0 -1
  19. package/cjs/components/FileUploader/FileUploader.js.map +1 -1
  20. package/cjs/components/FileUploader/FileUploader.md +131 -0
  21. package/cjs/components/FxInput/FxInput.md +31 -0
  22. package/cjs/components/Gapped/Gapped.md +44 -0
  23. package/cjs/components/GlobalLoader/GlobalLoader.md +97 -0
  24. package/cjs/components/Group/Group.md +19 -0
  25. package/cjs/components/Hint/Hint.md +86 -0
  26. package/cjs/components/Input/Input.md +86 -0
  27. package/cjs/components/Input/InputLayout/InputLayout.d.ts +1 -0
  28. package/cjs/components/Input/InputLayout/InputLayout.js +4 -2
  29. package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
  30. package/cjs/components/Kebab/Kebab.md +306 -0
  31. package/cjs/components/Link/Link.md +182 -0
  32. package/cjs/components/Loader/Loader.md +33 -0
  33. package/cjs/components/MaskedInput/MaskedInput.d.ts +0 -8
  34. package/cjs/components/MaskedInput/MaskedInput.js +2 -23
  35. package/cjs/components/MaskedInput/MaskedInput.js.map +1 -1
  36. package/cjs/components/MaskedInput/MaskedInput.md +114 -0
  37. package/cjs/components/MenuFooter/MenuFooter.md +27 -0
  38. package/cjs/components/MenuHeader/MenuHeader.md +35 -0
  39. package/cjs/components/MenuItem/MenuItem.md +139 -0
  40. package/cjs/components/MenuSeparator/MenuSeparator.md +14 -0
  41. package/cjs/components/MiniModal/MiniModal.md +231 -0
  42. package/cjs/components/Modal/Modal.md +56 -0
  43. package/cjs/components/Paging/Paging.md +57 -0
  44. package/cjs/components/PasswordInput/PasswordInput.md +29 -0
  45. package/cjs/components/Radio/Radio.md +57 -0
  46. package/cjs/components/RadioGroup/RadioGroup.md +44 -0
  47. package/cjs/components/ResponsiveLayout/ResponsiveLayout.md +75 -0
  48. package/cjs/components/ScrollContainer/ScrollContainer.md +224 -0
  49. package/cjs/components/Select/Select.md +113 -0
  50. package/cjs/components/SidePage/SidePage.md +65 -0
  51. package/cjs/components/SingleToast/SingleToast.md +36 -0
  52. package/cjs/components/Spinner/Spinner.md +36 -0
  53. package/cjs/components/Sticky/Sticky.md +28 -0
  54. package/cjs/components/Switcher/Switcher.md +111 -0
  55. package/cjs/components/Tabs/Tab.md +73 -0
  56. package/cjs/components/Tabs/Tabs.md +54 -0
  57. package/cjs/components/Textarea/Textarea.d.ts +6 -1
  58. package/cjs/components/Textarea/Textarea.js +16 -3
  59. package/cjs/components/Textarea/Textarea.js.map +1 -1
  60. package/cjs/components/Textarea/Textarea.md +58 -0
  61. package/cjs/components/Textarea/Textarea.styles.js +2 -1
  62. package/cjs/components/Textarea/Textarea.styles.js.map +1 -1
  63. package/cjs/components/Toast/Toast.md +69 -0
  64. package/cjs/components/Toggle/Toggle.md +110 -0
  65. package/cjs/components/Token/Token.md +48 -0
  66. package/cjs/components/TokenInput/TokenInput.md +277 -0
  67. package/cjs/components/Tooltip/Tooltip.d.ts +1 -1
  68. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  69. package/cjs/components/Tooltip/Tooltip.md +322 -0
  70. package/cjs/components/TooltipMenu/TooltipMenu.md +241 -0
  71. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
  72. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js +16 -7
  73. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
  74. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
  75. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js +27 -9
  76. package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
  77. package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +7 -6
  78. package/cjs/internal/CustomComboBox/ComboBoxView.js +2 -7
  79. package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
  80. package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +6 -5
  81. package/cjs/internal/CustomComboBox/CustomComboBox.js +1 -3
  82. package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
  83. package/cjs/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
  84. package/cjs/internal/CustomComboBox/getComboBoxTheme.js +10 -7
  85. package/cjs/internal/CustomComboBox/getComboBoxTheme.js.map +1 -1
  86. package/cjs/internal/DataTids/DATATIDS.md +12 -0
  87. package/cjs/internal/DataTids/DataTids.d.ts +12 -0
  88. package/cjs/internal/DataTids/DataTids.js +50 -0
  89. package/cjs/internal/DataTids/DataTids.js.map +1 -0
  90. package/cjs/internal/DataTids/DataTids.styles.d.ts +7 -0
  91. package/cjs/internal/DataTids/DataTids.styles.js +42 -0
  92. package/cjs/internal/DataTids/DataTids.styles.js.map +1 -0
  93. package/cjs/internal/DataTids/componentsDataTids.d.ts +5 -0
  94. package/cjs/internal/DataTids/componentsDataTids.js +15 -0
  95. package/cjs/internal/DataTids/componentsDataTids.js.map +1 -0
  96. package/cjs/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
  97. package/cjs/internal/InputLikeText/InputLikeText.styles.js +12 -4
  98. package/cjs/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
  99. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
  100. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +235 -0
  101. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
  102. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
  103. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +10 -0
  104. package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -0
  105. package/cjs/internal/ThemePlayground/Playground.md +7 -0
  106. package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  107. package/cjs/internal/themes/BasicTheme.d.ts +2 -0
  108. package/cjs/internal/themes/BasicTheme.js +11 -6
  109. package/cjs/internal/themes/BasicTheme.js.map +1 -1
  110. package/cjs/internal/themes/DarkTheme5_4.d.ts +1 -0
  111. package/cjs/internal/themes/DarkTheme5_4.js +17 -0
  112. package/cjs/internal/themes/DarkTheme5_4.js.map +1 -0
  113. package/cjs/internal/themes/LightTheme5_4.d.ts +1 -0
  114. package/cjs/internal/themes/LightTheme5_4.js +17 -0
  115. package/cjs/internal/themes/LightTheme5_4.js.map +1 -0
  116. package/cjs/internal/themes/consts.d.ts +7 -0
  117. package/cjs/internal/themes/consts.js +7 -0
  118. package/cjs/internal/themes/consts.js.map +1 -0
  119. package/cjs/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +64 -0
  120. package/cjs/lib/locale/LOCALECONTEXT.md +222 -0
  121. package/cjs/lib/theming/ThemeContext.md +265 -0
  122. package/cjs/lib/theming/ThemeVersions.d.ts +1 -1
  123. package/cjs/lib/theming/ThemeVersions.js.map +1 -1
  124. package/cjs/lib/theming/themes/DarkTheme.d.ts +1 -0
  125. package/cjs/lib/theming/themes/DarkTheme.js +4 -2
  126. package/cjs/lib/theming/themes/DarkTheme.js.map +1 -1
  127. package/cjs/lib/theming/themes/LightTheme.d.ts +1 -0
  128. package/cjs/lib/theming/themes/LightTheme.js +4 -2
  129. package/cjs/lib/theming/themes/LightTheme.js.map +1 -1
  130. package/components/Autocomplete/Autocomplete.md +113 -0
  131. package/components/Button/Button.md +261 -0
  132. package/components/Calendar/Calendar.md +276 -0
  133. package/components/Calendar/CalendarDay.md +70 -0
  134. package/components/Center/Center.md +26 -0
  135. package/components/Checkbox/Checkbox.md +171 -0
  136. package/components/ComboBox/ComboBox/ComboBox.js +2 -1
  137. package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
  138. package/components/ComboBox/ComboBox.d.ts +11 -5
  139. package/components/ComboBox/ComboBox.md +574 -0
  140. package/components/CurrencyInput/CurrencyInput.md +39 -0
  141. package/components/CurrencyLabel/CurrencyLabel.md +29 -0
  142. package/components/DateInput/DateInput.md +111 -0
  143. package/components/DatePicker/DatePicker.md +368 -0
  144. package/components/Dropdown/Dropdown.md +45 -0
  145. package/components/DropdownMenu/DropdownMenu.md +290 -0
  146. package/components/FileUploader/FileUploader/FileUploader.js +0 -1
  147. package/components/FileUploader/FileUploader/FileUploader.js.map +1 -1
  148. package/components/FileUploader/FileUploader.md +131 -0
  149. package/components/FxInput/FxInput.md +31 -0
  150. package/components/Gapped/Gapped.md +44 -0
  151. package/components/GlobalLoader/GlobalLoader.md +97 -0
  152. package/components/Group/Group.md +19 -0
  153. package/components/Hint/Hint.md +86 -0
  154. package/components/Input/Input.md +86 -0
  155. package/components/Input/InputLayout/InputLayout/InputLayout.js +5 -2
  156. package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
  157. package/components/Input/InputLayout/InputLayout.d.ts +1 -0
  158. package/components/Kebab/Kebab.md +306 -0
  159. package/components/Link/Link.md +182 -0
  160. package/components/Loader/Loader.md +33 -0
  161. package/components/MaskedInput/MaskedInput/MaskedInput.js +1 -11
  162. package/components/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
  163. package/components/MaskedInput/MaskedInput.d.ts +0 -8
  164. package/components/MaskedInput/MaskedInput.md +114 -0
  165. package/components/MenuFooter/MenuFooter.md +27 -0
  166. package/components/MenuHeader/MenuHeader.md +35 -0
  167. package/components/MenuItem/MenuItem.md +139 -0
  168. package/components/MenuSeparator/MenuSeparator.md +14 -0
  169. package/components/MiniModal/MiniModal.md +231 -0
  170. package/components/Modal/Modal.md +56 -0
  171. package/components/Paging/Paging.md +57 -0
  172. package/components/PasswordInput/PasswordInput.md +29 -0
  173. package/components/Radio/Radio.md +57 -0
  174. package/components/RadioGroup/RadioGroup.md +44 -0
  175. package/components/ResponsiveLayout/ResponsiveLayout.md +75 -0
  176. package/components/ScrollContainer/ScrollContainer.md +224 -0
  177. package/components/Select/Select.md +113 -0
  178. package/components/SidePage/SidePage.md +65 -0
  179. package/components/SingleToast/SingleToast.md +36 -0
  180. package/components/Spinner/Spinner.md +36 -0
  181. package/components/Sticky/Sticky.md +28 -0
  182. package/components/Switcher/Switcher.md +111 -0
  183. package/components/Tabs/Tab.md +73 -0
  184. package/components/Tabs/Tabs.md +54 -0
  185. package/components/Textarea/Textarea/Textarea.js +11 -2
  186. package/components/Textarea/Textarea/Textarea.js.map +1 -1
  187. package/components/Textarea/Textarea.d.ts +6 -1
  188. package/components/Textarea/Textarea.md +58 -0
  189. package/components/Textarea/Textarea.styles/Textarea.styles.js +1 -1
  190. package/components/Textarea/Textarea.styles/Textarea.styles.js.map +1 -1
  191. package/components/Toast/Toast.md +69 -0
  192. package/components/Toggle/Toggle.md +110 -0
  193. package/components/Token/Token.md +48 -0
  194. package/components/TokenInput/TokenInput.md +277 -0
  195. package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
  196. package/components/Tooltip/Tooltip.d.ts +1 -1
  197. package/components/Tooltip/Tooltip.md +322 -0
  198. package/components/TooltipMenu/TooltipMenu.md +241 -0
  199. package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js +21 -7
  200. package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
  201. package/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
  202. package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js +14 -5
  203. package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js.map +1 -1
  204. package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
  205. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +44 -51
  206. package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
  207. package/internal/CustomComboBox/ComboBoxView.d.ts +7 -6
  208. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +3 -5
  209. package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
  210. package/internal/CustomComboBox/CustomComboBox.d.ts +6 -5
  211. package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js +5 -3
  212. package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js.map +1 -1
  213. package/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
  214. package/internal/DataTids/DATATIDS.md +12 -0
  215. package/internal/DataTids/DataTids/DataTids.js +69 -0
  216. package/internal/DataTids/DataTids/DataTids.js.map +1 -0
  217. package/internal/DataTids/DataTids/package.json +6 -0
  218. package/internal/DataTids/DataTids.d.ts +12 -0
  219. package/internal/DataTids/DataTids.styles/DataTids.styles.js +20 -0
  220. package/internal/DataTids/DataTids.styles/DataTids.styles.js.map +1 -0
  221. package/internal/DataTids/DataTids.styles/package.json +6 -0
  222. package/internal/DataTids/DataTids.styles.d.ts +7 -0
  223. package/internal/DataTids/componentsDataTids/componentsDataTids.js +12 -0
  224. package/internal/DataTids/componentsDataTids/componentsDataTids.js.map +1 -0
  225. package/internal/DataTids/componentsDataTids/package.json +6 -0
  226. package/internal/DataTids/componentsDataTids.d.ts +5 -0
  227. package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js +7 -4
  228. package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js.map +1 -1
  229. package/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
  230. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js +249 -0
  231. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
  232. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/package.json +6 -0
  233. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
  234. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js +8 -0
  235. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js.map +1 -0
  236. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/package.json +6 -0
  237. package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
  238. package/internal/ThemePlayground/Playground.md +7 -0
  239. package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
  240. package/internal/themes/BasicTheme/BasicTheme.js +4 -4
  241. package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
  242. package/internal/themes/BasicTheme.d.ts +2 -0
  243. package/internal/themes/DarkTheme5_4/DarkTheme5_4.js +17 -0
  244. package/internal/themes/DarkTheme5_4/DarkTheme5_4.js.map +1 -0
  245. package/internal/themes/DarkTheme5_4/package.json +6 -0
  246. package/internal/themes/DarkTheme5_4.d.ts +1 -0
  247. package/internal/themes/LightTheme5_4/LightTheme5_4.js +17 -0
  248. package/internal/themes/LightTheme5_4/LightTheme5_4.js.map +1 -0
  249. package/internal/themes/LightTheme5_4/package.json +6 -0
  250. package/internal/themes/LightTheme5_4.d.ts +1 -0
  251. package/internal/themes/consts/consts.js +7 -0
  252. package/internal/themes/consts/consts.js.map +1 -0
  253. package/internal/themes/consts/package.json +6 -0
  254. package/internal/themes/consts.d.ts +7 -0
  255. package/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +64 -0
  256. package/lib/locale/LOCALECONTEXT.md +222 -0
  257. package/lib/theming/ThemeContext.md +265 -0
  258. package/lib/theming/ThemeVersions/ThemeVersions.js.map +1 -1
  259. package/lib/theming/ThemeVersions.d.ts +1 -1
  260. package/lib/theming/themes/DarkTheme/DarkTheme.js +3 -1
  261. package/lib/theming/themes/DarkTheme/DarkTheme.js.map +1 -1
  262. package/lib/theming/themes/DarkTheme.d.ts +1 -0
  263. package/lib/theming/themes/LightTheme/LightTheme.js +3 -1
  264. package/lib/theming/themes/LightTheme/LightTheme.js.map +1 -1
  265. package/lib/theming/themes/LightTheme.d.ts +1 -0
  266. package/package.json +8 -3
package/CHANGELOG.md CHANGED
@@ -3,69 +3,6 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [5.3.6](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.5...@skbkontur/react-ui@5.3.6) (2025-09-24)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * **ComboBox,MaskedInput:** support mask and filter value on paste ([a6f6935](https://github.com/skbkontur/retail-ui/commit/a6f69355a1b962dbaf8a86158c6b833b2159eb48))
12
-
13
-
14
-
15
-
16
-
17
- ## [5.3.5](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.4...@skbkontur/react-ui@5.3.5) (2025-09-24)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * **FileUploader:** set files on drop ([ba181f3](https://github.com/skbkontur/retail-ui/commit/ba181f3e89354bea9e18e4ca20dd97c43c7e292e))
23
-
24
-
25
-
26
-
27
-
28
- ## [5.3.4](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.3...@skbkontur/react-ui@5.3.4) (2025-09-23)
29
-
30
-
31
- ### Bug Fixes
32
-
33
- * **react-ui:** use imask with fixed sourcemap ([a4ee23d](https://github.com/skbkontur/retail-ui/commit/a4ee23de971210302c2e3dfcf9f1e9b1c5eb2ad5))
34
-
35
-
36
-
37
-
38
-
39
- ## [5.3.3](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.2...@skbkontur/react-ui@5.3.3) (2025-09-22)
40
-
41
-
42
- ### Bug Fixes
43
-
44
- * **Tooltip:** fix incorrect import ([58206c9](https://github.com/skbkontur/retail-ui/commit/58206c91875e3180180be91800e302031b1b3266))
45
-
46
-
47
-
48
-
49
-
50
- ## [5.3.2](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.1...@skbkontur/react-ui@5.3.2) (2025-09-10)
51
-
52
- **Note:** Version bump only for package @skbkontur/react-ui
53
-
54
-
55
-
56
-
57
-
58
- ## [5.3.1](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.3.0...@skbkontur/react-ui@5.3.1) (2025-09-01)
59
-
60
-
61
- ### Bug Fixes
62
-
63
- * **select:** fix pass empty placeholder ([eb5b0ed](https://github.com/skbkontur/retail-ui/commit/eb5b0ed94c5133ab4a0a461ca656512583c292ff))
64
-
65
-
66
-
67
-
68
-
69
6
  # [5.3.0](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@5.2.1...@skbkontur/react-ui@5.3.0) (2025-08-25)
70
7
 
71
8
 
@@ -0,0 +1,113 @@
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
+ ```
@@ -0,0 +1,261 @@
1
+ ### Базовый пример
2
+ По умолчанию, кнопка принимает все пропы `HTMLButtonElement`.
3
+
4
+ ```jsx harmony
5
+ import { Button } from '@skbkontur/react-ui';
6
+
7
+ <Button onClick={alert} name="report">Создать отчёт</Button>;
8
+ ```
9
+
10
+ ### Корневой компонент
11
+ Кнопка может рендерить ссылку в качестве корневого элемента, c помощью пропа `component`. Кнопка принимает все пропы переданного в `component` компонента.
12
+
13
+ ```jsx harmony
14
+ import { Button } from '@skbkontur/react-ui';
15
+
16
+ <Button component='a' href='https://kontur.ru' target="_blank">Ссылка, но выглядит как кнопка</Button>
17
+ ```
18
+
19
+ ### Различные стили
20
+
21
+ ```jsx harmony
22
+ import { Gapped } from '@skbkontur/react-ui';
23
+
24
+ const bgStyle = {
25
+ backgroundImage: `linear-gradient(to right, rgba(130, 130, 130, 0.5) 1px, transparent 1px),
26
+ linear-gradient(to bottom, rgba(130, 130, 130, 0.5) 1px, transparent 1px)`,
27
+ backgroundSize: `16px 16px`,
28
+ backgroundPosition: `-8px -8px`,
29
+ padding: 16
30
+ };
31
+
32
+ <Gapped vertical>
33
+ <Gapped>
34
+ <Button use="default">Default</Button>
35
+ <Button use="primary">Primary</Button>
36
+ <Button use="success">Success</Button>
37
+ <Button use="danger">Danger</Button>
38
+ <Button use="pay">Pay</Button>
39
+ <Button use="text">Text</Button>
40
+ <Button use="backless">Backless</Button>
41
+ <Button use="link">Link</Button>
42
+ </Gapped>
43
+ <Gapped style={bgStyle}>
44
+ <Button use="default">Default</Button>
45
+ <Button use="primary">Primary</Button>
46
+ <Button use="success">Success</Button>
47
+ <Button use="danger">Danger</Button>
48
+ <Button use="pay">Pay</Button>
49
+ <Button use="text">Text</Button>
50
+ <Button use="backless">Backless</Button>
51
+ <Button use="link">Link</Button>
52
+ </Gapped>
53
+ </Gapped>
54
+ ```
55
+
56
+ ### Иконка
57
+ В кнопку можно передать иконку. Иконка может находиться как слева от текста кнопки, так и справа и даже в обоих позициях одновременно.
58
+
59
+ ```jsx harmony
60
+ import { Button, Gapped } from '@skbkontur/react-ui';
61
+ import { XIcon16Regular } from '@skbkontur/icons/XIcon16Regular';
62
+
63
+ <Gapped gap={5}>
64
+ <Button icon={<XIcon16Regular />}>Закрыть</Button>
65
+ <Button icon={<XIcon16Regular />} rightIcon={<XIcon16Regular />}>Закрыть</Button>
66
+ <Button rightIcon={<XIcon16Regular />}>Закрыть</Button>
67
+ </Gapped>
68
+ ```
69
+
70
+ ### Размер
71
+
72
+ ```jsx harmony
73
+ <div
74
+ style={{
75
+ display: "flex",
76
+ alignItems: "end",
77
+ gap: '10px',
78
+ }}
79
+ >
80
+ <Button size="small">Маленькая</Button>
81
+ <Button size="medium">Средняя</Button>
82
+ <Button size="large">Большая</Button>
83
+ </div>
84
+ ```
85
+
86
+ ### Ширина
87
+
88
+ ```jsx harmony
89
+ <Button width={40}>Закрыть</Button>
90
+ ```
91
+
92
+ ### Состояние валидации
93
+
94
+ ```jsx harmony
95
+ import { Gapped, Button } from '@skbkontur/react-ui';
96
+ <Gapped gap={5}>
97
+ <Button warning>Закрыть</Button>
98
+ <Button error>Закрыть</Button>
99
+ </Gapped>
100
+ ```
101
+
102
+ ### Стрелка
103
+
104
+ ```jsx harmony
105
+ import { Gapped, Button } from '@skbkontur/react-ui';
106
+
107
+ <Gapped gap={5}>
108
+ <Button arrow="left" size="medium">
109
+ Назад
110
+ </Button>
111
+ <Button arrow size="medium">
112
+ Далее
113
+ </Button>
114
+ </Gapped>
115
+ ```
116
+
117
+ ### Состояние загрузки
118
+
119
+ **Поведение:**
120
+ Кнопка на время нахождения в состоянии загрузки отключается.
121
+ Если в кнопке есть иконка, на время загрузки иконка заменяется на спиннер, если иконки нет — весь контент кнопки заменяется на спиннер. Когда иконки две — заменяется только левая.
122
+
123
+ ```jsx harmony
124
+ import { Button, Gapped } from '@skbkontur/react-ui';
125
+ import { MinusCircleIcon16Light } from '@skbkontur/icons/MinusCircleIcon16Light';
126
+
127
+ const [loading, setLoading] = React.useState(false);
128
+
129
+ const delay = time => args => new Promise(resolve => setTimeout(resolve, time, args));
130
+
131
+ const handleLoadingStart = () => {
132
+ delay(2000)()
133
+ .then(() => {
134
+ setLoading(false);
135
+ })
136
+ };
137
+
138
+ const handleClick = () => {
139
+ setLoading(true);
140
+ handleLoadingStart();
141
+ };
142
+
143
+ <Gapped>
144
+ <Button width={150} onClick={handleClick} loading={loading}>
145
+ Удалить
146
+ </Button>
147
+ <Button icon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
148
+ Удалить
149
+ </Button>
150
+ <Button rightIcon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
151
+ Удалить
152
+ </Button>
153
+ <Button icon={<MinusCircleIcon16Light />} rightIcon={<MinusCircleIcon16Light />} width={150} onClick={handleClick} loading={loading}>
154
+ Удалить
155
+ </Button>
156
+ </Gapped>
157
+
158
+ ```
159
+
160
+ ### Проп темы
161
+
162
+ ```jsx harmony
163
+ import { Button, Gapped } from '@skbkontur/react-ui';
164
+
165
+ <Gapped>
166
+ <Button theme={{textColorDefault: '#C00000'}}>Ok</Button>
167
+ <Button use="link" theme={{linkColor: '#C00000'}}>Ok</Button>
168
+ <Button>Ok</Button>
169
+ </Gapped>
170
+ ```
171
+
172
+ ### Кастомизация кнопки-ссылки
173
+
174
+ ```jsx harmony
175
+ import { Toast } from "@skbkontur/react-ui";
176
+ import { CopyIcon16Regular } from "@skbkontur/icons/CopyIcon16Regular"
177
+
178
+ const textDecorationStyles = {
179
+ btnLinkTextUnderlineOffset: '1px',
180
+ }
181
+
182
+ const underlineOnHoverStyles = {
183
+ btnLinkTextDecorationColor: 'transparent',
184
+ }
185
+
186
+ const differentColorStyles = {
187
+ btnLinkColor: 'blue',
188
+ btnLinkHoverColor: 'blue',
189
+ btnLinkActiveColor: 'blue',
190
+ }
191
+
192
+ const stringify = (styles) => {
193
+ return `${Object.entries(styles).map(([key, value]) => `${key}: "${value}"`).join(", ")}`
194
+ }
195
+
196
+ const copyStyles = (styles) => {
197
+ navigator.clipboard.writeText(stringify(styles));
198
+ Toast.push('Copied');
199
+ }
200
+
201
+ const tableStyle = {
202
+ borderCollapse: 'collapse',
203
+ width: '100%',
204
+ };
205
+
206
+ const tdStyle = {
207
+ border: '1px solid',
208
+ padding: '8px',
209
+ };
210
+
211
+ const renderExampleRow = (title, styles) => {
212
+ return (
213
+ <tr>
214
+ <td style={tdStyle}>{title}</td>
215
+ <td style={tdStyle}><Button use={'link'} theme={styles}>Button-link</Button></td>
216
+ <td style={tdStyle}>
217
+ <div style={{display: 'flex'}}>
218
+ <div style={{width: '80%', whiteSpace: 'pre-line'}}>{stringify(styles).replace(/, /g, '\n')}</div>
219
+ <Button icon={<CopyIcon16Regular />} use={'text'} onClick={() => copyStyles(styles)}/>
220
+ </div>
221
+ </td>
222
+ </tr>
223
+ )
224
+ }
225
+
226
+ <table style={tableStyle}>
227
+ <tr style={{textAlign: 'left'}}>
228
+ <th style={tdStyle}></th>
229
+ <th style={tdStyle}>Пример</th>
230
+ <th style={tdStyle}>Переменные темы</th>
231
+ </tr>
232
+ {renderExampleRow('Ссылка с подчеркиванием без отступа', textDecorationStyles)}
233
+ {renderExampleRow('Ссылка с подчеркиванием при наведении', underlineOnHoverStyles)}
234
+ {renderExampleRow('Изменение цвета ссылки', differentColorStyles)}
235
+ </table>
236
+ ```
237
+
238
+ ### Узкая Кнопка
239
+
240
+ ```jsx harmony
241
+ import { Button } from '@skbkontur/react-ui';
242
+
243
+ <Button narrow>
244
+ Создать отчет
245
+ </Button>
246
+ ```
247
+
248
+ ### Состояния валидации
249
+
250
+ ```jsx harmony
251
+ import { Button, Gapped } from '@skbkontur/react-ui';
252
+
253
+ <Gapped gap={5}>
254
+ <Button warning>
255
+ Warning
256
+ </Button>
257
+ <Button error>
258
+ Error
259
+ </Button>
260
+ </Gapped>
261
+ ```