@consta/uikit 3.24.5 → 3.26.1

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 (428) hide show
  1. package/Attach/package.json +1 -1
  2. package/Attachment/package.json +1 -1
  3. package/Avatar/package.json +1 -1
  4. package/Badge/package.json +1 -1
  5. package/BasicSelectDeprecated/package.json +1 -1
  6. package/Breadcrumbs/package.json +1 -1
  7. package/BreadcrumbsCanary/package.json +1 -1
  8. package/Button/package.json +1 -1
  9. package/CHANGELOG.md +45 -35
  10. package/Calendar/package.json +1 -1
  11. package/Card/package.json +1 -1
  12. package/Checkbox/package.json +1 -1
  13. package/CheckboxGroup/package.json +1 -1
  14. package/CheckboxGroupCanary/package.json +1 -1
  15. package/ChoiceGroup/package.json +1 -1
  16. package/ChoiceGroupCanary/package.json +1 -1
  17. package/Collapse/package.json +1 -1
  18. package/CollapseGroup/package.json +1 -1
  19. package/Combobox/package.json +1 -1
  20. package/ComboboxDeprecated/package.json +1 -1
  21. package/ContextMenu/package.json +1 -1
  22. package/ContextMenuCanary/package.json +1 -1
  23. package/DatePickerCanary/package.json +1 -1
  24. package/DateTimeCanary/package.json +1 -1
  25. package/DragNDropField/package.json +1 -1
  26. package/EventInterceptor/package.json +1 -1
  27. package/FieldCaption/package.json +1 -1
  28. package/FieldGroup/es.js +1 -0
  29. package/FieldGroup/index.d.ts +1 -0
  30. package/FieldGroup/index.js +4 -0
  31. package/FieldGroup/package.json +9 -0
  32. package/FieldLabel/package.json +1 -1
  33. package/File/package.json +1 -1
  34. package/FileField/package.json +1 -1
  35. package/FileIcon/package.json +1 -1
  36. package/FileIconAvi/package.json +1 -1
  37. package/FileIconBmp/package.json +1 -1
  38. package/FileIconCsv/package.json +1 -1
  39. package/FileIconDoc/package.json +1 -1
  40. package/FileIconExe/package.json +1 -1
  41. package/FileIconGif/package.json +1 -1
  42. package/FileIconJpg/package.json +1 -1
  43. package/FileIconJson/package.json +1 -1
  44. package/FileIconLoading/package.json +1 -1
  45. package/FileIconMov/package.json +1 -1
  46. package/FileIconMp3/package.json +1 -1
  47. package/FileIconMp4/package.json +1 -1
  48. package/FileIconPdf/package.json +1 -1
  49. package/FileIconPng/package.json +1 -1
  50. package/FileIconPpt/package.json +1 -1
  51. package/FileIconRar/package.json +1 -1
  52. package/FileIconRtf/package.json +1 -1
  53. package/FileIconTiff/package.json +1 -1
  54. package/FileIconTxt/package.json +1 -1
  55. package/FileIconUndefined/package.json +1 -1
  56. package/FileIconWav/package.json +1 -1
  57. package/FileIconXls/package.json +1 -1
  58. package/FileIconZip/package.json +1 -1
  59. package/Grid/package.json +1 -1
  60. package/Header/package.json +1 -1
  61. package/Icon/package.json +1 -1
  62. package/IconAdd/package.json +1 -1
  63. package/IconAddToComparison/package.json +1 -1
  64. package/IconAlert/package.json +1 -1
  65. package/IconAlignBlocksLeft/package.json +1 -1
  66. package/IconAlignBlocksRight/package.json +1 -1
  67. package/IconAlignCenter/package.json +1 -1
  68. package/IconAlignJustify/package.json +1 -1
  69. package/IconAlignLeft/package.json +1 -1
  70. package/IconAlignRight/package.json +1 -1
  71. package/IconAllDone/package.json +1 -1
  72. package/IconArrowDown/package.json +1 -1
  73. package/IconArrowLeft/package.json +1 -1
  74. package/IconArrowRight/package.json +1 -1
  75. package/IconArrowUp/package.json +1 -1
  76. package/IconArtBrush/package.json +1 -1
  77. package/IconAttach/package.json +1 -1
  78. package/IconBackward/package.json +1 -1
  79. package/IconBag/package.json +1 -1
  80. package/IconBarrier/package.json +1 -1
  81. package/IconBento/package.json +1 -1
  82. package/IconBold/package.json +1 -1
  83. package/IconBook/package.json +1 -1
  84. package/IconBookmarkFilled/package.json +1 -1
  85. package/IconBookmarkStroked/package.json +1 -1
  86. package/IconCalculator/package.json +1 -1
  87. package/IconCalendar/package.json +1 -1
  88. package/IconCamera/package.json +1 -1
  89. package/IconCancel/package.json +1 -1
  90. package/IconCards/package.json +1 -1
  91. package/IconChat/package.json +1 -1
  92. package/IconCheck/package.json +1 -1
  93. package/IconClose/package.json +1 -1
  94. package/IconCollapse/package.json +1 -1
  95. package/IconColorFill/package.json +1 -1
  96. package/IconColorText/package.json +1 -1
  97. package/IconColumns/package.json +1 -1
  98. package/IconComment/package.json +1 -1
  99. package/IconConnection/package.json +1 -1
  100. package/IconCopy/package.json +1 -1
  101. package/IconCrown/package.json +1 -1
  102. package/IconCursorMouse/package.json +1 -1
  103. package/IconDataNull/package.json +1 -1
  104. package/IconDiamond/package.json +1 -1
  105. package/IconDinosaur/package.json +1 -1
  106. package/IconDisconnection/package.json +1 -1
  107. package/IconDocAdd/package.json +1 -1
  108. package/IconDocBlank/package.json +1 -1
  109. package/IconDocDelete/package.json +1 -1
  110. package/IconDocExport/package.json +1 -1
  111. package/IconDocFilled/package.json +1 -1
  112. package/IconDown/package.json +1 -1
  113. package/IconDownload/package.json +1 -1
  114. package/IconDrag/package.json +1 -1
  115. package/IconDraggable/package.json +1 -1
  116. package/IconDrillingRig/package.json +1 -1
  117. package/IconDrop/package.json +1 -1
  118. package/IconEdit/package.json +1 -1
  119. package/IconExit/package.json +1 -1
  120. package/IconExpand/package.json +1 -1
  121. package/IconEye/package.json +1 -1
  122. package/IconEyeClose/package.json +1 -1
  123. package/IconFacebook/package.json +1 -1
  124. package/IconFavorite/package.json +1 -1
  125. package/IconFilter/package.json +1 -1
  126. package/IconFitToDefault/package.json +1 -1
  127. package/IconFlagFilled/package.json +1 -1
  128. package/IconFlagStroked/package.json +1 -1
  129. package/IconFolders/package.json +1 -1
  130. package/IconForward/package.json +1 -1
  131. package/IconFunnel/package.json +1 -1
  132. package/IconGas/package.json +1 -1
  133. package/IconGeo/package.json +1 -1
  134. package/IconGrouping/package.json +1 -1
  135. package/IconHamburger/package.json +1 -1
  136. package/IconHand/package.json +1 -1
  137. package/IconHealth/package.json +1 -1
  138. package/IconHome/package.json +1 -1
  139. package/IconInComparison/package.json +1 -1
  140. package/IconInfo/package.json +1 -1
  141. package/IconInstagram/package.json +1 -1
  142. package/IconIntroduction/package.json +1 -1
  143. package/IconIpad/package.json +1 -1
  144. package/IconItalic/package.json +1 -1
  145. package/IconKebab/package.json +1 -1
  146. package/IconLaptop/package.json +1 -1
  147. package/IconLayers/package.json +1 -1
  148. package/IconLeaf/package.json +1 -1
  149. package/IconLightningBolt/package.json +1 -1
  150. package/IconLineAndBarChart/package.json +1 -1
  151. package/IconLink/package.json +1 -1
  152. package/IconList/package.json +1 -1
  153. package/IconListNumbered/package.json +1 -1
  154. package/IconLock/package.json +1 -1
  155. package/IconLogicalElement/package.json +1 -1
  156. package/IconMBU/package.json +1 -1
  157. package/IconMGRP/package.json +1 -1
  158. package/IconMLSP/package.json +1 -1
  159. package/IconMMP/package.json +1 -1
  160. package/IconMail/package.json +1 -1
  161. package/IconMap/package.json +1 -1
  162. package/IconMaxHeight/package.json +1 -1
  163. package/IconMaxWidth/package.json +1 -1
  164. package/IconMeatball/package.json +1 -1
  165. package/IconMic/package.json +1 -1
  166. package/IconMolecules/package.json +1 -1
  167. package/IconMoon/package.json +1 -1
  168. package/IconNodeEnd/package.json +1 -1
  169. package/IconNodeStart/package.json +1 -1
  170. package/IconNodeStep/package.json +1 -1
  171. package/IconNodes/package.json +1 -1
  172. package/IconOpenInNew/package.json +1 -1
  173. package/IconOperators/package.json +1 -1
  174. package/IconPanelBottom/package.json +1 -1
  175. package/IconPanelLeft/package.json +1 -1
  176. package/IconPanelRight/package.json +1 -1
  177. package/IconPanelTop/package.json +1 -1
  178. package/IconPaste/package.json +1 -1
  179. package/IconPause/package.json +1 -1
  180. package/IconPhone/package.json +1 -1
  181. package/IconPhoto/package.json +1 -1
  182. package/IconPicture/package.json +1 -1
  183. package/IconPlay/package.json +1 -1
  184. package/IconPressure/package.json +1 -1
  185. package/IconPriceLabel/package.json +1 -1
  186. package/IconProcessing/package.json +1 -1
  187. package/IconQuestion/package.json +1 -1
  188. package/IconQuote/package.json +1 -1
  189. package/IconRUO/package.json +1 -1
  190. package/IconRUS/package.json +1 -1
  191. package/IconRecord/package.json +1 -1
  192. package/IconRemove/package.json +1 -1
  193. package/IconRemoveFromComparison/package.json +1 -1
  194. package/IconReply/package.json +1 -1
  195. package/IconResize/package.json +1 -1
  196. package/IconRestart/package.json +1 -1
  197. package/IconRevert/package.json +1 -1
  198. package/IconRing/package.json +1 -1
  199. package/IconRouble/package.json +1 -1
  200. package/IconRuler/package.json +1 -1
  201. package/IconSave/package.json +1 -1
  202. package/IconScreen/package.json +1 -1
  203. package/IconSearch/package.json +1 -1
  204. package/IconSelect/package.json +1 -1
  205. package/IconSelectOpen/package.json +1 -1
  206. package/IconSendMessage/package.json +1 -1
  207. package/IconSettings/package.json +1 -1
  208. package/IconShape/package.json +1 -1
  209. package/IconShuffle/package.json +1 -1
  210. package/IconSmile/package.json +1 -1
  211. package/IconSortDown/package.json +1 -1
  212. package/IconSortDownCenter/package.json +1 -1
  213. package/IconSortUp/package.json +1 -1
  214. package/IconSortUpCenter/package.json +1 -1
  215. package/IconStop/package.json +1 -1
  216. package/IconStorage/package.json +1 -1
  217. package/IconStrikethrough/package.json +1 -1
  218. package/IconSun/package.json +1 -1
  219. package/IconTable/package.json +1 -1
  220. package/IconTable2/package.json +1 -1
  221. package/IconTarget/package.json +1 -1
  222. package/IconTeam/package.json +1 -1
  223. package/IconTechResponse/package.json +1 -1
  224. package/IconTest/package.json +1 -1
  225. package/IconThumbUp/package.json +1 -1
  226. package/IconTie/package.json +1 -1
  227. package/IconTop/package.json +1 -1
  228. package/IconTrash/package.json +1 -1
  229. package/IconType/package.json +1 -1
  230. package/IconUnderline/package.json +1 -1
  231. package/IconUnlock/package.json +1 -1
  232. package/IconUnsort/package.json +1 -1
  233. package/IconUnsortCenter/package.json +1 -1
  234. package/IconUpload/package.json +1 -1
  235. package/IconUser/package.json +1 -1
  236. package/IconVZD/package.json +1 -1
  237. package/IconVideo/package.json +1 -1
  238. package/IconVkontakte/package.json +1 -1
  239. package/IconWarning/package.json +1 -1
  240. package/IconWatch/package.json +1 -1
  241. package/IconWideScreen/package.json +1 -1
  242. package/IconWorld/package.json +1 -1
  243. package/IconWrench/package.json +1 -1
  244. package/IconYandexDzen/package.json +1 -1
  245. package/IconYoutube/package.json +1 -1
  246. package/Informer/package.json +1 -1
  247. package/LayoutCanary/package.json +1 -1
  248. package/Loader/package.json +1 -1
  249. package/MixCard/package.json +1 -1
  250. package/MixFocus/package.json +1 -1
  251. package/MixPopoverAnimate/package.json +1 -1
  252. package/MixPopoverArrow/package.json +1 -1
  253. package/MixSpace/package.json +1 -1
  254. package/MixVisuallyHidden/package.json +1 -1
  255. package/Modal/package.json +1 -1
  256. package/MultiComboboxDeprecated/package.json +1 -1
  257. package/Pagination/package.json +1 -1
  258. package/Popover/package.json +1 -1
  259. package/PortalWithTheme/package.json +1 -1
  260. package/ProgressLine/es.js +1 -0
  261. package/ProgressLine/index.d.ts +1 -0
  262. package/ProgressLine/index.js +4 -0
  263. package/ProgressLine/package.json +9 -0
  264. package/ProgressSpin/package.json +1 -1
  265. package/ProgressStepBarCanary/package.json +1 -1
  266. package/Radio/package.json +1 -1
  267. package/RadioGroup/package.json +1 -1
  268. package/Responses/package.json +1 -1
  269. package/Responses403/package.json +1 -1
  270. package/Responses404/package.json +1 -1
  271. package/Responses500/package.json +1 -1
  272. package/Responses503/package.json +1 -1
  273. package/ResponsesConnectionError/package.json +1 -1
  274. package/ResponsesDeleted/package.json +1 -1
  275. package/ResponsesEmptyBox/package.json +1 -1
  276. package/ResponsesEmptyPockets/package.json +1 -1
  277. package/ResponsesExit/package.json +1 -1
  278. package/ResponsesImage/package.json +1 -1
  279. package/ResponsesImage403/package.json +1 -1
  280. package/ResponsesImage404/package.json +1 -1
  281. package/ResponsesImage500/package.json +1 -1
  282. package/ResponsesImage503/package.json +1 -1
  283. package/ResponsesImageConnectionError/package.json +1 -1
  284. package/ResponsesImageDeleted/package.json +1 -1
  285. package/ResponsesImageEmptyBox/package.json +1 -1
  286. package/ResponsesImageEmptyPockets/package.json +1 -1
  287. package/ResponsesImageNothingFound/package.json +1 -1
  288. package/ResponsesImageSuccess/package.json +1 -1
  289. package/ResponsesNothingFound/package.json +1 -1
  290. package/ResponsesSuccess/package.json +1 -1
  291. package/Select/package.json +1 -1
  292. package/Sidebar/package.json +1 -1
  293. package/Skeleton/package.json +1 -1
  294. package/SliderCanary/package.json +1 -1
  295. package/SnackBar/package.json +1 -1
  296. package/Steps/package.json +1 -1
  297. package/StepsCanary/package.json +1 -1
  298. package/Switch/package.json +1 -1
  299. package/SwitchGroup/package.json +1 -1
  300. package/SwitchGroupCanary/package.json +1 -1
  301. package/Table/package.json +1 -1
  302. package/Tabs/package.json +1 -1
  303. package/TabsCanary/package.json +1 -1
  304. package/Tag/package.json +1 -1
  305. package/TagBase/package.json +1 -1
  306. package/Text/package.json +1 -1
  307. package/TextField/package.json +1 -1
  308. package/Theme/package.json +1 -1
  309. package/ThemeToggler/package.json +1 -1
  310. package/Timer/package.json +1 -1
  311. package/Tooltip/package.json +1 -1
  312. package/User/package.json +1 -1
  313. package/UserSelect/package.json +1 -1
  314. package/UserSelectDeprecated/package.json +1 -1
  315. package/__internal__/cjs-src/components/Button/Button.d.ts +1 -1
  316. package/__internal__/cjs-src/components/Button/Button.js +17 -1
  317. package/__internal__/cjs-src/components/Card/Card.d.ts +1 -0
  318. package/__internal__/cjs-src/components/Card/Card.js +2 -2
  319. package/__internal__/cjs-src/components/Combobox/Combobox.js +3 -4
  320. package/__internal__/cjs-src/components/Combobox/helpers.d.ts +2 -0
  321. package/__internal__/cjs-src/components/DatePickerCanary/helpers.js +3 -35
  322. package/__internal__/cjs-src/components/DateTimeCanary/DateTimeTypeTime/helpers.js +1 -1
  323. package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +8 -1
  324. package/__internal__/cjs-src/components/FieldGroup/FieldGroup.css +5 -0
  325. package/__internal__/cjs-src/components/FieldGroup/FieldGroup.d.ts +10 -0
  326. package/__internal__/cjs-src/components/FieldGroup/FieldGroup.js +27 -0
  327. package/__internal__/cjs-src/components/FieldGroup/getForm.d.ts +2 -0
  328. package/__internal__/cjs-src/components/FieldGroup/getForm.js +29 -0
  329. package/__internal__/cjs-src/components/FieldGroup/types.d.ts +14 -0
  330. package/__internal__/cjs-src/components/FieldGroup/types.js +2 -0
  331. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.css +67 -0
  332. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.d.ts +3 -0
  333. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.js +27 -0
  334. package/__internal__/cjs-src/components/ProgressLine/types.d.ts +10 -0
  335. package/__internal__/cjs-src/components/ProgressLine/types.js +5 -0
  336. package/__internal__/cjs-src/components/ProgressSpin/ProgressSpin.d.ts +1 -0
  337. package/__internal__/cjs-src/components/ProgressSpin/ProgressSpin.js +2 -1
  338. package/__internal__/cjs-src/components/Select/Select.js +3 -4
  339. package/__internal__/cjs-src/components/Select/helpers.d.ts +2 -0
  340. package/__internal__/cjs-src/components/SelectComponents/helpers.d.ts +0 -3
  341. package/__internal__/cjs-src/components/SelectComponents/helpers.js +1 -20
  342. package/__internal__/cjs-src/components/Sidebar/Sidebar.js +2 -2
  343. package/__internal__/cjs-src/components/SliderCanary/SliderCanary.js +19 -11
  344. package/__internal__/cjs-src/components/SliderCanary/SliderLine/SliderLine.css +2 -2
  345. package/__internal__/cjs-src/components/SliderCanary/SliderPoint/SliderPoint.css +2 -4
  346. package/__internal__/cjs-src/components/SliderCanary/useSlider/helper.d.ts +3 -2
  347. package/__internal__/cjs-src/components/SliderCanary/useSlider/helper.js +37 -14
  348. package/__internal__/cjs-src/components/SliderCanary/useSlider/useSlider.d.ts +1 -0
  349. package/__internal__/cjs-src/components/SliderCanary/useSlider/useSlider.js +32 -4
  350. package/__internal__/cjs-src/components/SliderCanary/useSliderStationing.d.ts +1 -1
  351. package/__internal__/cjs-src/components/SliderCanary/useSliderStationing.js +14 -3
  352. package/__internal__/cjs-src/components/TextField/TextField.js +13 -5
  353. package/__internal__/cjs-src/components/TextField/types.d.ts +7 -0
  354. package/__internal__/cjs-src/components/User/User.css +1 -0
  355. package/__internal__/cjs-src/components/UserSelect/UserSelect.js +3 -4
  356. package/__internal__/cjs-src/components/UserSelect/helpers.d.ts +2 -0
  357. package/__internal__/cjs-src/mixs/MixCard/MixCard.css +4 -0
  358. package/__internal__/cjs-src/mixs/MixCard/MixCard.d.ts +1 -0
  359. package/__internal__/src/components/Button/Button.d.ts +1 -1
  360. package/__internal__/src/components/Button/Button.js +17 -1
  361. package/__internal__/src/components/Card/Card.d.ts +1 -0
  362. package/__internal__/src/components/Card/Card.js +2 -2
  363. package/__internal__/src/components/Combobox/Combobox.js +4 -5
  364. package/__internal__/src/components/Combobox/helpers.d.ts +2 -0
  365. package/__internal__/src/components/DatePickerCanary/helpers.js +3 -35
  366. package/__internal__/src/components/DateTimeCanary/DateTimeTypeTime/helpers.js +1 -1
  367. package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +8 -1
  368. package/__internal__/src/components/FieldGroup/FieldGroup.css +5 -0
  369. package/__internal__/src/components/FieldGroup/FieldGroup.d.ts +10 -0
  370. package/__internal__/src/components/FieldGroup/FieldGroup.js +24 -0
  371. package/__internal__/src/components/FieldGroup/getForm.d.ts +2 -0
  372. package/__internal__/src/components/FieldGroup/getForm.js +26 -0
  373. package/__internal__/src/components/FieldGroup/types.d.ts +14 -0
  374. package/__internal__/src/components/FieldGroup/types.js +0 -0
  375. package/__internal__/src/components/ProgressLine/ProgressLine.css +67 -0
  376. package/__internal__/src/components/ProgressLine/ProgressLine.d.ts +3 -0
  377. package/__internal__/src/components/ProgressLine/ProgressLine.js +24 -0
  378. package/__internal__/src/components/ProgressLine/types.d.ts +10 -0
  379. package/__internal__/src/components/ProgressLine/types.js +2 -0
  380. package/__internal__/src/components/ProgressSpin/ProgressSpin.d.ts +1 -0
  381. package/__internal__/src/components/ProgressSpin/ProgressSpin.js +2 -1
  382. package/__internal__/src/components/Select/Select.js +4 -5
  383. package/__internal__/src/components/Select/helpers.d.ts +2 -0
  384. package/__internal__/src/components/SelectComponents/helpers.d.ts +0 -3
  385. package/__internal__/src/components/SelectComponents/helpers.js +0 -18
  386. package/__internal__/src/components/Sidebar/Sidebar.js +2 -2
  387. package/__internal__/src/components/SliderCanary/SliderCanary.js +19 -11
  388. package/__internal__/src/components/SliderCanary/SliderLine/SliderLine.css +2 -2
  389. package/__internal__/src/components/SliderCanary/SliderPoint/SliderPoint.css +2 -4
  390. package/__internal__/src/components/SliderCanary/useSlider/helper.d.ts +3 -2
  391. package/__internal__/src/components/SliderCanary/useSlider/helper.js +37 -14
  392. package/__internal__/src/components/SliderCanary/useSlider/useSlider.d.ts +1 -0
  393. package/__internal__/src/components/SliderCanary/useSlider/useSlider.js +32 -4
  394. package/__internal__/src/components/SliderCanary/useSliderStationing.d.ts +1 -1
  395. package/__internal__/src/components/SliderCanary/useSliderStationing.js +15 -4
  396. package/__internal__/src/components/TextField/TextField.js +13 -5
  397. package/__internal__/src/components/TextField/types.d.ts +7 -0
  398. package/__internal__/src/components/User/User.css +1 -0
  399. package/__internal__/src/components/UserSelect/UserSelect.js +4 -5
  400. package/__internal__/src/components/UserSelect/helpers.d.ts +2 -0
  401. package/__internal__/src/mixs/MixCard/MixCard.css +4 -0
  402. package/__internal__/src/mixs/MixCard/MixCard.d.ts +1 -0
  403. package/createIcon/package.json +1 -1
  404. package/createResponsesImage/package.json +1 -1
  405. package/package.json +3 -1
  406. package/useBreakpoints/package.json +1 -1
  407. package/useChoiceGroup/package.json +1 -1
  408. package/useChoiceGroupIndexed/package.json +1 -1
  409. package/useClickOutside/package.json +1 -1
  410. package/useComponentSize/package.json +1 -1
  411. package/useDebounce/package.json +1 -1
  412. package/useFlag/package.json +1 -1
  413. package/useForkRef/package.json +1 -1
  414. package/useGlobalKeys/package.json +1 -1
  415. package/useHideElementsInLine/package.json +1 -1
  416. package/useKeys/package.json +1 -1
  417. package/useMutableRef/package.json +1 -1
  418. package/useOverflow/package.json +1 -1
  419. package/usePrevious/package.json +1 -1
  420. package/useRefs/package.json +1 -1
  421. package/useResizeObserved/package.json +1 -1
  422. package/useScrollElements/package.json +1 -1
  423. package/useScrollPosition/package.json +1 -1
  424. package/useSelect/package.json +1 -1
  425. package/useSortSteps/package.json +1 -1
  426. package/useThemeVars/package.json +1 -1
  427. package/useTimer/package.json +1 -1
  428. package/withTooltip/package.json +1 -1
@@ -54,6 +54,7 @@ export declare const useTextFieldEventsHandler: <P extends {
54
54
  width?: "default" | "full" | undefined;
55
55
  onFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
56
56
  onBlur?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
57
+ incrementButtons?: boolean | undefined;
57
58
  autoFocus?: boolean | undefined;
58
59
  placeholder?: string | undefined;
59
60
  leftSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
@@ -81,7 +82,13 @@ export declare const useTextFieldEventsHandler: <P extends {
81
82
  caption?: string | undefined;
82
83
  labelPosition?: "left" | "top" | undefined;
83
84
  focused?: boolean | undefined;
84
- } & Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
85
+ onKeyDownCapture?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
86
+ onKeyPress?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
87
+ onKeyPressCapture?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
88
+ onKeyUp?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
89
+ onKeyUpCapture?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
90
+ onKeyDown?: ((event: React.KeyboardEvent<Element>) => void) | undefined;
91
+ } & Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "slot" | "spellCheck" | "style" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
85
92
  rows?: undefined;
86
93
  minRows?: undefined;
87
94
  maxRows?: undefined;
@@ -0,0 +1,5 @@
1
+ .FieldGroup {
2
+ display: -webkit-box;
3
+ display: -ms-flexbox;
4
+ display: flex;
5
+ }
@@ -0,0 +1,10 @@
1
+ import './FieldGroup.css';
2
+ import React from 'react';
3
+ import { FieldGroupPropChildren } from './types';
4
+ export declare const FieldGroup: React.ForwardRefExoticComponent<{
5
+ children: FieldGroupPropChildren;
6
+ form?: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
7
+ size?: "xs" | "s" | "m" | "l" | undefined;
8
+ } & Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
9
+ export * from './types';
10
+ export * from './getForm';
@@ -0,0 +1,24 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './FieldGroup.css';
3
+ import React, { cloneElement, forwardRef } from 'react';
4
+ import { cn } from '../../utils/bem';
5
+ import { isNotNil } from '../../utils/type-guards';
6
+ import { getForm } from './getForm';
7
+ var cnFieldGroup = cn('FieldGroup');
8
+ var renderChildren = function (children, form, size) {
9
+ if (Array.isArray(children) && children.length) {
10
+ return children.map(function (el, index) {
11
+ if (isNotNil(el)) {
12
+ return cloneElement(el, __assign(__assign({}, el.props), { form: getForm(form, index, children.length), size: size, key: el.key || index }));
13
+ }
14
+ return null;
15
+ });
16
+ }
17
+ return null;
18
+ };
19
+ export var FieldGroup = forwardRef(function (props, ref) {
20
+ var children = props.children, className = props.className, size = props.size, form = props.form, otherProps = __rest(props, ["children", "className", "size", "form"]);
21
+ return (React.createElement("div", __assign({}, otherProps, { className: cnFieldGroup(null, [className]), ref: ref }), renderChildren(children, form, size)));
22
+ });
23
+ export * from './types';
24
+ export * from './getForm';
@@ -0,0 +1,2 @@
1
+ import { FieldGroupPropForm } from './types';
2
+ export declare const getForm: (form: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined, index: number, length: number) => FieldGroupPropForm;
@@ -0,0 +1,26 @@
1
+ var mapForm = {
2
+ "default": ['defaultClear', 'brickDefault'],
3
+ defaultClear: ['defaultClear', 'brickClear'],
4
+ defaultBrick: ['defaultClear', 'brick'],
5
+ brick: ['brickClear', 'brick'],
6
+ brickDefault: ['brickClear', 'brickDefault'],
7
+ brickClear: ['brickClear', 'brickClear'],
8
+ brickRound: ['brickClear', 'brickRound'],
9
+ round: ['roundClear', 'brickRound'],
10
+ roundClear: ['roundClear', 'brickClear'],
11
+ roundBrick: ['roundClear', 'brick'],
12
+ clearRound: ['clearClear', 'brickRound'],
13
+ clearDefault: ['clearClear', 'brickDefault'],
14
+ clearBrick: ['clearClear', 'brick'],
15
+ clearClear: ['clearClear', 'brickClear']
16
+ };
17
+ export var getForm = function (form, index, length) {
18
+ if (form === void 0) { form = 'default'; }
19
+ if (index === 0) {
20
+ return mapForm[form][0];
21
+ }
22
+ if (index === length - 1) {
23
+ return mapForm[form][1];
24
+ }
25
+ return 'brickClear';
26
+ };
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
3
+ export declare type FieldGroupPropForm = 'default' | 'brick' | 'round' | 'brickRound' | 'roundBrick' | 'brickDefault' | 'defaultBrick' | 'defaultClear' | 'brickClear' | 'roundClear' | 'clearRound' | 'clearDefault' | 'clearBrick' | 'clearClear';
4
+ export declare type FieldGroupPropSize = 'm' | 'xs' | 's' | 'l';
5
+ export declare type FieldGroupPropChildren = React.ReactElement<{
6
+ form?: FieldGroupPropForm;
7
+ size?: FieldGroupPropSize;
8
+ className?: string;
9
+ }>[];
10
+ export declare type FieldGroupProps = PropsWithHTMLAttributes<{
11
+ children: FieldGroupPropChildren;
12
+ form?: FieldGroupPropForm;
13
+ size?: FieldGroupPropSize;
14
+ }, HTMLDivElement>;
@@ -0,0 +1,67 @@
1
+ .ProgressLine {
2
+ position: relative;
3
+ overflow-x: hidden;
4
+ width: 100%;
5
+ height: var(--progress-line-height);
6
+ background: var(--color-bg-system);
7
+ }
8
+
9
+ .ProgressLine::after {
10
+ content: '';
11
+ position: absolute;
12
+ top: 0;
13
+ height: 100%;
14
+ background-color: var(--color-bg-brand);
15
+ -webkit-transition: -webkit-transform 0.3s;
16
+ transition: -webkit-transform 0.3s;
17
+ transition: transform 0.3s;
18
+ transition: transform 0.3s, -webkit-transform 0.3s;
19
+ }
20
+
21
+ .ProgressLine_size_s {
22
+ --progress-line-height: var(--space-3xs);
23
+ }
24
+
25
+ .ProgressLine_size_m {
26
+ --progress-line-height: var(--space-2xs);
27
+ }
28
+
29
+ .ProgressLine_mode_determinate::after {
30
+ width: 100%;
31
+ -webkit-transform: scaleX(var(--progress-line-value));
32
+ transform: scaleX(var(--progress-line-value));
33
+ -webkit-transform-origin: left;
34
+ transform-origin: left;
35
+ }
36
+
37
+ .ProgressLine_mode_indeterminate::after {
38
+ width: 80%;
39
+ -webkit-transform-origin: left;
40
+ transform-origin: left;
41
+ -webkit-animation: ProgressLineAnimation 2s linear infinite;
42
+ animation: ProgressLineAnimation 2s linear infinite;
43
+ }
44
+
45
+ @-webkit-keyframes ProgressLineAnimation {
46
+ 0% {
47
+ -webkit-transform: translateX(-100%);
48
+ transform: translateX(-100%);
49
+ }
50
+
51
+ 100% {
52
+ -webkit-transform: translateX(130%);
53
+ transform: translateX(130%);
54
+ }
55
+ }
56
+
57
+ @keyframes ProgressLineAnimation {
58
+ 0% {
59
+ -webkit-transform: translateX(-100%);
60
+ transform: translateX(-100%);
61
+ }
62
+
63
+ 100% {
64
+ -webkit-transform: translateX(130%);
65
+ transform: translateX(130%);
66
+ }
67
+ }
@@ -0,0 +1,3 @@
1
+ import './ProgressLine.css';
2
+ import { ProgressLineComponent } from './types';
3
+ export declare const ProgressLine: ProgressLineComponent;
@@ -0,0 +1,24 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './ProgressLine.css';
3
+ import React, { forwardRef } from 'react';
4
+ import { cn } from '../../utils/bem';
5
+ import { isNumber } from '../../utils/type-guards';
6
+ var cnProgressLine = cn('ProgressLine');
7
+ var getProgress = function (progress) {
8
+ var progressNormal = Math.ceil(progress);
9
+ if (progressNormal >= 100) {
10
+ return 1;
11
+ }
12
+ if (progressNormal <= 0) {
13
+ return 0;
14
+ }
15
+ return progressNormal / 100;
16
+ };
17
+ export var ProgressLine = forwardRef(function (props, ref) {
18
+ var _a;
19
+ var _b = props.size, size = _b === void 0 ? 'm' : _b, value = props.value, style = props.style, otherProps = __rest(props, ["size", "value", "style"]);
20
+ return (React.createElement("div", __assign({}, otherProps, { ref: ref, style: __assign(__assign({}, style), (_a = {}, _a['--progress-line-value'] = "" + getProgress(value !== null && value !== void 0 ? value : 0), _a)), className: cnProgressLine({
21
+ size: size,
22
+ mode: isNumber(value) ? 'determinate' : 'indeterminate'
23
+ }) })));
24
+ });
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
3
+ export declare const progressLinePropSize: readonly ["m", "s"];
4
+ export declare type PropgressLinePropSize = typeof progressLinePropSize[number];
5
+ export declare const defaultProgressLinePropSize: "m";
6
+ export declare type ProgressLineProps = PropsWithHTMLAttributesAndRef<{
7
+ size?: PropgressLinePropSize;
8
+ value?: number;
9
+ }, HTMLDivElement>;
10
+ export declare type ProgressLineComponent = (props: ProgressLineProps) => React.ReactElement | null;
@@ -0,0 +1,2 @@
1
+ export var progressLinePropSize = ['m', 's'];
2
+ export var defaultProgressLinePropSize = progressLinePropSize[0];
@@ -8,6 +8,7 @@ declare type Props = {
8
8
  size?: ProgressSpinPropSize;
9
9
  className?: string;
10
10
  progress?: number;
11
+ value?: number;
11
12
  animation?: boolean;
12
13
  children?: never;
13
14
  };
@@ -29,8 +29,9 @@ function getSvgParamsBySize(size) {
29
29
  return [sizeOfPixels, strokeWidth, radius, strokeDasharray];
30
30
  }
31
31
  export var ProgressSpin = React.forwardRef(function (props, ref) {
32
- var _a = props.size, size = _a === void 0 ? progressSpinPropSizeDefault : _a, progress = props.progress, animation = props.animation, className = props.className, otherProps = __rest(props, ["size", "progress", "animation", "className"]);
32
+ var _a = props.size, size = _a === void 0 ? progressSpinPropSizeDefault : _a, progressProp = props.progress, value = props.value, animation = props.animation, className = props.className, otherProps = __rest(props, ["size", "progress", "value", "animation", "className"]);
33
33
  var _b = __read(useMemo(function () { return getSvgParamsBySize(size); }, [size]), 4), sizeOfPixels = _b[0], strokeWidth = _b[1], radius = _b[2], strokeDasharray = _b[3];
34
+ var progress = value !== null && value !== void 0 ? value : progressProp;
34
35
  var animatedProgress = isNumber(progress) ? progress : 50;
35
36
  var strokeDashoffset = strokeDasharray - (strokeDasharray * animatedProgress) / 100;
36
37
  return (React.createElement("svg", __assign({}, otherProps, { className: cnProgressSpin({ spin: !isNumber(progress) }, [className]), width: sizeOfPixels, height: sizeOfPixels, viewBox: "0 0 " + sizeOfPixels + " " + sizeOfPixels, ref: ref }),
@@ -6,7 +6,7 @@ import { useSelect } from '../../hooks/useSelect/useSelect';
6
6
  import { IconSelect } from '../../icons/IconSelect/IconSelect';
7
7
  import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
8
8
  import { cnSelect, COMPONENT_NAME } from '../SelectComponents/cnSelect';
9
- import { defaultLabelForEmptyItems, getSelectDropdownForm } from '../SelectComponents/helpers';
9
+ import { defaultLabelForEmptyItems } from '../SelectComponents/helpers';
10
10
  import { SelectContainer } from '../SelectComponents/SelectContainer/SelectContainer';
11
11
  import { SelectDropdown } from '../SelectComponents/SelectDropdown/SelectDropdown';
12
12
  import { SelectItem } from '../SelectComponents/SelectItem/SelectItem';
@@ -15,8 +15,8 @@ import { withDefaultGetters, } from './helpers';
15
15
  function SelectRender(props, ref) {
16
16
  var defaultDropdownRef = useRef(null);
17
17
  var controlRef = useRef(null);
18
- var _a = usePropsHandler(COMPONENT_NAME, withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, required = _a.required, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? defaultPropView : _d, _e = _a.size, size = _e === void 0 ? defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemLabel = _a.getItemLabel, _g = _a.labelForEmptyItems, labelForEmptyItems = _g === void 0 ? defaultLabelForEmptyItems : _g, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, isLoading = _a.isLoading, renderValueProp = _a.renderValue, inputRefProp = _a.inputRef, style = _a.style, restProps = __rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "required", "disabled", "ariaLabel", "id", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "labelForEmptyItems", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "isLoading", "renderValue", "inputRef", "style"]);
19
- var _h = useSelect({
18
+ var _a = usePropsHandler(COMPONENT_NAME, withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, required = _a.required, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? defaultPropView : _d, _e = _a.size, size = _e === void 0 ? defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemLabel = _a.getItemLabel, _g = _a.labelForEmptyItems, labelForEmptyItems = _g === void 0 ? defaultLabelForEmptyItems : _g, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, isLoading = _a.isLoading, renderValueProp = _a.renderValue, inputRefProp = _a.inputRef, style = _a.style, _h = _a.dropdownForm, dropdownForm = _h === void 0 ? 'default' : _h, restProps = __rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "required", "disabled", "ariaLabel", "id", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "labelForEmptyItems", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "isLoading", "renderValue", "inputRef", "style", "dropdownForm"]);
19
+ var _j = useSelect({
20
20
  items: items,
21
21
  groups: groups,
22
22
  value: value,
@@ -32,8 +32,7 @@ function SelectRender(props, ref) {
32
32
  multiple: false,
33
33
  onBlur: onBlur,
34
34
  onFocus: onFocus
35
- }), getKeyProps = _h.getKeyProps, getOptionProps = _h.getOptionProps, isOpen = _h.isOpen, visibleItems = _h.visibleItems, isFocused = _h.isFocused, handleInputFocus = _h.handleInputFocus, handleInputBlur = _h.handleInputBlur, handleToggleDropdown = _h.handleToggleDropdown, inputRef = _h.inputRef, handleInputClick = _h.handleInputClick, notFound = _h.notFound, hasItems = _h.hasItems;
36
- var dropdownForm = getSelectDropdownForm(form);
35
+ }), getKeyProps = _j.getKeyProps, getOptionProps = _j.getOptionProps, isOpen = _j.isOpen, visibleItems = _j.visibleItems, isFocused = _j.isFocused, handleInputFocus = _j.handleInputFocus, handleInputBlur = _j.handleInputBlur, handleToggleDropdown = _j.handleToggleDropdown, inputRef = _j.inputRef, handleInputClick = _j.handleInputClick, notFound = _j.notFound, hasItems = _j.hasItems;
37
36
  var renderItemDefault = function (props) {
38
37
  var item = props.item, active = props.active, hovered = props.hovered, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
39
38
  return (React.createElement(SelectItem, { label: getItemLabel(item), active: active, hovered: hovered, multiple: false, size: size, indent: dropdownForm === 'round' ? 'increased' : 'normal', onClick: onClick, onMouseEnter: onMouseEnter, disabled: getItemDisabled(item) }));
@@ -31,6 +31,7 @@ export declare type SelectProps<ITEM = DefaultItem, GROUP = DefaultGroup> = Prop
31
31
  }) => void;
32
32
  disabled?: boolean;
33
33
  form?: PropForm;
34
+ dropdownForm?: 'default' | 'brick' | 'round';
34
35
  size?: PropSize;
35
36
  view?: PropView;
36
37
  status?: PropStatus;
@@ -92,6 +93,7 @@ export declare function withDefaultGetters<ITEM, GROUP>(props: SelectProps<ITEM,
92
93
  }) => void;
93
94
  disabled?: boolean | undefined;
94
95
  form?: "default" | "round" | "brick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
96
+ dropdownForm?: "default" | "round" | "brick" | undefined;
95
97
  size?: "xs" | "s" | "m" | "l" | undefined;
96
98
  view?: "default" | "clear" | undefined;
97
99
  status?: "alert" | "success" | "warning" | undefined;
@@ -1,6 +1,3 @@
1
- import { SelectDropdownPropForm } from './SelectDropdown/SelectDropdown';
2
- import { PropForm } from './types';
3
- export declare function getSelectDropdownForm(form: PropForm): SelectDropdownPropForm;
4
1
  export declare const defaultlabelForNotFound = "\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E";
5
2
  export declare const defaultlabelForCreate = "+";
6
3
  export declare const defaultLabelForEmptyItems = "\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442";
@@ -1,21 +1,3 @@
1
- import { selectDropdownform } from './SelectDropdown/SelectDropdown';
2
- var mapDropdownForms = {
3
- "default": selectDropdownform[0],
4
- brick: selectDropdownform[1],
5
- round: selectDropdownform[2],
6
- clearRound: selectDropdownform[2],
7
- roundClear: selectDropdownform[2],
8
- clearDefault: selectDropdownform[0],
9
- defaultClear: selectDropdownform[0],
10
- defaultBrick: selectDropdownform[0],
11
- brickDefault: selectDropdownform[1],
12
- brickClear: selectDropdownform[1],
13
- clearBrick: selectDropdownform[1],
14
- clearClear: selectDropdownform[0]
15
- };
16
- export function getSelectDropdownForm(form) {
17
- return mapDropdownForms[form];
18
- }
19
1
  export var defaultlabelForNotFound = 'Не найдено';
20
2
  export var defaultlabelForCreate = '+';
21
3
  export var defaultLabelForEmptyItems = 'Список пуст';
@@ -47,8 +47,8 @@ export var Sidebar = function (props) {
47
47
  useGlobalKeys({
48
48
  Escape: function (e) { return isOpen && onEsc && onEsc(e); }
49
49
  });
50
- return (React.createElement(CSSTransition, { "in": isOpen, unmountOnExit: true, className: cnSidebar({ position: position, hasOverlay: hasOverlay }), classNames: cnForCssTransition(cnSidebar), timeout: 240, nodeRef: portalRef },
51
- React.createElement(PortalWithTheme, { preset: theme, ref: portalRef, container: container, className: rootClassName, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex } : undefined },
50
+ return (React.createElement(CSSTransition, { "in": isOpen, unmountOnExit: true, className: cnSidebar({ position: position, hasOverlay: hasOverlay }, [rootClassName]), classNames: cnForCssTransition(cnSidebar), timeout: 240, nodeRef: portalRef },
51
+ React.createElement(PortalWithTheme, { preset: theme, ref: portalRef, container: container, style: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? { zIndex: style.zIndex } : undefined },
52
52
  hasOverlay && React.createElement("div", { className: cnSidebar('Overlay'), "aria-label": "Overlay" }),
53
53
  React.createElement("div", __assign({}, otherProps, { style: __assign(__assign({}, style), { zIndex: undefined }), className: cnSidebar('Window', { size: size, position: position }, [className]), ref: ref }),
54
54
  React.createElement(ContextConsumer, { onClickOutside: onClickOutside || onOverlayClick, ignoreClicksInsideRefs: [ref] }, children)))));
@@ -24,27 +24,35 @@ var sizeMap = {
24
24
  export var COMPONENT_NAME = 'Slider';
25
25
  function SliderRender(props, ref) {
26
26
  var sliderRef = useRef(null);
27
- var _a = usePropsHandler(COMPONENT_NAME, props, sliderRef), _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, onChange = _a.onChange, onAfterChange = _a.onAfterChange, value = _a.value, _d = _a.step, step = _d === void 0 ? 1 : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? defaultPropSize : _f, _g = _a.view, view = _g === void 0 ? 'default' : _g, leftSide = _a.leftSide, rightSide = _a.rightSide, withTooltip = _a.withTooltip, _h = _a.range, range = _h === void 0 ? false : _h, label = _a.label, status = _a.status, caption = _a.caption, _j = _a.tooltipFormatter, tooltipFormatter = _j === void 0 ? defaultTooltipFormatter : _j, className = _a.className, style = _a.style, otherProps = __rest(_a, ["min", "max", "onChange", "onAfterChange", "value", "step", "disabled", "size", "view", "leftSide", "rightSide", "withTooltip", "range", "label", "status", "caption", "tooltipFormatter", "className", "style"]);
28
- var _k = __read(useFlag(false), 2), isHovered = _k[0], _l = _k[1], on = _l.on, off = _l.off;
27
+ var _a = usePropsHandler(COMPONENT_NAME, props, sliderRef), _b = _a.min, min = _b === void 0 ? 0 : _b, _c = _a.max, max = _c === void 0 ? 100 : _c, onChange = _a.onChange, onAfterChange = _a.onAfterChange, value = _a.value, stepProp = _a.step, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? defaultPropSize : _e, _f = _a.view, view = _f === void 0 ? 'default' : _f, leftSide = _a.leftSide, rightSide = _a.rightSide, withTooltip = _a.withTooltip, _g = _a.range, range = _g === void 0 ? false : _g, label = _a.label, status = _a.status, caption = _a.caption, _h = _a.tooltipFormatter, tooltipFormatter = _h === void 0 ? defaultTooltipFormatter : _h, className = _a.className, style = _a.style, otherProps = __rest(_a, ["min", "max", "onChange", "onAfterChange", "value", "step", "disabled", "size", "view", "leftSide", "rightSide", "withTooltip", "range", "label", "status", "caption", "tooltipFormatter", "className", "style"]);
28
+ var _j = __read(useFlag(false), 2), isHovered = _j[0], _k = _j[1], on = _k.on, off = _k.off;
29
29
  var leftButtonRef = useRef(null);
30
30
  var rightButtonRef = useRef(null);
31
- var sortedSteps = useSortSteps({ step: step, min: min, max: max });
31
+ var sortedSteps = useSortSteps({ step: stepProp, min: min, max: max });
32
+ var step = stepProp ? sortedSteps : Math.abs((max - min) / 100);
32
33
  var IconRight = rightSide;
33
- var IconLeft = isNotRangeParams && props.leftSide && props.leftSide !== 'input' ? props.leftSide : undefined;
34
+ var IconLeft = props.leftSide !== 'input' && props.leftSide;
34
35
  var iconSize = getByMap(sizeMap, size);
35
- var _m = useSlider({
36
+ var _l = useSlider({
36
37
  disabled: disabled,
37
38
  range: range,
38
39
  value: value,
39
40
  min: min,
40
41
  max: max,
41
- step: sortedSteps,
42
+ step: step,
42
43
  onChange: onChange,
43
44
  onAfterChange: onAfterChange,
44
45
  sliderRef: sliderRef,
45
46
  buttonRefs: [leftButtonRef, rightButtonRef]
46
- }), onKeyPress = _m.onKeyPress, onFocus = _m.onFocus, handlePress = _m.handlePress, popoverPosition = _m.popoverPosition, activeButton = _m.activeButton, currentValue = _m.currentValue;
47
- var _o = useSliderStationing(currentValue.length === 1 ? currentValue[0] : currentValue, min, max, view, range, sortedSteps, [leftButtonRef, rightButtonRef], sliderRef), lineSizes = _o.lineSizes, buttonPositions = _o.buttonPositions;
47
+ }), onKeyPress = _l.onKeyPress, onFocus = _l.onFocus, handlePress = _l.handlePress, onSliderClick = _l.onSliderClick, popoverPosition = _l.popoverPosition, activeButton = _l.activeButton, currentValue = _l.currentValue;
48
+ var _m = useSliderStationing(currentValue.length === 1 ? currentValue[0] : currentValue, min, max, view, range, step, [leftButtonRef, rightButtonRef], sliderRef), lineSizes = _m.lineSizes, buttonPositions = _m.buttonPositions;
49
+ var containerProps = {
50
+ role: 'button',
51
+ tabIndex: 0,
52
+ className: cnSlider('Control'),
53
+ ref: sliderRef,
54
+ onClick: onSliderClick
55
+ };
48
56
  var changeHovered = function (status) {
49
57
  if (status)
50
58
  on();
@@ -55,10 +63,10 @@ function SliderRender(props, ref) {
55
63
  label && (React.createElement(FieldLabel, { className: cnSlider('Label'), size: size }, label)),
56
64
  React.createElement("div", { className: cnSlider('Container') },
57
65
  leftSide === 'input' && isNotRangeParams(props) && (React.createElement("div", { className: cnSlider('Side', { position: 'left' }) },
58
- React.createElement(SliderInput, { value: props.value, onChange: function (params) { var _a; return isNotRangeParams(props) && ((_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, params)); }, size: size, min: min, max: max, status: status, step: sortedSteps, disabled: disabled }))),
66
+ React.createElement(SliderInput, { value: props.value, onChange: function (params) { var _a; return isNotRangeParams(props) && ((_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, params)); }, size: size, min: min, max: max, status: status, step: step, disabled: disabled }))),
59
67
  IconLeft && (React.createElement("div", { className: cnSlider('Side', { position: 'left' }) },
60
- React.createElement(IconLeft, { size: iconSize, view: "secondary" }))),
61
- React.createElement("div", { className: cnSlider('Control'), ref: sliderRef },
68
+ React.createElement(IconLeft, { size: iconSize !== null && iconSize !== void 0 ? iconSize : undefined, view: "secondary" }))),
69
+ React.createElement("div", __assign({}, containerProps),
62
70
  React.createElement(SliderLine, { hovered: isHovered || typeof activeButton === 'number', onHover: changeHovered, lines: lineSizes, disabled: disabled, view: view }),
63
71
  currentValue.map(function (val, index) { return (React.createElement(SliderPoint, { hovered: isHovered || typeof activeButton === 'number', buttonRef: leftButtonRef, popoverPosition: popoverPosition[index], onKeyPress: onKeyPress, onFocus: onFocus, handlePress: handlePress, disabled: disabled, position: buttonPositions[index], focused: activeButton === index, buttonLabel: index, withTooltip: withTooltip, onHover: changeHovered, tooltipFormatter: tooltipFormatter, value: val, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": val, tooltipZIndex: typeof (style === null || style === void 0 ? void 0 : style.zIndex) === 'number' ? style.zIndex + 1 : undefined, key: cnSlider('Point', { index: index }) })); })),
64
72
  IconRight && (React.createElement("div", { className: cnSlider('Side', { position: 'right' }) },
@@ -22,8 +22,8 @@
22
22
  height: var(--space-2xs);
23
23
  background-color: var(--slider-line-color);
24
24
  border-radius: var(--slider-line-radius);
25
- -webkit-transition: background-color 0.3s, width 0.3s;
26
- transition: background-color 0.3s, width 0.3s;
25
+ -webkit-transition: background-color 0.3s;
26
+ transition: background-color 0.3s;
27
27
  }
28
28
 
29
29
  .SliderLine-Line_active {
@@ -19,8 +19,8 @@
19
19
  border: var(--space-3xs) solid var(--color-control-bg-primary);
20
20
  border-radius: calc(var(--space-m) * 0.5);
21
21
  cursor: pointer;
22
- -webkit-transition: border-color 0.3s, left 0.3s;
23
- transition: border-color 0.3s, left 0.3s;
22
+ -webkit-transition: border-color 0.3s;
23
+ transition: border-color 0.3s;
24
24
  }
25
25
 
26
26
  .SliderPoint_hovered {
@@ -34,6 +34,4 @@
34
34
 
35
35
  .SliderPoint-Tooltip {
36
36
  pointer-events: none;
37
- -webkit-transition: left 0.3s;
38
- transition: left 0.3s;
39
37
  }
@@ -16,13 +16,14 @@ export declare type UseSliderProps<RANGE extends boolean = false> = {
16
16
  step?: number | number[];
17
17
  onChange?: PropOnChange<RANGE>;
18
18
  onAfterChange?: PropOnChange<RANGE>;
19
- sliderRef: React.RefObject<HTMLDivElement>;
19
+ sliderRef: React.RefObject<HTMLDivElement | HTMLButtonElement>;
20
20
  buttonRefs: React.RefObject<HTMLButtonElement>[];
21
21
  };
22
22
  export declare type UseSliderValues = {
23
23
  onKeyPress: (e: React.KeyboardEvent, typeButton: ActiveButton) => void;
24
24
  onFocus: (e: React.FocusEvent<HTMLButtonElement> | React.MouseEvent, button: ActiveButton) => void;
25
25
  handlePress: (typeButton: ActiveButton) => void;
26
+ onSliderClick: React.MouseEventHandler;
26
27
  activeButton: ActiveButton;
27
28
  currentValue: [number] | [number, number];
28
29
  popoverPosition: TrackPosition[];
@@ -34,6 +35,6 @@ export declare const getActiveValue: (value: number | [number, number], active:
34
35
  export declare const detectActiveButton: (posittion: TrackPosition, buttons: React.RefObject<HTMLButtonElement>[]) => ActiveButton;
35
36
  export declare const getValidValue: (value: number, min: number, max: number, step?: number | number[] | undefined) => number;
36
37
  export declare const isValidValue: (value: number, min: number, max: number, step?: number | number[] | undefined) => boolean;
37
- export declare const getValueByPosition: (position: TrackPosition, sliderRef: React.RefObject<HTMLDivElement>, min: number, max: number) => number;
38
+ export declare const getValueByPosition: (position: TrackPosition, sliderRef: React.RefObject<HTMLDivElement | HTMLButtonElement>, min: number, max: number, step?: number | number[] | undefined) => number;
38
39
  export declare const getNewValue: (changedValue: number, currentValue: number | [number, number], step: number | number[], min: number, max: number, activeButton: ActiveButton) => number | [number, number];
39
40
  export declare const analyzeDivisionValue: (value: number, step: number | number[], min: number, max: number) => number;
@@ -43,14 +43,22 @@ export var detectActiveButton = function (position, buttons) {
43
43
  };
44
44
  export var getValidValue = function (value, min, max, step) {
45
45
  if (typeof value === 'number') {
46
- if (value > max)
46
+ if (value >= max)
47
47
  return max;
48
- if (value < min)
48
+ if (value <= min)
49
49
  return min;
50
50
  if (!Array.isArray(step)) {
51
51
  var division = step === null || step === void 0 ? void 0 : step.toString().split('.')[1];
52
52
  var stepValue = step || 1;
53
- return (Math.ceil(Number(value.toFixed(division ? division.length : 0)) / stepValue) * stepValue);
53
+ if (Math.abs(value) < 1) {
54
+ return Number(value.toFixed(division ? division.length : 0));
55
+ }
56
+ var roundValue = Math.round(Number(value.toFixed(division ? division.length : 0)) / stepValue) * stepValue;
57
+ if (roundValue > max)
58
+ return max;
59
+ if (roundValue < min)
60
+ return min;
61
+ return Number(roundValue.toFixed(division ? division.length : 0));
54
62
  }
55
63
  var resultValue_1 = value;
56
64
  step.forEach(function (stepPoint, index) {
@@ -83,12 +91,12 @@ export var getValidValue = function (value, min, max, step) {
83
91
  export var isValidValue = function (value, min, max, step) {
84
92
  return getValidValue(value, min, max, step) === value;
85
93
  };
86
- export var getValueByPosition = function (position, sliderRef, min, max) {
94
+ export var getValueByPosition = function (position, sliderRef, min, max, step) {
87
95
  if (sliderRef.current && position) {
88
96
  var _a = sliderRef.current.getBoundingClientRect(), x = _a.x, width = _a.width;
89
97
  var absoluteSize = Math.abs(max - min);
90
98
  var value = min + ((position.x - x) * absoluteSize) / width;
91
- return getValidValue(value, min, max);
99
+ return getValidValue(value, min, max, step);
92
100
  }
93
101
  return 0;
94
102
  };
@@ -111,17 +119,32 @@ export var getNewValue = function (changedValue, currentValue, step, min, max, a
111
119
  return analyzedValue;
112
120
  };
113
121
  export var analyzeDivisionValue = function (value, step, min, max) {
114
- var steps = getSteps(step, min, max);
115
122
  var newValue = value;
116
- steps.forEach(function (stepSize) {
117
- if (value && stepSize.min < value && stepSize.max >= value) {
118
- if ((stepSize.max + stepSize.min) / 2 > value) {
119
- newValue = stepSize.min;
120
- }
121
- else {
122
- newValue = stepSize.max;
123
+ if (Array.isArray(step)) {
124
+ var steps = getSteps(step, min, max);
125
+ steps.forEach(function (stepSize) {
126
+ if (value && stepSize.min < value && stepSize.max >= value) {
127
+ if ((stepSize.max + stepSize.min) / 2 > value) {
128
+ newValue = stepSize.min;
129
+ }
130
+ else {
131
+ newValue = stepSize.max;
132
+ }
123
133
  }
134
+ });
135
+ }
136
+ else {
137
+ if (value >= max)
138
+ return max;
139
+ if (value <= min)
140
+ return min;
141
+ var nearStep = (value - min) % step;
142
+ if (nearStep > step / 2) {
143
+ newValue = step - nearStep + value;
124
144
  }
125
- });
145
+ else {
146
+ newValue = value - nearStep;
147
+ }
148
+ }
126
149
  return newValue;
127
150
  };
@@ -1,2 +1,3 @@
1
1
  import { UseSliderProps, UseSliderValues } from './helper';
2
+ export declare const COUNT_STEPS = 250;
2
3
  export declare function useSlider<RANGE extends boolean>(props: UseSliderProps<RANGE>): UseSliderValues;