@skbkontur/react-ui 1.6.9 → 1.6.11

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 (343) hide show
  1. package/README.md +135 -135
  2. package/components/Autocomplete/Autocomplete.adapter.js.flow +4 -4
  3. package/components/Autocomplete/Autocomplete.js.flow +37 -37
  4. package/components/Autocomplete/README.md +7 -7
  5. package/components/Autocomplete/index.js.flow +2 -2
  6. package/components/Button/Button.adapter.js.flow +4 -4
  7. package/components/Button/Button.js.flow +58 -58
  8. package/components/Button/Corners.js.flow +12 -12
  9. package/components/Button/README.md +85 -85
  10. package/components/Button/index.js.flow +2 -2
  11. package/components/Calendar/Animation.js.flow +7 -7
  12. package/components/Calendar/Calendar.js.flow +33 -33
  13. package/components/Calendar/CalendarDateShape.js.flow +26 -26
  14. package/components/Calendar/CalendarScrollEvents.js.flow +15 -15
  15. package/components/Calendar/CalendarUtils.js.flow +35 -35
  16. package/components/Calendar/DayCellView.js.flow +16 -16
  17. package/components/Calendar/DayCellViewModel.js.flow +9 -9
  18. package/components/Calendar/Month.js.flow +23 -23
  19. package/components/Calendar/MonthView.js.flow +24 -24
  20. package/components/Calendar/MonthViewModel.js.flow +16 -16
  21. package/components/Calendar/config.js.flow +11 -11
  22. package/components/Calendar/index.js.flow +2 -2
  23. package/components/Calendar/presets.js.flow +21 -21
  24. package/components/Calendar/stepper.js.flow +2 -2
  25. package/components/Calendar/utils.js.flow +2 -2
  26. package/components/Center/Center.js.flow +15 -15
  27. package/components/Center/README.md +5 -5
  28. package/components/Center/index.js.flow +2 -2
  29. package/components/Checkbox/Checkbox.adapter.js.flow +4 -4
  30. package/components/Checkbox/Checkbox.js.flow +27 -27
  31. package/components/Checkbox/README.md +61 -61
  32. package/components/Checkbox/index.js.flow +2 -2
  33. package/components/ComboBox/ComboBox.js.flow +58 -58
  34. package/components/ComboBox/README.md +423 -423
  35. package/components/ComboBox/__mocks__/getCities.js.map +1 -1
  36. package/components/ComboBox/__mocks__/kladr.json +20002 -20002
  37. package/components/ComboBox/index.js.flow +2 -2
  38. package/components/ComboBoxOld/ComboBoxOld.adapter.js.map +1 -1
  39. package/components/ComboBoxOld/ComboBoxOld.d.ts +120 -120
  40. package/components/ComboBoxOld/ComboBoxOld.js +45 -45
  41. package/components/ComboBoxOld/ComboBoxOld.js.map +1 -1
  42. package/components/ComboBoxOld/ComboBoxRenderer.js.map +1 -1
  43. package/components/ComboBoxOld/README.md +83 -83
  44. package/components/ComboBoxOld/index.d.ts +1 -1
  45. package/components/ComboBoxOld/index.js.map +1 -1
  46. package/components/CurrencyInput/CurrencyHelper.js.flow +44 -44
  47. package/components/CurrencyInput/CurrencyInput.js.flow +30 -30
  48. package/components/CurrencyInput/CurrencyInputHelper.js.flow +38 -38
  49. package/components/CurrencyInput/CurrencyInputKeyboardActions.js.flow +19 -19
  50. package/components/CurrencyInput/CursorHelper.js.flow +15 -15
  51. package/components/CurrencyInput/README.md +19 -19
  52. package/components/CurrencyInput/SelectionHelper.js.flow +16 -16
  53. package/components/CurrencyInput/index.js.flow +2 -2
  54. package/components/CurrencyLabel/CurrencyLabel.js.flow +10 -10
  55. package/components/CurrencyLabel/README.md +23 -23
  56. package/components/CurrencyLabel/index.js.flow +2 -2
  57. package/components/CustomComboBox/ComboBoxMenu.js.flow +22 -22
  58. package/components/CustomComboBox/ComboBoxView.js.flow +52 -52
  59. package/components/CustomComboBox/CustomComboBox.js.flow +130 -130
  60. package/components/CustomComboBox/index.js.flow +2 -2
  61. package/components/DateInput/DateInput.js.flow +60 -60
  62. package/components/DateInput/README.md +104 -104
  63. package/components/DateInput/helpers/DateInputKeyboardActions.js.flow +17 -17
  64. package/components/DateInput/helpers/SelectionHelpers.js.flow +3 -3
  65. package/components/DateInput/helpers/inputNumber.js.flow +4 -4
  66. package/components/DateInput/index.js.flow +2 -2
  67. package/components/DatePicker/DatePicker.js.flow +45 -45
  68. package/components/DatePicker/DatePickerHelpers.js.flow +7 -7
  69. package/components/DatePicker/DateShape.js.flow +11 -11
  70. package/components/DatePicker/Picker.js.flow +23 -23
  71. package/components/DatePicker/README.md +307 -307
  72. package/components/DatePicker/index.js.flow +2 -2
  73. package/components/DatePickerOld/Calendar.js.map +1 -1
  74. package/components/DatePickerOld/CalendarCell.js.map +1 -1
  75. package/components/DatePickerOld/DateInput.js +2 -2
  76. package/components/DatePickerOld/DateInput.js.map +1 -1
  77. package/components/DatePickerOld/DatePicker.adapter.js.map +1 -1
  78. package/components/DatePickerOld/DatePickerOld.d.ts +35 -35
  79. package/components/DatePickerOld/DatePickerOld.js +16 -16
  80. package/components/DatePickerOld/DatePickerOld.js.map +1 -1
  81. package/components/DatePickerOld/Picker.js.map +1 -1
  82. package/components/DatePickerOld/README.md +7 -7
  83. package/components/DatePickerOld/dateParser.js.map +1 -1
  84. package/components/DatePickerOld/index.d.ts +1 -1
  85. package/components/DatePickerOld/index.js.map +1 -1
  86. package/components/DateSelect/DateSelect.js.flow +30 -30
  87. package/components/DateSelect/index.js.flow +2 -2
  88. package/components/Dropdown/Dropdown.js.flow +41 -41
  89. package/components/Dropdown/README.md +14 -14
  90. package/components/Dropdown/index.js.flow +2 -2
  91. package/components/DropdownContainer/DropdownContainer.js.flow +29 -29
  92. package/components/DropdownMenu/DropdownMenu.js.flow +20 -20
  93. package/components/DropdownMenu/README.md +66 -66
  94. package/components/DropdownMenu/index.js.flow +2 -2
  95. package/components/Fias/Fias.js.flow +37 -37
  96. package/components/Fias/FiasModal.js.flow +12 -12
  97. package/components/Fias/FiasSearch/FiasSearch.js.flow +32 -32
  98. package/components/Fias/FiasSearch/README.md +78 -78
  99. package/components/Fias/Form/FiasComboBox.js.flow +25 -25
  100. package/components/Fias/Form/FiasForm.js.flow +21 -21
  101. package/components/Fias/README.md +436 -436
  102. package/components/Fias/api/APIResultFactory.js.flow +7 -7
  103. package/components/Fias/api/FiasAPI.js.flow +13 -13
  104. package/components/Fias/api/MockAPI.js.flow +13 -13
  105. package/components/Fias/api/data.json +285 -285
  106. package/components/Fias/constants/abbreviations.js.flow +7 -7
  107. package/components/Fias/index.js.flow +5 -5
  108. package/components/Fias/locale/types.js.flow +71 -71
  109. package/components/Fias/logger/Logger.js.flow +13 -13
  110. package/components/Fias/models/Address.js.flow +57 -57
  111. package/components/Fias/models/AddressElement.js.flow +15 -15
  112. package/components/Fias/models/FiasData.js.flow +10 -10
  113. package/components/Fias/types.js.flow +133 -133
  114. package/components/FxInput/FxInput.adapter.js.flow +4 -4
  115. package/components/FxInput/FxInput.js.flow +24 -24
  116. package/components/FxInput/README.md +13 -13
  117. package/components/FxInput/index.js.flow +2 -2
  118. package/components/Gapped/Gapped.js.flow +13 -13
  119. package/components/Gapped/README.md +6 -6
  120. package/components/Gapped/index.js.flow +2 -2
  121. package/components/Group/Group.js.flow +14 -14
  122. package/components/Group/README.md +27 -27
  123. package/components/Group/index.js.flow +2 -2
  124. package/components/HideBodyVerticalScroll/HideBodyVerticalScroll.js.flow +7 -7
  125. package/components/HideBodyVerticalScroll/index.js.flow +2 -2
  126. package/components/Hint/Hint.js.flow +37 -37
  127. package/components/Hint/README.md +3 -3
  128. package/components/Hint/index.js.flow +2 -2
  129. package/components/Icon/20px/Icon.js.flow +27 -27
  130. package/components/Icon/20px/index.js.flow +2 -2
  131. package/components/Icon/README.md +64 -64
  132. package/components/IgnoreLayerClick/IgnoreLayerClick.js.flow +12 -12
  133. package/components/IgnoreLayerClick/index.js.flow +2 -2
  134. package/components/Input/Input.adapter.js.flow +9 -9
  135. package/components/Input/Input.js.flow +55 -55
  136. package/components/Input/README.md +13 -13
  137. package/components/Input/index.js.flow +2 -2
  138. package/components/Kebab/Kebab.js.flow +23 -23
  139. package/components/Kebab/README.md +44 -44
  140. package/components/Kebab/index.js.flow +2 -2
  141. package/components/Kladr/AddressModal.d.ts +39 -39
  142. package/components/Kladr/AddressModal.js.flow +20 -20
  143. package/components/Kladr/AddressModal.js.map +1 -1
  144. package/components/Kladr/Kladr.d.ts +39 -39
  145. package/components/Kladr/Kladr.js +2 -2
  146. package/components/Kladr/Kladr.js.flow +27 -27
  147. package/components/Kladr/Kladr.js.map +1 -1
  148. package/components/Kladr/KladrAPI.d.ts +8 -8
  149. package/components/Kladr/KladrAPI.js +7 -2
  150. package/components/Kladr/KladrAPI.js.flow +8 -8
  151. package/components/Kladr/KladrAPI.js.map +1 -1
  152. package/components/Kladr/README.md +3 -3
  153. package/components/Kladr/Types.d.ts +40 -40
  154. package/components/Kladr/Types.js.flow +39 -39
  155. package/components/Kladr/index.d.ts +1 -1
  156. package/components/Kladr/index.js.flow +2 -2
  157. package/components/Kladr/index.js.map +1 -1
  158. package/components/Kladr/util.js.map +1 -1
  159. package/components/Kladr/utils.d.ts +4 -4
  160. package/components/Kladr/utils.js.flow +4 -4
  161. package/components/Link/Link.adapter.js.flow +4 -4
  162. package/components/Link/Link.js.flow +25 -25
  163. package/components/Link/README.md +11 -11
  164. package/components/Link/index.js.flow +2 -2
  165. package/components/Loader/Loader.js.flow +20 -20
  166. package/components/Loader/README.md +25 -25
  167. package/components/Loader/index.js.flow +2 -2
  168. package/components/Logotype/Logotype.js.flow +21 -21
  169. package/components/Logotype/ProductWidget.js.flow +7 -7
  170. package/components/Logotype/README.md +32 -32
  171. package/components/Logotype/index.js.flow +2 -2
  172. package/components/Menu/Menu.js.flow +24 -24
  173. package/components/Menu/isActiveElement.js.flow +7 -7
  174. package/components/MenuHeader/MenuHeader.js.flow +11 -11
  175. package/components/MenuHeader/index.js.flow +2 -2
  176. package/components/MenuItem/MenuItem.js.flow +33 -33
  177. package/components/MenuItem/README.md +5 -5
  178. package/components/MenuItem/index.js.flow +2 -2
  179. package/components/MenuSeparator/MenuSeparator.js.flow +7 -7
  180. package/components/MenuSeparator/index.js.flow +2 -2
  181. package/components/Modal/Modal.adapter.js.flow +4 -4
  182. package/components/Modal/Modal.js.flow +30 -30
  183. package/components/Modal/Modal.js.map +1 -1
  184. package/components/Modal/ModalBody.js.flow +7 -7
  185. package/components/Modal/ModalClose.js.flow +6 -6
  186. package/components/Modal/ModalContext.js.flow +15 -15
  187. package/components/Modal/ModalFooter.js.flow +11 -11
  188. package/components/Modal/ModalHeader.js.flow +11 -11
  189. package/components/Modal/README.md +38 -38
  190. package/components/Modal/index.js.flow +2 -2
  191. package/components/ModalStack/ModalStack.d.ts +4 -2
  192. package/components/ModalStack/ModalStack.js +13 -2
  193. package/components/ModalStack/ModalStack.js.flow +10 -10
  194. package/components/ModalStack/ModalStack.js.map +1 -1
  195. package/components/ModalStack/index.js.flow +2 -2
  196. package/components/Paging/NavigationHelper.js.flow +13 -13
  197. package/components/Paging/Paging.js.flow +38 -38
  198. package/components/Paging/PagingHelper.js.flow +10 -10
  199. package/components/Paging/README.md +43 -43
  200. package/components/Paging/index.js.flow +2 -2
  201. package/components/PasswordInput/PasswordInput.js.flow +26 -26
  202. package/components/PasswordInput/PasswordInputFallback.js.flow +13 -13
  203. package/components/PasswordInput/getCharHelper.js.flow +4 -4
  204. package/components/PasswordInput/index.js.flow +2 -2
  205. package/components/PhoneInput/PhoneInput.js +2 -2
  206. package/components/PhoneInput/PhoneInput.js.map +1 -1
  207. package/components/PhoneInput/index.js.map +1 -1
  208. package/components/Popup/Popup.js.flow +60 -60
  209. package/components/Popup/PopupHelper.js.flow +29 -29
  210. package/components/Popup/PopupPin.js.flow +15 -15
  211. package/components/Popup/index.js.flow +2 -2
  212. package/components/Radio/README.md +14 -14
  213. package/components/Radio/Radio.js.flow +33 -33
  214. package/components/Radio/index.js.flow +2 -2
  215. package/components/RadioGroup/Prevent.js.flow +9 -9
  216. package/components/RadioGroup/README.md +44 -44
  217. package/components/RadioGroup/RadioGroup.adapter.js.flow +4 -4
  218. package/components/RadioGroup/RadioGroup.js +1 -1
  219. package/components/RadioGroup/RadioGroup.js.flow +42 -42
  220. package/components/RadioGroup/RadioGroup.js.map +1 -1
  221. package/components/RadioGroup/index.js.flow +2 -2
  222. package/components/RenderContainer/RenderContainer.js.flow +11 -11
  223. package/components/RenderContainer/index.js.flow +2 -2
  224. package/components/RenderLayer/RenderLayer.js.flow +12 -12
  225. package/components/RenderLayer/index.js.flow +2 -2
  226. package/components/ScrollContainer/README.md +60 -60
  227. package/components/ScrollContainer/ScrollContainer.js.flow +24 -24
  228. package/components/ScrollContainer/index.js.flow +2 -2
  229. package/components/Select/Item.js.flow +7 -7
  230. package/components/Select/README.md +23 -23
  231. package/components/Select/Select.adapter.js.flow +4 -4
  232. package/components/Select/Select.js.flow +81 -81
  233. package/components/Select/index.js.flow +2 -2
  234. package/components/SidePage/README.md +46 -46
  235. package/components/SidePage/SidePage.js.flow +34 -34
  236. package/components/SidePage/SidePage.js.map +1 -1
  237. package/components/SidePage/SidePageBody.js.flow +13 -13
  238. package/components/SidePage/SidePageContainer.js.flow +9 -9
  239. package/components/SidePage/SidePageContext.js.flow +15 -15
  240. package/components/SidePage/SidePageFooter.js.flow +16 -16
  241. package/components/SidePage/SidePageHeader.js.flow +11 -11
  242. package/components/SidePage/index.js.flow +2 -2
  243. package/components/Spinner/README.md +33 -33
  244. package/components/Spinner/Spinner.js.flow +20 -20
  245. package/components/Spinner/SpinnerFallback.js.flow +15 -15
  246. package/components/Spinner/index.js.flow +2 -2
  247. package/components/Spinner/settings.js.flow +48 -48
  248. package/components/Sticky/README.md +27 -27
  249. package/components/Sticky/Sticky.js.flow +22 -22
  250. package/components/Sticky/index.js.flow +2 -2
  251. package/components/Switcher/README.md +10 -10
  252. package/components/Switcher/Switcher.js.flow +26 -26
  253. package/components/Switcher/index.js.flow +2 -2
  254. package/components/Tabs/Indicator.js.flow +21 -21
  255. package/components/Tabs/README.md +28 -28
  256. package/components/Tabs/Tab.js.flow +48 -48
  257. package/components/Tabs/Tabs.js.flow +28 -28
  258. package/components/Tabs/index.js.flow +2 -2
  259. package/components/Textarea/README.md +9 -9
  260. package/components/Textarea/Textarea.adapter.js.flow +11 -11
  261. package/components/Textarea/Textarea.js.flow +33 -33
  262. package/components/Textarea/TextareaHelpers.js.flow +6 -6
  263. package/components/Textarea/index.js.flow +2 -2
  264. package/components/ThemeProvider/Playground/README.md +7 -7
  265. package/components/ThemeProvider/README.md +172 -172
  266. package/components/ThemeShowcase/README.md +13 -13
  267. package/components/Toast/README.md +39 -39
  268. package/components/Toast/Toast.js.flow +29 -29
  269. package/components/Toast/ToastStatic.js.flow +10 -10
  270. package/components/Toast/ToastView.js.flow +16 -16
  271. package/components/Toast/index.js.flow +2 -2
  272. package/components/Toggle/README.md +9 -9
  273. package/components/Toggle/Toggle.js.flow +28 -28
  274. package/components/Toggle/index.js.flow +2 -2
  275. package/components/Token/README.md +109 -109
  276. package/components/Token/Token.js.flow +25 -25
  277. package/components/Token/TokenRemoveIcon.js.flow +11 -11
  278. package/components/Token/index.js.flow +2 -2
  279. package/components/TokenInput/README.md +82 -82
  280. package/components/TokenInput/TextWidthHelper.js.flow +10 -10
  281. package/components/TokenInput/TokenInput.js.flow +39 -39
  282. package/components/TokenInput/TokenInputMenu.js.flow +17 -17
  283. package/components/TokenInput/TokenInputReducer.js.flow +63 -63
  284. package/components/TokenInput/index.js.flow +2 -2
  285. package/components/Tooltip/README.md +207 -207
  286. package/components/Tooltip/Tooltip.js.flow +33 -33
  287. package/components/Tooltip/index.js.flow +2 -2
  288. package/components/TooltipMenu/README.md +106 -106
  289. package/components/TooltipMenu/TooltipMenu.js.flow +19 -19
  290. package/components/TooltipMenu/index.js.flow +2 -2
  291. package/components/TopBar/ButtonItem.js.flow +22 -22
  292. package/components/TopBar/Divider.js.flow +5 -5
  293. package/components/TopBar/Item.js.flow +19 -19
  294. package/components/TopBar/Organizations.js.flow +16 -16
  295. package/components/TopBar/README.md +112 -112
  296. package/components/TopBar/TopBar.js.flow +53 -53
  297. package/components/TopBar/TopBarDropdown.js.flow +23 -23
  298. package/components/TopBar/TopBarEnd.js.flow +4 -4
  299. package/components/TopBar/TopBarLogout.js.flow +6 -6
  300. package/components/TopBar/TopBarStart.js.flow +4 -4
  301. package/components/TopBar/User.js.flow +9 -9
  302. package/components/TopBar/index.js.flow +2 -2
  303. package/components/ZIndex/ZIndex.js.flow +11 -11
  304. package/components/ZIndex/index.js.flow +2 -2
  305. package/components/__mocks__/react-addons-css-transition-group.js.map +1 -1
  306. package/components/all.js.flow +36 -36
  307. package/components/ensureOldIEClassName.js.flow +6 -6
  308. package/components/eventHandlers.js.flow +9 -9
  309. package/components/index.js.flow +2 -2
  310. package/components/internal/InputLikeText/InputLikeText.js.flow +24 -24
  311. package/components/internal/InputLikeText/index.js.flow +2 -2
  312. package/components/internal/InternalMenu/InternalMenu.js.flow +23 -23
  313. package/components/internal/InternalMenu/isActiveElement.js.flow +7 -7
  314. package/components/internal/MaskedInput/MaskedInput.js.flow +24 -24
  315. package/components/internal/MaskedInput/index.js.flow +2 -2
  316. package/components/internal/MockDate.js.flow +9 -9
  317. package/components/internal/PopupMenu/PopupMenu.js.flow +40 -40
  318. package/components/internal/PopupMenu/PopupMenuPositions.js.flow +4 -4
  319. package/components/internal/PopupMenu/index.js.flow +2 -2
  320. package/components/internal/PopupMenu/validatePositions.js.flow +4 -4
  321. package/components/internal/ResizeDetector/ResizeDetector.js.flow +8 -8
  322. package/components/internal/ResizeDetector/index.js.flow +2 -2
  323. package/components/internal/createPropsGetter.js.flow +8 -8
  324. package/components/internal/cross.js.flow +4 -4
  325. package/components/internal/currentEnvironment.js.flow +4 -4
  326. package/components/internal/extractKeyboardAction.js.flow +12 -12
  327. package/components/polyfillPlaceholder.js.flow +4 -4
  328. package/package.json +1 -4
  329. package/typings/console.d.ts +3 -3
  330. package/typings/event-types.d.ts +4 -4
  331. package/typings/fbjs.d.ts +4 -4
  332. package/typings/global.d.ts +6 -6
  333. package/typings/images.d.ts +1 -1
  334. package/typings/less.d.ts +4 -4
  335. package/typings/mocha/index.d.ts +2 -2
  336. package/typings/mockdate.d.ts +1 -1
  337. package/typings/normalize-wheel.d.ts +1 -1
  338. package/typings/raf.d.ts +1 -1
  339. package/typings/react-addons-css-transition-group.d.ts +1 -1
  340. package/typings/react-testing/index.d.ts +4 -4
  341. package/typings/react-testing/window.d.ts +5 -5
  342. package/typings/react.d.ts +8 -8
  343. package/typings/utility-types.d.ts +17 -17
@@ -1 +1 @@
1
- {"version":3,"sources":["KladrAPI.js"],"names":["kladrUrl","LIMIT","search","searchText","levels","parentCode","data","createQuery","prefix","parentKladr","limit","desiredAoLevels","strictSubordination","then","res","json","toJS","searchIndex","code","house","response","text","verify","req","method","body","JSON","stringify","toJSON","address","params","key","hasOwnProperty","push","encodeURIComponent","join","obj","Array","isArray","map","ret","charAt","toUpperCase","substr","toLowerCase"],"mappings":";;AAEA,6E;;;;AAIA,IAAMA,QAAQ,GAAG,6BAAjB;AACA,IAAMC,KAAK,GAAG,EAAd;;AAEO,SAASC,MAAT,CAAgBC,UAAhB,EAAoCC,MAApC,EAAoDC,UAApD,EAAkG;AACvG,MAAMC,IAAI,GAAGC,WAAW,CAAC;AACvBC,IAAAA,MAAM,EAAEL,UADe;AAEvBM,IAAAA,WAAW,EAAEJ,UAAU,IAAI,EAFJ;AAGvBK,IAAAA,KAAK,EAAET,KAHgB;AAIvBU,IAAAA,eAAe,EAAEP,MAJM;AAKvBQ,IAAAA,mBAAmB,EAAE,OALE,EAAD,CAAxB;;AAOA,SAAO,2BAASZ,QAAT,gBAA4BM,IAA5B;AACJO,EAAAA,IADI,CACC,UAAAC,GAAG,UAAIA,GAAG,CAACC,IAAJ,EAAJ,EADJ;AAEJF,EAAAA,IAFI,CAECG,IAFD,CAAP;AAGD;;AAEM,SAASC,WAAT,CAAqBC,IAArB,EAAmCC,KAAnC,EAAmD;AACxD,MAAMb,IAAI,GAAGC,WAAW,CAAC;AACvBW,IAAAA,IAAI,EAAJA,IADuB;AAEvBC,IAAAA,KAAK,EAAEA,KAAK,IAAI,EAFO,EAAD,CAAxB;;;AAKA,SAAO,2BAASnB,QAAT,oBAAgCM,IAAhC,EAAwCO,IAAxC,CAA6C,UAAAO,QAAQ,UAAIA,QAAQ,CAACC,IAAT,EAAJ,EAArD,CA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A,SAASpB,IAAT,CAAcoB,GAAd,EAAwB;AACtB,MAAIC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAJ,EAAwB;AACtB,WAAOA,GAAG,CAACG,GAAJ,CAAQvB,IAAR,CAAP;AACD,GAFD,MAEO,IAAIoB,GAAG,IAAI,OAAOA,GAAP,KAAe,QAA1B,EAAoC;AACzC,QAAMI,GAAG,GAAG,EAAZ;AACA,SAAK,IAAMT,GAAX,IAAkBK,GAAlB,EAAuB;AACrBI,MAAAA,GAAG,CAACT,GAAG,CAACU,MAAJ,CAAW,CAAX,EAAcG,WAAd,KAA8Bb,GAAG,CAACY,MAAJ,CAAW,CAAX,CAA/B,CAAH,GAAmD3B,IAAI,CAACoB,GAAG,CAACL,GAAD,CAAJ,CAAvD;AACD;AACD,WAAOS,GAAP;AACD;AACD,SAAOJ,GAAP;AACD","sourcesContent":["// @flow\r\n\r\nimport fetch from '../../lib/net/fetch-cors';\r\n\r\nimport type { Address, VerifyResult } from './Types';\r\n\r\nconst kladrUrl = 'https://kladr.kontur.ru/v1/';\r\nconst LIMIT = 50;\r\n\r\nexport function search(searchText: string, levels: string, parentCode: ?string): Promise<Array<Address>> {\r\n const data = createQuery({\r\n prefix: searchText,\r\n parentKladr: parentCode || '',\r\n limit: LIMIT,\r\n desiredAoLevels: levels,\r\n strictSubordination: 'false',\r\n });\r\n return fetch(`${kladrUrl}suggest?${data}`)\r\n .then(res => res.json())\r\n .then(toJS);\r\n}\r\n\r\nexport function searchIndex(code: string, house: ?string) {\r\n const data = createQuery({\r\n code,\r\n house: house || '',\r\n });\r\n\r\n return fetch(`${kladrUrl}kladr/index?${data}`).then(response => response.text());\r\n}\r\n\r\nexport function verify(req: Address): Promise<VerifyResult> {\r\n return fetch(`${kladrUrl}verify/`, {\r\n method: 'POST',\r\n body: JSON.stringify(toJSON({ address: req })),\r\n })\r\n .then(res => res.json())\r\n .then(toJS);\r\n}\r\n\r\nfunction createQuery(data) {\r\n const params = [];\r\n for (const key in data) {\r\n if (data.hasOwnProperty) {\r\n params.push(`${key}=${encodeURIComponent(data[key])}`);\r\n }\r\n }\r\n return params.join('&');\r\n}\r\n\r\nfunction toJSON(obj) {\r\n if (Array.isArray(obj)) {\r\n return obj.map(toJSON);\r\n } else if (obj && typeof obj === 'object') {\r\n const ret = {};\r\n for (const key in obj) {\r\n ret[key.charAt(0).toUpperCase() + key.substr(1)] = toJSON(obj[key]);\r\n }\r\n return ret;\r\n }\r\n return obj;\r\n}\r\n// eslint-disable-next-line flowtype/no-weak-types\r\nfunction toJS(obj): any {\r\n if (Array.isArray(obj)) {\r\n return obj.map(toJS);\r\n } else if (obj && typeof obj === 'object') {\r\n const ret = {};\r\n for (const key in obj) {\r\n ret[key.charAt(0).toLowerCase() + key.substr(1)] = toJS(obj[key]);\r\n }\r\n return ret;\r\n }\r\n return obj;\r\n}\r\n"]}
1
+ {"version":3,"sources":["KladrAPI.js"],"names":["kladrUrl","LIMIT","search","searchText","levels","parentCode","data","createQuery","prefix","parentKladr","limit","desiredAoLevels","strictSubordination","then","res","json","toJS","removeEmpty","address","filter","a","Object","values","every","i","searchIndex","code","house","response","text","verify","req","method","body","JSON","stringify","toJSON","params","key","hasOwnProperty","push","encodeURIComponent","join","obj","Array","isArray","map","ret","charAt","toUpperCase","substr","toLowerCase"],"mappings":";;AAEA,6E;;;;AAIA,IAAMA,QAAQ,GAAG,6BAAjB;AACA,IAAMC,KAAK,GAAG,EAAd;;AAEO,SAASC,MAAT,CAAgBC,UAAhB,EAAoCC,MAApC,EAAoDC,UAApD,EAAkG;AACvG,MAAMC,IAAI,GAAGC,WAAW,CAAC;AACvBC,IAAAA,MAAM,EAAEL,UADe;AAEvBM,IAAAA,WAAW,EAAEJ,UAAU,IAAI,EAFJ;AAGvBK,IAAAA,KAAK,EAAET,KAHgB;AAIvBU,IAAAA,eAAe,EAAEP,MAJM;AAKvBQ,IAAAA,mBAAmB,EAAE,OALE,EAAD,CAAxB;;AAOA,SAAO,2BAASZ,QAAT,g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,GAAP;AACD","sourcesContent":["// @flow\n\nimport fetch from '../../lib/net/fetch-cors';\n\nimport type { Address, VerifyResult } from './Types';\n\nconst kladrUrl = 'https://kladr.kontur.ru/v1/';\nconst LIMIT = 50;\n\nexport function search(searchText: string, levels: string, parentCode: ?string): Promise<Array<Address>> {\n const data = createQuery({\n prefix: searchText,\n parentKladr: parentCode || '',\n limit: LIMIT,\n desiredAoLevels: levels,\n strictSubordination: 'false',\n });\n return fetch(`${kladrUrl}suggest?${data}`)\n .then(res => res.json())\n .then(toJS)\n .then(removeEmpty);\n}\n\nexport function removeEmpty(address: Array<Address>): Array<Address> {\n return address.filter(a => !Object.values(a).every(i => i === null));\n}\n\nexport function searchIndex(code: string, house: ?string) {\n const data = createQuery({\n code,\n house: house || '',\n });\n\n return fetch(`${kladrUrl}kladr/index?${data}`).then(response => response.text());\n}\n\nexport function verify(req: Address): Promise<VerifyResult> {\n return fetch(`${kladrUrl}verify/`, {\n method: 'POST',\n body: JSON.stringify(toJSON({ address: req })),\n })\n .then(res => res.json())\n .then(toJS);\n}\n\nfunction createQuery(data) {\n const params = [];\n for (const key in data) {\n if (data.hasOwnProperty) {\n params.push(`${key}=${encodeURIComponent(data[key])}`);\n }\n }\n return params.join('&');\n}\n\nfunction toJSON(obj) {\n if (Array.isArray(obj)) {\n return obj.map(toJSON);\n } else if (obj && typeof obj === 'object') {\n const ret = {};\n for (const key in obj) {\n ret[key.charAt(0).toUpperCase() + key.substr(1)] = toJSON(obj[key]);\n }\n return ret;\n }\n return obj;\n}\n// eslint-disable-next-line flowtype/no-weak-types\nfunction toJS(obj): any {\n if (Array.isArray(obj)) {\n return obj.map(toJS);\n } else if (obj && typeof obj === 'object') {\n const ret = {};\n for (const key in obj) {\n ret[key.charAt(0).toLowerCase() + key.substr(1)] = toJS(obj[key]);\n }\n return ret;\n }\n return obj;\n}\n"]}
@@ -1,3 +1,3 @@
1
- ```js
2
- <Kladr title="Адрес" value={state.value} onChange={(_, v) => setState({ value: v })} />
3
- ```
1
+ ```js
2
+ <Kladr title="Адрес" value={state.value} onChange={(_, v) => setState({ value: v })} />
3
+ ```
@@ -1,40 +1,40 @@
1
- import { Nullable } from '../../typings/utility-types';
2
-
3
- export interface PlaceDescription {
4
- code: string;
5
- fiasGuid: string;
6
- name: string;
7
- abbreviation: string;
8
- isError: boolean;
9
- }
10
-
11
- export interface Address {
12
- region: Nullable<PlaceDescription>;
13
- district: Nullable<PlaceDescription>;
14
- city: Nullable<PlaceDescription>;
15
- settlement: Nullable<PlaceDescription>;
16
- street: Nullable<PlaceDescription>;
17
- index: Nullable<string>;
18
- okato: Nullable<string>;
19
- house: Nullable<string>;
20
- building: Nullable<string>;
21
- room: Nullable<string>;
22
- }
23
-
24
- export declare type Place =
25
- | 'region'
26
- | 'district'
27
- | 'city'
28
- | 'settlement'
29
- | 'street'
30
- | 'index'
31
- | 'okato'
32
- | 'house'
33
- | 'building'
34
- | 'room';
35
-
36
- export interface VerifyResult {
37
- address: Address;
38
- invalidItem: number;
39
- isKladrAddress: boolean;
40
- }
1
+ import { Nullable } from '../../typings/utility-types';
2
+
3
+ export interface PlaceDescription {
4
+ code: string;
5
+ fiasGuid: string;
6
+ name: string;
7
+ abbreviation: string;
8
+ isError: boolean;
9
+ }
10
+
11
+ export interface Address {
12
+ region: Nullable<PlaceDescription>;
13
+ district: Nullable<PlaceDescription>;
14
+ city: Nullable<PlaceDescription>;
15
+ settlement: Nullable<PlaceDescription>;
16
+ street: Nullable<PlaceDescription>;
17
+ index: Nullable<string>;
18
+ okato: Nullable<string>;
19
+ house: Nullable<string>;
20
+ building: Nullable<string>;
21
+ room: Nullable<string>;
22
+ }
23
+
24
+ export declare type Place =
25
+ | 'region'
26
+ | 'district'
27
+ | 'city'
28
+ | 'settlement'
29
+ | 'street'
30
+ | 'index'
31
+ | 'okato'
32
+ | 'house'
33
+ | 'building'
34
+ | 'room';
35
+
36
+ export interface VerifyResult {
37
+ address: Address;
38
+ invalidItem: number;
39
+ isKladrAddress: boolean;
40
+ }
@@ -1,39 +1,39 @@
1
- /* @flow */
2
- export type PlaceDescription = {|
3
- code: string,
4
- fiasGuid: string,
5
- name: string,
6
- abbreviation: string,
7
- isError: boolean,
8
- |};
9
-
10
- export type Address = {|
11
- region: ?PlaceDescription,
12
- district: ?PlaceDescription,
13
- city: ?PlaceDescription,
14
- settlement: ?PlaceDescription,
15
- street: ?PlaceDescription,
16
- index: ?string,
17
- okato: ?string,
18
- house: ?string,
19
- building: ?string,
20
- room: ?string,
21
- |};
22
-
23
- export type Place =
24
- | 'region'
25
- | 'district'
26
- | 'city'
27
- | 'settlement'
28
- | 'street'
29
- | 'index'
30
- | 'okato'
31
- | 'house'
32
- | 'building'
33
- | 'room';
34
-
35
- export type VerifyResult = {|
36
- address: Address,
37
- invalidItem: number,
38
- isKladrAddress: boolean,
39
- |};
1
+ /* @flow */
2
+ export type PlaceDescription = {|
3
+ code: string,
4
+ fiasGuid: string,
5
+ name: string,
6
+ abbreviation: string,
7
+ isError: boolean,
8
+ |};
9
+
10
+ export type Address = {|
11
+ region: ?PlaceDescription,
12
+ district: ?PlaceDescription,
13
+ city: ?PlaceDescription,
14
+ settlement: ?PlaceDescription,
15
+ street: ?PlaceDescription,
16
+ index: ?string,
17
+ okato: ?string,
18
+ house: ?string,
19
+ building: ?string,
20
+ room: ?string,
21
+ |};
22
+
23
+ export type Place =
24
+ | 'region'
25
+ | 'district'
26
+ | 'city'
27
+ | 'settlement'
28
+ | 'street'
29
+ | 'index'
30
+ | 'okato'
31
+ | 'house'
32
+ | 'building'
33
+ | 'room';
34
+
35
+ export type VerifyResult = {|
36
+ address: Address,
37
+ invalidItem: number,
38
+ isKladrAddress: boolean,
39
+ |};
@@ -1 +1 @@
1
- export { default, KladrProps, KladrState } from './Kladr';
1
+ export { default, KladrProps, KladrState } from './Kladr';
@@ -1,2 +1,2 @@
1
- /* @flow */
2
- export { default, KladrProps, KladrState } from './Kladr';
1
+ /* @flow */
2
+ export { default, KladrProps, KladrState } from './Kladr';
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"names":["Kladr"],"mappings":"mEAAA,wD;AACeA,iB","sourcesContent":["import Kladr from './Kladr';\r\nexport default Kladr;\r\n"]}
1
+ {"version":3,"sources":["index.js"],"names":["Kladr"],"mappings":"mEAAA,wD;AACeA,iB","sourcesContent":["import Kladr from './Kladr';\nexport default Kladr;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["util.js"],"names":["placeName","region","_for","abbreviation","name"],"mappings":";;;;AAIO,SAASA,SAAT,CAAmBC,MAAnB,EAA6CC,IAA7C,EAAkE,KAArBA,IAAqB,cAArBA,IAAqB,GAAN,IAAM;AACvE,UAAQD,MAAM,CAACE,YAAf;AACE,SAAK,KAAL;AACE,aAAOF,MAAM,CAACG,IAAP,GAAc,UAArB;;AAEF,SAAK,MAAL;AACE,aAAOH,MAAM,CAACG,IAAP,GAAc,OAArB;;AAEF,SAAK,KAAL;AACE,aAAO,CAACF,IAAI,KAAK,UAAT,GAAsB,QAAtB,GAAiC,EAAlC,IAAwCD,MAAM,CAACG,IAAtD;;AAEF,SAAK,GAAL;AACE,aAAO,CAACF,IAAI,KAAK,MAAT,GAAkB,QAAlB,GAA6B,EAA9B,IAAoCD,MAAM,CAACG,IAAlD;;AAEF,SAAK,GAAL;AACE,aAAO,aAAaH,MAAM,CAACG,IAA3B;;AAEF,SAAK,GAAL;AACE,aAAO,aAAaH,MAAM,CAACG,IAA3B;;AAEF,SAAK,GAAL;AACE,aAAO,UAAUH,MAAM,CAACG,IAAxB;;AAEF,SAAK,OAAL;AACE,aAAO,aAAaH,MAAM,CAACG,IAA3B;;AAEF,SAAK,KAAL;AACE,aAAO,eAAeH,MAAM,CAACG,IAA7B;;AAEF,SAAK,IAAL;AACE,aAAO,CAACF,IAAI,KAAK,QAAT,GAAoB,QAApB,GAA+B,EAAhC,IAAsCD,MAAM,CAACG,IAApD;;AAEF,SAAK,IAAL;AACE,aAAO,aAAaH,MAAM,CAACG,IAA3B;;AAEF,SAAK,OAAL;AACE,aAAO,cAAcH,MAAM,CAACG,IAA5B;;AAEF,SAAK,QAAL;AACE,aAAO,YAAYH,MAAM,CAACG,IAA1B;;AAEF,SAAK,KAAL;AACE,aAAO,SAASH,MAAM,CAACG,IAAvB;;AAEF,SAAK,MAAL;AACE,aAAOH,MAAM,CAACG,IAAP,GAAc,UAArB;;AAEF,SAAK,KAAL;AACE,aAAOH,MAAM,CAACG,IAAP,GAAc,WAArB,CA/CJ;;;AAkDA,SAAOH,MAAM,CAACG,IAAd;AACD","sourcesContent":["// @flow\r\n\r\nimport type { Place, PlaceDescription } from './Types';\r\n\r\nexport function placeName(region: PlaceDescription, _for: ?Place = null) {\r\n switch (region.abbreviation) {\r\n case 'обл':\r\n return region.name + ' область';\r\n\r\n case 'край':\r\n return region.name + ' край';\r\n\r\n case 'р-н':\r\n return (_for !== 'district' ? 'район ' : '') + region.name;\r\n\r\n case 'г':\r\n return (_for !== 'city' ? 'город ' : '') + region.name;\r\n\r\n case 'д':\r\n return 'деревня ' + region.name;\r\n\r\n case 'п':\r\n return 'поселок ' + region.name;\r\n\r\n case 'с':\r\n return 'село ' + region.name;\r\n\r\n case 'ст-ца':\r\n return 'станица ' + region.name;\r\n\r\n case 'с/с':\r\n return 'сельсовет ' + region.name;\r\n\r\n case 'ул':\r\n return (_for !== 'street' ? 'улица ' : '') + region.name;\r\n\r\n case 'пл':\r\n return 'площадь ' + region.name;\r\n\r\n case 'пр-кт':\r\n return 'проспект ' + region.name;\r\n\r\n case 'проезд':\r\n return 'проезд ' + region.name;\r\n\r\n case 'тер':\r\n return 'тер ' + region.name;\r\n\r\n case 'кв-л':\r\n return region.name + ' квартал';\r\n\r\n case 'пер':\r\n return region.name + ' переулок';\r\n }\r\n\r\n return region.name;\r\n}\r\n"]}
1
+ {"version":3,"sources":["util.js"],"names":["placeName","region","_for","abbreviation","name"],"mappings":";;;;AAIO,SAASA,SAAT,CAAmBC,MAAnB,EAA6CC,IAA7C,EAAkE,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ceDescription } from './Types';\n\nexport function placeName(region: PlaceDescription, _for: ?Place = null) {\n switch (region.abbreviation) {\n case 'обл':\n return region.name + ' область';\n\n case 'край':\n return region.name + ' край';\n\n case 'р-н':\n return (_for !== 'district' ? 'район ' : '') + region.name;\n\n case 'г':\n return (_for !== 'city' ? 'город ' : '') + region.name;\n\n case 'д':\n return 'деревня ' + region.name;\n\n case 'п':\n return 'поселок ' + region.name;\n\n case 'с':\n return 'село ' + region.name;\n\n case 'ст-ца':\n return 'станица ' + region.name;\n\n case 'с/с':\n return 'сельсовет ' + region.name;\n\n case 'ул':\n return (_for !== 'street' ? 'улица ' : '') + region.name;\n\n case 'пл':\n return 'площадь ' + region.name;\n\n case 'пр-кт':\n return 'проспект ' + region.name;\n\n case 'проезд':\n return 'проезд ' + region.name;\n\n case 'тер':\n return 'тер ' + region.name;\n\n case 'кв-л':\n return region.name + ' квартал';\n\n case 'пер':\n return region.name + ' переулок';\n }\n\n return region.name;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Place, PlaceDescription } from './Types';
2
- import { Nullable } from '../../typings/utility-types';
3
-
4
- export declare function placeName(region: PlaceDescription, _for?: Nullable<Place>): string;
1
+ import { Place, PlaceDescription } from './Types';
2
+ import { Nullable } from '../../typings/utility-types';
3
+
4
+ export declare function placeName(region: PlaceDescription, _for?: Nullable<Place>): string;
@@ -1,4 +1,4 @@
1
- /* @flow */
2
- import type { Place, PlaceDescription } from './Types';
3
-
4
- declare export function placeName(region: PlaceDescription, _for?: ?Place): string;
1
+ /* @flow */
2
+ import type { Place, PlaceDescription } from './Types';
3
+
4
+ declare export function placeName(region: PlaceDescription, _for?: ?Place): string;
@@ -1,4 +1,4 @@
1
- /* @flow */
2
- import Link from './Link.js';
3
-
4
- export default Link;
1
+ /* @flow */
2
+ import Link from './Link.js';
3
+
4
+ export default Link;
@@ -1,25 +1,25 @@
1
- /* @flow */
2
- import type { MouseEventHandler } from '../eventHandlers';
3
-
4
- export type LinkProps = {
5
- disabled?: boolean,
6
- href?: string,
7
- // eslint-disable-next-line flowtype/no-weak-types
8
- icon?: React$Element<any>,
9
- use?: 'default' | 'success' | 'danger' | 'grayed',
10
- _button?: boolean,
11
- _buttonOpened?: boolean,
12
- tabIndex?: number,
13
- onClick?: MouseEventHandler<HTMLAnchorElement>,
14
- };
15
-
16
- export type LinkState = {|
17
- focusedByTab: boolean,
18
- |};
19
-
20
- declare class Link extends React$Component<LinkProps, LinkState> {
21
- // eslint-disable-next-line flowtype/no-weak-types
22
- static __ADAPTER__: any;
23
- }
24
-
25
- export default Link;
1
+ /* @flow */
2
+ import type { MouseEventHandler } from '../eventHandlers';
3
+
4
+ export type LinkProps = {
5
+ disabled?: boolean,
6
+ href?: string,
7
+ // eslint-disable-next-line flowtype/no-weak-types
8
+ icon?: React$Element<any>,
9
+ use?: 'default' | 'success' | 'danger' | 'grayed',
10
+ _button?: boolean,
11
+ _buttonOpened?: boolean,
12
+ tabIndex?: number,
13
+ onClick?: MouseEventHandler<HTMLAnchorElement>,
14
+ };
15
+
16
+ export type LinkState = {|
17
+ focusedByTab: boolean,
18
+ |};
19
+
20
+ declare class Link extends React$Component<LinkProps, LinkState> {
21
+ // eslint-disable-next-line flowtype/no-weak-types
22
+ static __ADAPTER__: any;
23
+ }
24
+
25
+ export default Link;
@@ -1,11 +1,11 @@
1
- ```js
2
- const { default: Gapped } = require('../Gapped');
3
-
4
- <Gapped>
5
- <Link>Enabled</Link>
6
- <Link use="success">Success</Link>
7
- <Link use="danger">Danger</Link>
8
- <Link use="grayed">Grayed</Link>
9
- <Link disabled>Disabled</Link>
10
- </Gapped>;
11
- ```
1
+ ```js
2
+ const { default: Gapped } = require('../Gapped');
3
+
4
+ <Gapped>
5
+ <Link>Enabled</Link>
6
+ <Link use="success">Success</Link>
7
+ <Link use="danger">Danger</Link>
8
+ <Link use="grayed">Grayed</Link>
9
+ <Link disabled>Disabled</Link>
10
+ </Gapped>;
11
+ ```
@@ -1,2 +1,2 @@
1
- /* @flow */
2
- export { default, LinkProps, LinkState } from './Link';
1
+ /* @flow */
2
+ export { default, LinkProps, LinkState } from './Link';
@@ -1,20 +1,20 @@
1
- /* @flow */
2
- import * as CSS from 'csstype';
3
- import type { SpinnerProps } from '../Spinner';
4
-
5
- export type LoaderProps = {|
6
- children?: React$Node,
7
- active: boolean,
8
- caption?: $PropertyType<SpinnerProps, 'caption'>,
9
- className?: string,
10
- type?: 'mini' | 'normal' | 'big',
11
- |};
12
-
13
- export type LoaderState = {|
14
- isStickySpinner: boolean,
15
- spinnerStyle?: CSS.Properties<string | number>,
16
- |};
17
-
18
- declare class Loader extends React$Component<LoaderProps, LoaderState> {}
19
-
20
- export default Loader;
1
+ /* @flow */
2
+ import * as CSS from 'csstype';
3
+ import type { SpinnerProps } from '../Spinner';
4
+
5
+ export type LoaderProps = {|
6
+ children?: React$Node,
7
+ active: boolean,
8
+ caption?: $PropertyType<SpinnerProps, 'caption'>,
9
+ className?: string,
10
+ type?: 'mini' | 'normal' | 'big',
11
+ |};
12
+
13
+ export type LoaderState = {|
14
+ isStickySpinner: boolean,
15
+ spinnerStyle?: CSS.Properties<string | number>,
16
+ |};
17
+
18
+ declare class Loader extends React$Component<LoaderProps, LoaderState> {}
19
+
20
+ export default Loader;
@@ -1,25 +1,25 @@
1
- ```js
2
- <Loader type="big" active>
3
- <h1>Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."</h1>
4
- <p>
5
- No, I'm Santa Claus! I guess if you want children beaten, you have to do it yourself. We're also Santa Claus! Leela,
6
- Bender, we're going grave robbing.
7
- </p>
8
- <p>
9
- Are you crazy? I can't swallow that. Large bet on myself in round one. Hey, whatcha watching?
10
- <strong> Moving along… I guess if you want children beaten, you have to do it yourself.</strong>
11
- <em>It's okay, Bender.</em> I like cooking too.
12
- </p>
13
- <h2>Oh, I think we should just stay friends.</h2>
14
- <p>
15
- No argument here. And when we woke up, we had these bodies. You guys go on without me! I'm going to go… look for
16
- more stuff to steal! Oh, how awful. Did he at least die painlessly? …To shreds, you say. Well, how is his wife
17
- holding up? …To shreds, you say.
18
- </p>
19
- <ol>
20
- <li>No! The kind with looting and maybe starting a few fires!</li>
21
- <li>You are the last hope of the universe.</li>
22
- <li>Hey, guess what you're accessories to.</li>
23
- </ol>
24
- </Loader>
25
- ```
1
+ ```js
2
+ <Loader type="big" active>
3
+ <h1>Yeah, and if you were the pope they'd be all, "Straighten your pope hat." And "Put on your good vestments."</h1>
4
+ <p>
5
+ No, I'm Santa Claus! I guess if you want children beaten, you have to do it yourself. We're also Santa Claus! Leela,
6
+ Bender, we're going grave robbing.
7
+ </p>
8
+ <p>
9
+ Are you crazy? I can't swallow that. Large bet on myself in round one. Hey, whatcha watching?
10
+ <strong> Moving along… I guess if you want children beaten, you have to do it yourself.</strong>
11
+ <em>It's okay, Bender.</em> I like cooking too.
12
+ </p>
13
+ <h2>Oh, I think we should just stay friends.</h2>
14
+ <p>
15
+ No argument here. And when we woke up, we had these bodies. You guys go on without me! I'm going to go… look for
16
+ more stuff to steal! Oh, how awful. Did he at least die painlessly? …To shreds, you say. Well, how is his wife
17
+ holding up? …To shreds, you say.
18
+ </p>
19
+ <ol>
20
+ <li>No! The kind with looting and maybe starting a few fires!</li>
21
+ <li>You are the last hope of the universe.</li>
22
+ <li>Hey, guess what you're accessories to.</li>
23
+ </ol>
24
+ </Loader>
25
+ ```
@@ -1,2 +1,2 @@
1
- /* @flow */
2
- export { default, LoaderProps } from './Loader';
1
+ /* @flow */
2
+ export { default, LoaderProps } from './Loader';
@@ -1,21 +1,21 @@
1
- /* @flow */
2
-
3
- type LogotypeLocale = {|
4
- suffix: string,
5
- prefix: string,
6
- |};
7
-
8
- export type LogotypeProps = {|
9
- color?: string,
10
- // eslint-disable-next-line flowtype/no-weak-types
11
- component?: React$ComponentType<any> | string,
12
- href?: string,
13
- suffix?: string,
14
- textColor?: string,
15
- withWidget?: boolean,
16
- locale?: LogotypeLocale,
17
- |};
18
-
19
- declare class Logotype extends React$Component<LogotypeProps> {}
20
-
21
- export default Logotype;
1
+ /* @flow */
2
+
3
+ type LogotypeLocale = {|
4
+ suffix: string,
5
+ prefix: string,
6
+ |};
7
+
8
+ export type LogotypeProps = {|
9
+ color?: string,
10
+ // eslint-disable-next-line flowtype/no-weak-types
11
+ component?: React$ComponentType<any> | string,
12
+ href?: string,
13
+ suffix?: string,
14
+ textColor?: string,
15
+ withWidget?: boolean,
16
+ locale?: LogotypeLocale,
17
+ |};
18
+
19
+ declare class Logotype extends React$Component<LogotypeProps> {}
20
+
21
+ export default Logotype;
@@ -1,7 +1,7 @@
1
- /* @flow */
2
-
3
- declare var _default: {|
4
- init(): void,
5
- |};
6
-
7
- export default _default;
1
+ /* @flow */
2
+
3
+ declare var _default: {|
4
+ init(): void,
5
+ |};
6
+
7
+ export default _default;
@@ -1,32 +1,32 @@
1
- ```js
2
- const { default: Gapped } = require('../Gapped');
3
- <Gapped vertical>
4
- <Logotype suffix="edi" color="#1E79BE" />
5
- <Logotype suffix="бухгалтерия" color="#A23A99" />
6
- <Logotype suffix="диадок" color="#1fab90" />
7
- <Logotype suffix="экстерн" color="#F15600" />
8
- <Logotype suffix="фокус" color="#56916E" />
9
- <div style={{ background: '#56916E' }}>
10
- <Logotype suffix="фокус" color="#FFF" textColor="#FFF" />
11
- </div>
12
- </Gapped>;
13
- ```
14
-
15
- #### Локали по умолчанию (см. `LocaleProvider`)
16
-
17
- ```typescript
18
- interface LogotypeLocale {
19
- suffix?: string;
20
- prefix?: string;
21
- }
22
-
23
- const ru_RU = {
24
- prefix: 'к',
25
- suffix: 'нтур',
26
- };
27
-
28
- const en_GB = {
29
- prefix: 'k',
30
- suffix: 'ntur',
31
- };
32
- ```
1
+ ```js
2
+ const { default: Gapped } = require('../Gapped');
3
+ <Gapped vertical>
4
+ <Logotype suffix="edi" color="#1E79BE" />
5
+ <Logotype suffix="бухгалтерия" color="#A23A99" />
6
+ <Logotype suffix="диадок" color="#1fab90" />
7
+ <Logotype suffix="экстерн" color="#F15600" />
8
+ <Logotype suffix="фокус" color="#56916E" />
9
+ <div style={{ background: '#56916E' }}>
10
+ <Logotype suffix="фокус" color="#FFF" textColor="#FFF" />
11
+ </div>
12
+ </Gapped>;
13
+ ```
14
+
15
+ #### Локали по умолчанию (см. `LocaleProvider`)
16
+
17
+ ```typescript
18
+ interface LogotypeLocale {
19
+ suffix?: string;
20
+ prefix?: string;
21
+ }
22
+
23
+ const ru_RU = {
24
+ prefix: 'к',
25
+ suffix: 'нтур',
26
+ };
27
+
28
+ const en_GB = {
29
+ prefix: 'k',
30
+ suffix: 'ntur',
31
+ };
32
+ ```
@@ -1,2 +1,2 @@
1
- /* @flow */
2
- export { default, LogotypeProps } from './Logotype';
1
+ /* @flow */
2
+ export { default, LogotypeProps } from './Logotype';
@@ -1,24 +1,24 @@
1
- /* @flow */
2
-
3
- type MenuProps = {|
4
- children: React$Node,
5
- hasShadow?: boolean,
6
- maxHeight?: number | string,
7
- onItemClick?: () => void,
8
- width?: number | string,
9
- preventWindowScroll?: boolean,
10
- |};
11
-
12
- type MenuState = {|
13
- highlightedIndex: number,
14
- |};
15
-
16
- declare class Menu extends React$Component<MenuProps, MenuState> {
17
- up(): void;
18
- down(): void;
19
- enter(event: SyntheticEvent<HTMLElement>): boolean;
20
- reset(): void;
21
- highlightItem(index: number): void;
22
- }
23
-
24
- export default Menu;
1
+ /* @flow */
2
+
3
+ type MenuProps = {|
4
+ children: React$Node,
5
+ hasShadow?: boolean,
6
+ maxHeight?: number | string,
7
+ onItemClick?: () => void,
8
+ width?: number | string,
9
+ preventWindowScroll?: boolean,
10
+ |};
11
+
12
+ type MenuState = {|
13
+ highlightedIndex: number,
14
+ |};
15
+
16
+ declare class Menu extends React$Component<MenuProps, MenuState> {
17
+ up(): void;
18
+ down(): void;
19
+ enter(event: SyntheticEvent<HTMLElement>): boolean;
20
+ reset(): void;
21
+ highlightItem(index: number): void;
22
+ }
23
+
24
+ export default Menu;
@@ -1,7 +1,7 @@
1
- /* @flow */
2
- // eslint-disable-next-line no-unused-vars
3
- import MenuItem from '../MenuItem/MenuItem';
4
-
5
- declare function isActiveElement(arg: mixed): boolean %checks(arg instanceof MenuItem);
6
-
7
- export default isActiveElement;
1
+ /* @flow */
2
+ // eslint-disable-next-line no-unused-vars
3
+ import MenuItem from '../MenuItem/MenuItem';
4
+
5
+ declare function isActiveElement(arg: mixed): boolean %checks(arg instanceof MenuItem);
6
+
7
+ export default isActiveElement;