@consta/uikit 3.25.0 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (377) 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 +16 -7
  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/package.json +1 -1
  29. package/FieldLabel/package.json +1 -1
  30. package/File/package.json +1 -1
  31. package/FileField/package.json +1 -1
  32. package/FileIcon/package.json +1 -1
  33. package/FileIconAvi/package.json +1 -1
  34. package/FileIconBmp/package.json +1 -1
  35. package/FileIconCsv/package.json +1 -1
  36. package/FileIconDoc/package.json +1 -1
  37. package/FileIconExe/package.json +1 -1
  38. package/FileIconGif/package.json +1 -1
  39. package/FileIconJpg/package.json +1 -1
  40. package/FileIconJson/package.json +1 -1
  41. package/FileIconLoading/package.json +1 -1
  42. package/FileIconMov/package.json +1 -1
  43. package/FileIconMp3/package.json +1 -1
  44. package/FileIconMp4/package.json +1 -1
  45. package/FileIconPdf/package.json +1 -1
  46. package/FileIconPng/package.json +1 -1
  47. package/FileIconPpt/package.json +1 -1
  48. package/FileIconRar/package.json +1 -1
  49. package/FileIconRtf/package.json +1 -1
  50. package/FileIconTiff/package.json +1 -1
  51. package/FileIconTxt/package.json +1 -1
  52. package/FileIconUndefined/package.json +1 -1
  53. package/FileIconWav/package.json +1 -1
  54. package/FileIconXls/package.json +1 -1
  55. package/FileIconZip/package.json +1 -1
  56. package/Grid/package.json +1 -1
  57. package/Header/package.json +1 -1
  58. package/Icon/package.json +1 -1
  59. package/IconAdd/package.json +1 -1
  60. package/IconAddToComparison/package.json +1 -1
  61. package/IconAlert/package.json +1 -1
  62. package/IconAlignBlocksLeft/package.json +1 -1
  63. package/IconAlignBlocksRight/package.json +1 -1
  64. package/IconAlignCenter/package.json +1 -1
  65. package/IconAlignJustify/package.json +1 -1
  66. package/IconAlignLeft/package.json +1 -1
  67. package/IconAlignRight/package.json +1 -1
  68. package/IconAllDone/package.json +1 -1
  69. package/IconArrowDown/package.json +1 -1
  70. package/IconArrowLeft/package.json +1 -1
  71. package/IconArrowRight/package.json +1 -1
  72. package/IconArrowUp/package.json +1 -1
  73. package/IconArtBrush/package.json +1 -1
  74. package/IconAttach/package.json +1 -1
  75. package/IconBackward/package.json +1 -1
  76. package/IconBag/package.json +1 -1
  77. package/IconBarrier/package.json +1 -1
  78. package/IconBento/package.json +1 -1
  79. package/IconBold/package.json +1 -1
  80. package/IconBook/package.json +1 -1
  81. package/IconBookmarkFilled/package.json +1 -1
  82. package/IconBookmarkStroked/package.json +1 -1
  83. package/IconCalculator/package.json +1 -1
  84. package/IconCalendar/package.json +1 -1
  85. package/IconCamera/package.json +1 -1
  86. package/IconCancel/package.json +1 -1
  87. package/IconCards/package.json +1 -1
  88. package/IconChat/package.json +1 -1
  89. package/IconCheck/package.json +1 -1
  90. package/IconClose/package.json +1 -1
  91. package/IconCollapse/package.json +1 -1
  92. package/IconColorFill/package.json +1 -1
  93. package/IconColorText/package.json +1 -1
  94. package/IconColumns/package.json +1 -1
  95. package/IconComment/package.json +1 -1
  96. package/IconConnection/package.json +1 -1
  97. package/IconCopy/package.json +1 -1
  98. package/IconCrown/package.json +1 -1
  99. package/IconCursorMouse/package.json +1 -1
  100. package/IconDataNull/package.json +1 -1
  101. package/IconDiamond/package.json +1 -1
  102. package/IconDinosaur/package.json +1 -1
  103. package/IconDisconnection/package.json +1 -1
  104. package/IconDocAdd/package.json +1 -1
  105. package/IconDocBlank/package.json +1 -1
  106. package/IconDocDelete/package.json +1 -1
  107. package/IconDocExport/package.json +1 -1
  108. package/IconDocFilled/package.json +1 -1
  109. package/IconDown/package.json +1 -1
  110. package/IconDownload/package.json +1 -1
  111. package/IconDrag/package.json +1 -1
  112. package/IconDraggable/package.json +1 -1
  113. package/IconDrillingRig/package.json +1 -1
  114. package/IconDrop/package.json +1 -1
  115. package/IconEdit/package.json +1 -1
  116. package/IconExit/package.json +1 -1
  117. package/IconExpand/package.json +1 -1
  118. package/IconEye/package.json +1 -1
  119. package/IconEyeClose/package.json +1 -1
  120. package/IconFacebook/package.json +1 -1
  121. package/IconFavorite/package.json +1 -1
  122. package/IconFilter/package.json +1 -1
  123. package/IconFitToDefault/package.json +1 -1
  124. package/IconFlagFilled/package.json +1 -1
  125. package/IconFlagStroked/package.json +1 -1
  126. package/IconFolders/package.json +1 -1
  127. package/IconForward/package.json +1 -1
  128. package/IconFunnel/package.json +1 -1
  129. package/IconGas/package.json +1 -1
  130. package/IconGeo/package.json +1 -1
  131. package/IconGrouping/package.json +1 -1
  132. package/IconHamburger/package.json +1 -1
  133. package/IconHand/package.json +1 -1
  134. package/IconHealth/package.json +1 -1
  135. package/IconHome/package.json +1 -1
  136. package/IconInComparison/package.json +1 -1
  137. package/IconInfo/package.json +1 -1
  138. package/IconInstagram/package.json +1 -1
  139. package/IconIntroduction/package.json +1 -1
  140. package/IconIpad/package.json +1 -1
  141. package/IconItalic/package.json +1 -1
  142. package/IconKebab/package.json +1 -1
  143. package/IconLaptop/package.json +1 -1
  144. package/IconLayers/package.json +1 -1
  145. package/IconLeaf/package.json +1 -1
  146. package/IconLightningBolt/package.json +1 -1
  147. package/IconLineAndBarChart/package.json +1 -1
  148. package/IconLink/package.json +1 -1
  149. package/IconList/package.json +1 -1
  150. package/IconListNumbered/package.json +1 -1
  151. package/IconLock/package.json +1 -1
  152. package/IconLogicalElement/package.json +1 -1
  153. package/IconMBU/package.json +1 -1
  154. package/IconMGRP/package.json +1 -1
  155. package/IconMLSP/package.json +1 -1
  156. package/IconMMP/package.json +1 -1
  157. package/IconMail/package.json +1 -1
  158. package/IconMap/package.json +1 -1
  159. package/IconMaxHeight/package.json +1 -1
  160. package/IconMaxWidth/package.json +1 -1
  161. package/IconMeatball/package.json +1 -1
  162. package/IconMic/package.json +1 -1
  163. package/IconMolecules/package.json +1 -1
  164. package/IconMoon/package.json +1 -1
  165. package/IconNodeEnd/package.json +1 -1
  166. package/IconNodeStart/package.json +1 -1
  167. package/IconNodeStep/package.json +1 -1
  168. package/IconNodes/package.json +1 -1
  169. package/IconOpenInNew/package.json +1 -1
  170. package/IconOperators/package.json +1 -1
  171. package/IconPanelBottom/package.json +1 -1
  172. package/IconPanelLeft/package.json +1 -1
  173. package/IconPanelRight/package.json +1 -1
  174. package/IconPanelTop/package.json +1 -1
  175. package/IconPaste/package.json +1 -1
  176. package/IconPause/package.json +1 -1
  177. package/IconPhone/package.json +1 -1
  178. package/IconPhoto/package.json +1 -1
  179. package/IconPicture/package.json +1 -1
  180. package/IconPlay/package.json +1 -1
  181. package/IconPressure/package.json +1 -1
  182. package/IconPriceLabel/package.json +1 -1
  183. package/IconProcessing/package.json +1 -1
  184. package/IconQuestion/package.json +1 -1
  185. package/IconQuote/package.json +1 -1
  186. package/IconRUO/package.json +1 -1
  187. package/IconRUS/package.json +1 -1
  188. package/IconRecord/package.json +1 -1
  189. package/IconRemove/package.json +1 -1
  190. package/IconRemoveFromComparison/package.json +1 -1
  191. package/IconReply/package.json +1 -1
  192. package/IconResize/package.json +1 -1
  193. package/IconRestart/package.json +1 -1
  194. package/IconRevert/package.json +1 -1
  195. package/IconRing/package.json +1 -1
  196. package/IconRouble/package.json +1 -1
  197. package/IconRuler/package.json +1 -1
  198. package/IconSave/package.json +1 -1
  199. package/IconScreen/package.json +1 -1
  200. package/IconSearch/package.json +1 -1
  201. package/IconSelect/package.json +1 -1
  202. package/IconSelectOpen/package.json +1 -1
  203. package/IconSendMessage/package.json +1 -1
  204. package/IconSettings/package.json +1 -1
  205. package/IconShape/package.json +1 -1
  206. package/IconShuffle/package.json +1 -1
  207. package/IconSmile/package.json +1 -1
  208. package/IconSortDown/package.json +1 -1
  209. package/IconSortDownCenter/package.json +1 -1
  210. package/IconSortUp/package.json +1 -1
  211. package/IconSortUpCenter/package.json +1 -1
  212. package/IconStop/package.json +1 -1
  213. package/IconStorage/package.json +1 -1
  214. package/IconStrikethrough/package.json +1 -1
  215. package/IconSun/package.json +1 -1
  216. package/IconTable/package.json +1 -1
  217. package/IconTable2/package.json +1 -1
  218. package/IconTarget/package.json +1 -1
  219. package/IconTeam/package.json +1 -1
  220. package/IconTechResponse/package.json +1 -1
  221. package/IconTest/package.json +1 -1
  222. package/IconThumbUp/package.json +1 -1
  223. package/IconTie/package.json +1 -1
  224. package/IconTop/package.json +1 -1
  225. package/IconTrash/package.json +1 -1
  226. package/IconType/package.json +1 -1
  227. package/IconUnderline/package.json +1 -1
  228. package/IconUnlock/package.json +1 -1
  229. package/IconUnsort/package.json +1 -1
  230. package/IconUnsortCenter/package.json +1 -1
  231. package/IconUpload/package.json +1 -1
  232. package/IconUser/package.json +1 -1
  233. package/IconVZD/package.json +1 -1
  234. package/IconVideo/package.json +1 -1
  235. package/IconVkontakte/package.json +1 -1
  236. package/IconWarning/package.json +1 -1
  237. package/IconWatch/package.json +1 -1
  238. package/IconWideScreen/package.json +1 -1
  239. package/IconWorld/package.json +1 -1
  240. package/IconWrench/package.json +1 -1
  241. package/IconYandexDzen/package.json +1 -1
  242. package/IconYoutube/package.json +1 -1
  243. package/Informer/package.json +1 -1
  244. package/LayoutCanary/package.json +1 -1
  245. package/Loader/package.json +1 -1
  246. package/MixCard/package.json +1 -1
  247. package/MixFocus/package.json +1 -1
  248. package/MixPopoverAnimate/package.json +1 -1
  249. package/MixPopoverArrow/package.json +1 -1
  250. package/MixSpace/package.json +1 -1
  251. package/MixVisuallyHidden/package.json +1 -1
  252. package/Modal/package.json +1 -1
  253. package/MultiComboboxDeprecated/package.json +1 -1
  254. package/Pagination/package.json +1 -1
  255. package/Popover/package.json +1 -1
  256. package/PortalWithTheme/package.json +1 -1
  257. package/ProgressLine/es.js +1 -0
  258. package/ProgressLine/index.d.ts +1 -0
  259. package/ProgressLine/index.js +4 -0
  260. package/ProgressLine/package.json +9 -0
  261. package/ProgressSpin/package.json +1 -1
  262. package/ProgressStepBarCanary/package.json +1 -1
  263. package/Radio/package.json +1 -1
  264. package/RadioGroup/package.json +1 -1
  265. package/Responses/package.json +1 -1
  266. package/Responses403/package.json +1 -1
  267. package/Responses404/package.json +1 -1
  268. package/Responses500/package.json +1 -1
  269. package/Responses503/package.json +1 -1
  270. package/ResponsesConnectionError/package.json +1 -1
  271. package/ResponsesDeleted/package.json +1 -1
  272. package/ResponsesEmptyBox/package.json +1 -1
  273. package/ResponsesEmptyPockets/package.json +1 -1
  274. package/ResponsesExit/package.json +1 -1
  275. package/ResponsesImage/package.json +1 -1
  276. package/ResponsesImage403/package.json +1 -1
  277. package/ResponsesImage404/package.json +1 -1
  278. package/ResponsesImage500/package.json +1 -1
  279. package/ResponsesImage503/package.json +1 -1
  280. package/ResponsesImageConnectionError/package.json +1 -1
  281. package/ResponsesImageDeleted/package.json +1 -1
  282. package/ResponsesImageEmptyBox/package.json +1 -1
  283. package/ResponsesImageEmptyPockets/package.json +1 -1
  284. package/ResponsesImageNothingFound/package.json +1 -1
  285. package/ResponsesImageSuccess/package.json +1 -1
  286. package/ResponsesNothingFound/package.json +1 -1
  287. package/ResponsesSuccess/package.json +1 -1
  288. package/Select/package.json +1 -1
  289. package/Sidebar/package.json +1 -1
  290. package/Skeleton/package.json +1 -1
  291. package/SliderCanary/package.json +1 -1
  292. package/SnackBar/package.json +1 -1
  293. package/Steps/package.json +1 -1
  294. package/StepsCanary/package.json +1 -1
  295. package/Switch/package.json +1 -1
  296. package/SwitchGroup/package.json +1 -1
  297. package/SwitchGroupCanary/package.json +1 -1
  298. package/Table/package.json +1 -1
  299. package/Tabs/package.json +1 -1
  300. package/TabsCanary/package.json +1 -1
  301. package/Tag/package.json +1 -1
  302. package/TagBase/package.json +1 -1
  303. package/Text/package.json +1 -1
  304. package/TextField/package.json +1 -1
  305. package/Theme/package.json +1 -1
  306. package/ThemeToggler/package.json +1 -1
  307. package/Timer/package.json +1 -1
  308. package/Tooltip/package.json +1 -1
  309. package/User/package.json +1 -1
  310. package/UserSelect/package.json +1 -1
  311. package/UserSelectDeprecated/package.json +1 -1
  312. package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +8 -1
  313. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.css +67 -0
  314. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.d.ts +3 -0
  315. package/__internal__/cjs-src/components/ProgressLine/ProgressLine.js +27 -0
  316. package/__internal__/cjs-src/components/ProgressLine/types.d.ts +10 -0
  317. package/__internal__/cjs-src/components/ProgressLine/types.js +5 -0
  318. package/__internal__/cjs-src/components/ProgressSpin/ProgressSpin.d.ts +1 -0
  319. package/__internal__/cjs-src/components/ProgressSpin/ProgressSpin.js +2 -1
  320. package/__internal__/cjs-src/components/SliderCanary/SliderCanary.js +19 -11
  321. package/__internal__/cjs-src/components/SliderCanary/SliderLine/SliderLine.css +2 -2
  322. package/__internal__/cjs-src/components/SliderCanary/SliderPoint/SliderPoint.css +2 -4
  323. package/__internal__/cjs-src/components/SliderCanary/useSlider/helper.d.ts +3 -2
  324. package/__internal__/cjs-src/components/SliderCanary/useSlider/helper.js +37 -14
  325. package/__internal__/cjs-src/components/SliderCanary/useSlider/useSlider.d.ts +1 -0
  326. package/__internal__/cjs-src/components/SliderCanary/useSlider/useSlider.js +32 -4
  327. package/__internal__/cjs-src/components/SliderCanary/useSliderStationing.d.ts +1 -1
  328. package/__internal__/cjs-src/components/SliderCanary/useSliderStationing.js +14 -3
  329. package/__internal__/cjs-src/components/TextField/TextField.js +13 -5
  330. package/__internal__/cjs-src/components/TextField/types.d.ts +7 -0
  331. package/__internal__/cjs-src/components/User/User.css +1 -0
  332. package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +8 -1
  333. package/__internal__/src/components/ProgressLine/ProgressLine.css +67 -0
  334. package/__internal__/src/components/ProgressLine/ProgressLine.d.ts +3 -0
  335. package/__internal__/src/components/ProgressLine/ProgressLine.js +24 -0
  336. package/__internal__/src/components/ProgressLine/types.d.ts +10 -0
  337. package/__internal__/src/components/ProgressLine/types.js +2 -0
  338. package/__internal__/src/components/ProgressSpin/ProgressSpin.d.ts +1 -0
  339. package/__internal__/src/components/ProgressSpin/ProgressSpin.js +2 -1
  340. package/__internal__/src/components/SliderCanary/SliderCanary.js +19 -11
  341. package/__internal__/src/components/SliderCanary/SliderLine/SliderLine.css +2 -2
  342. package/__internal__/src/components/SliderCanary/SliderPoint/SliderPoint.css +2 -4
  343. package/__internal__/src/components/SliderCanary/useSlider/helper.d.ts +3 -2
  344. package/__internal__/src/components/SliderCanary/useSlider/helper.js +37 -14
  345. package/__internal__/src/components/SliderCanary/useSlider/useSlider.d.ts +1 -0
  346. package/__internal__/src/components/SliderCanary/useSlider/useSlider.js +32 -4
  347. package/__internal__/src/components/SliderCanary/useSliderStationing.d.ts +1 -1
  348. package/__internal__/src/components/SliderCanary/useSliderStationing.js +15 -4
  349. package/__internal__/src/components/TextField/TextField.js +13 -5
  350. package/__internal__/src/components/TextField/types.d.ts +7 -0
  351. package/__internal__/src/components/User/User.css +1 -0
  352. package/createIcon/package.json +1 -1
  353. package/createResponsesImage/package.json +1 -1
  354. package/package.json +2 -1
  355. package/useBreakpoints/package.json +1 -1
  356. package/useChoiceGroup/package.json +1 -1
  357. package/useChoiceGroupIndexed/package.json +1 -1
  358. package/useClickOutside/package.json +1 -1
  359. package/useComponentSize/package.json +1 -1
  360. package/useDebounce/package.json +1 -1
  361. package/useFlag/package.json +1 -1
  362. package/useForkRef/package.json +1 -1
  363. package/useGlobalKeys/package.json +1 -1
  364. package/useHideElementsInLine/package.json +1 -1
  365. package/useKeys/package.json +1 -1
  366. package/useMutableRef/package.json +1 -1
  367. package/useOverflow/package.json +1 -1
  368. package/usePrevious/package.json +1 -1
  369. package/useRefs/package.json +1 -1
  370. package/useResizeObserved/package.json +1 -1
  371. package/useScrollElements/package.json +1 -1
  372. package/useScrollPosition/package.json +1 -1
  373. package/useSelect/package.json +1 -1
  374. package/useSortSteps/package.json +1 -1
  375. package/useThemeVars/package.json +1 -1
  376. package/useTimer/package.json +1 -1
  377. package/withTooltip/package.json +1 -1
@@ -27,27 +27,35 @@ var sizeMap = {
27
27
  exports.COMPONENT_NAME = 'Slider';
28
28
  function SliderRender(props, ref) {
29
29
  var sliderRef = react_1.useRef(null);
30
- var _a = usePropsHandler_1.usePropsHandler(exports.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 ? helper_1.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 ? helper_1.defaultTooltipFormatter : _j, className = _a.className, style = _a.style, otherProps = tslib_1.__rest(_a, ["min", "max", "onChange", "onAfterChange", "value", "step", "disabled", "size", "view", "leftSide", "rightSide", "withTooltip", "range", "label", "status", "caption", "tooltipFormatter", "className", "style"]);
31
- var _k = tslib_1.__read(useFlag_1.useFlag(false), 2), isHovered = _k[0], _l = _k[1], on = _l.on, off = _l.off;
30
+ var _a = usePropsHandler_1.usePropsHandler(exports.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 ? helper_1.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 ? helper_1.defaultTooltipFormatter : _h, className = _a.className, style = _a.style, otherProps = tslib_1.__rest(_a, ["min", "max", "onChange", "onAfterChange", "value", "step", "disabled", "size", "view", "leftSide", "rightSide", "withTooltip", "range", "label", "status", "caption", "tooltipFormatter", "className", "style"]);
31
+ var _j = tslib_1.__read(useFlag_1.useFlag(false), 2), isHovered = _j[0], _k = _j[1], on = _k.on, off = _k.off;
32
32
  var leftButtonRef = react_1.useRef(null);
33
33
  var rightButtonRef = react_1.useRef(null);
34
- var sortedSteps = useSortSteps_1.useSortSteps({ step: step, min: min, max: max });
34
+ var sortedSteps = useSortSteps_1.useSortSteps({ step: stepProp, min: min, max: max });
35
+ var step = stepProp ? sortedSteps : Math.abs((max - min) / 100);
35
36
  var IconRight = rightSide;
36
- var IconLeft = helper_1.isNotRangeParams && props.leftSide && props.leftSide !== 'input' ? props.leftSide : undefined;
37
+ var IconLeft = props.leftSide !== 'input' && props.leftSide;
37
38
  var iconSize = getByMap_1.getByMap(sizeMap, size);
38
- var _m = useSlider_1.useSlider({
39
+ var _l = useSlider_1.useSlider({
39
40
  disabled: disabled,
40
41
  range: range,
41
42
  value: value,
42
43
  min: min,
43
44
  max: max,
44
- step: sortedSteps,
45
+ step: step,
45
46
  onChange: onChange,
46
47
  onAfterChange: onAfterChange,
47
48
  sliderRef: sliderRef,
48
49
  buttonRefs: [leftButtonRef, rightButtonRef]
49
- }), onKeyPress = _m.onKeyPress, onFocus = _m.onFocus, handlePress = _m.handlePress, popoverPosition = _m.popoverPosition, activeButton = _m.activeButton, currentValue = _m.currentValue;
50
- var _o = useSliderStationing_1.useSliderStationing(currentValue.length === 1 ? currentValue[0] : currentValue, min, max, view, range, sortedSteps, [leftButtonRef, rightButtonRef], sliderRef), lineSizes = _o.lineSizes, buttonPositions = _o.buttonPositions;
50
+ }), onKeyPress = _l.onKeyPress, onFocus = _l.onFocus, handlePress = _l.handlePress, onSliderClick = _l.onSliderClick, popoverPosition = _l.popoverPosition, activeButton = _l.activeButton, currentValue = _l.currentValue;
51
+ var _m = useSliderStationing_1.useSliderStationing(currentValue.length === 1 ? currentValue[0] : currentValue, min, max, view, range, step, [leftButtonRef, rightButtonRef], sliderRef), lineSizes = _m.lineSizes, buttonPositions = _m.buttonPositions;
52
+ var containerProps = {
53
+ role: 'button',
54
+ tabIndex: 0,
55
+ className: cnSlider('Control'),
56
+ ref: sliderRef,
57
+ onClick: onSliderClick
58
+ };
51
59
  var changeHovered = function (status) {
52
60
  if (status)
53
61
  on();
@@ -58,10 +66,10 @@ function SliderRender(props, ref) {
58
66
  label && (react_1["default"].createElement(FieldLabel_1.FieldLabel, { className: cnSlider('Label'), size: size }, label)),
59
67
  react_1["default"].createElement("div", { className: cnSlider('Container') },
60
68
  leftSide === 'input' && helper_1.isNotRangeParams(props) && (react_1["default"].createElement("div", { className: cnSlider('Side', { position: 'left' }) },
61
- react_1["default"].createElement(SliderInput_1.SliderInput, { value: props.value, onChange: function (params) { var _a; return helper_1.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 }))),
69
+ react_1["default"].createElement(SliderInput_1.SliderInput, { value: props.value, onChange: function (params) { var _a; return helper_1.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 }))),
62
70
  IconLeft && (react_1["default"].createElement("div", { className: cnSlider('Side', { position: 'left' }) },
63
- react_1["default"].createElement(IconLeft, { size: iconSize, view: "secondary" }))),
64
- react_1["default"].createElement("div", { className: cnSlider('Control'), ref: sliderRef },
71
+ react_1["default"].createElement(IconLeft, { size: iconSize !== null && iconSize !== void 0 ? iconSize : undefined, view: "secondary" }))),
72
+ react_1["default"].createElement("div", tslib_1.__assign({}, containerProps),
65
73
  react_1["default"].createElement(SliderLine_1.SliderLine, { hovered: isHovered || typeof activeButton === 'number', onHover: changeHovered, lines: lineSizes, disabled: disabled, view: view }),
66
74
  currentValue.map(function (val, index) { return (react_1["default"].createElement(SliderPoint_1.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 }) })); })),
67
75
  IconRight && (react_1["default"].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;
@@ -46,14 +46,22 @@ exports.detectActiveButton = function (position, buttons) {
46
46
  };
47
47
  exports.getValidValue = function (value, min, max, step) {
48
48
  if (typeof value === 'number') {
49
- if (value > max)
49
+ if (value >= max)
50
50
  return max;
51
- if (value < min)
51
+ if (value <= min)
52
52
  return min;
53
53
  if (!Array.isArray(step)) {
54
54
  var division = step === null || step === void 0 ? void 0 : step.toString().split('.')[1];
55
55
  var stepValue = step || 1;
56
- return (Math.ceil(Number(value.toFixed(division ? division.length : 0)) / stepValue) * stepValue);
56
+ if (Math.abs(value) < 1) {
57
+ return Number(value.toFixed(division ? division.length : 0));
58
+ }
59
+ var roundValue = Math.round(Number(value.toFixed(division ? division.length : 0)) / stepValue) * stepValue;
60
+ if (roundValue > max)
61
+ return max;
62
+ if (roundValue < min)
63
+ return min;
64
+ return Number(roundValue.toFixed(division ? division.length : 0));
57
65
  }
58
66
  var resultValue_1 = value;
59
67
  step.forEach(function (stepPoint, index) {
@@ -86,12 +94,12 @@ exports.getValidValue = function (value, min, max, step) {
86
94
  exports.isValidValue = function (value, min, max, step) {
87
95
  return exports.getValidValue(value, min, max, step) === value;
88
96
  };
89
- exports.getValueByPosition = function (position, sliderRef, min, max) {
97
+ exports.getValueByPosition = function (position, sliderRef, min, max, step) {
90
98
  if (sliderRef.current && position) {
91
99
  var _a = sliderRef.current.getBoundingClientRect(), x = _a.x, width = _a.width;
92
100
  var absoluteSize = Math.abs(max - min);
93
101
  var value = min + ((position.x - x) * absoluteSize) / width;
94
- return exports.getValidValue(value, min, max);
102
+ return exports.getValidValue(value, min, max, step);
95
103
  }
96
104
  return 0;
97
105
  };
@@ -114,17 +122,32 @@ exports.getNewValue = function (changedValue, currentValue, step, min, max, acti
114
122
  return analyzedValue;
115
123
  };
116
124
  exports.analyzeDivisionValue = function (value, step, min, max) {
117
- var steps = useSliderStationing_1.getSteps(step, min, max);
118
125
  var newValue = value;
119
- steps.forEach(function (stepSize) {
120
- if (value && stepSize.min < value && stepSize.max >= value) {
121
- if ((stepSize.max + stepSize.min) / 2 > value) {
122
- newValue = stepSize.min;
123
- }
124
- else {
125
- newValue = stepSize.max;
126
+ if (Array.isArray(step)) {
127
+ var steps = useSliderStationing_1.getSteps(step, min, max);
128
+ steps.forEach(function (stepSize) {
129
+ if (value && stepSize.min < value && stepSize.max >= value) {
130
+ if ((stepSize.max + stepSize.min) / 2 > value) {
131
+ newValue = stepSize.min;
132
+ }
133
+ else {
134
+ newValue = stepSize.max;
135
+ }
126
136
  }
137
+ });
138
+ }
139
+ else {
140
+ if (value >= max)
141
+ return max;
142
+ if (value <= min)
143
+ return min;
144
+ var nearStep = (value - min) % step;
145
+ if (nearStep > step / 2) {
146
+ newValue = step - nearStep + value;
127
147
  }
128
- });
148
+ else {
149
+ newValue = value - nearStep;
150
+ }
151
+ }
129
152
  return newValue;
130
153
  };
@@ -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;
@@ -1,15 +1,28 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.useSlider = void 0;
3
+ exports.useSlider = exports.COUNT_STEPS = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var react_1 = require("react");
6
6
  var useComponentSize_1 = require("../../../hooks/useComponentSize/useComponentSize");
7
7
  var useMutableRef_1 = require("../../../hooks/useMutableRef/useMutableRef");
8
8
  var helper_1 = require("./helper");
9
+ exports.COUNT_STEPS = 250;
9
10
  function useSlider(props) {
10
11
  var disabled = props.disabled, range = props.range, value = props.value, min = props.min, max = props.max, _a = props.step, step = _a === void 0 ? 1 : _a, onChange = props.onChange, onAfterChange = props.onAfterChange, sliderRef = props.sliderRef, buttonRefs = props.buttonRefs;
11
12
  var minValue = max > min ? min : 0;
12
13
  var maxValue = max > min ? max : 100;
14
+ var dragStepValue = react_1.useMemo(function () {
15
+ if (!Array.isArray(step)) {
16
+ if (step >= 1) {
17
+ var val = Math.abs((maxValue - minValue) / exports.COUNT_STEPS);
18
+ if (val > step) {
19
+ return val - (val % step);
20
+ }
21
+ return Math.max(val, step);
22
+ }
23
+ }
24
+ return step;
25
+ }, [max, min, step]);
13
26
  var _b = tslib_1.__read(react_1.useState(value), 2), currentValue = _b[0], setCurrentValue = _b[1];
14
27
  var _c = tslib_1.__read(react_1.useState(null), 2), leftPopover = _c[0], setLeftPopover = _c[1];
15
28
  var _d = tslib_1.__read(react_1.useState(null), 2), rightPopover = _d[0], setRightPopover = _d[1];
@@ -74,6 +87,20 @@ function useSlider(props) {
74
87
  }
75
88
  }
76
89
  }, []);
90
+ var onSliderClick = function (e) {
91
+ if (helper_1.isNotRangeParams(props)) {
92
+ var positionValue = helper_1.getValueByPosition({ x: e.pageX, y: e.pageY }, sliderRef, minValue, maxValue, step);
93
+ var newValue = helper_1.getNewValue(positionValue, currentValue, dragStepValue, min, max, activeButton.current);
94
+ if (newValue !== value) {
95
+ setCurrentValue(newValue);
96
+ setTooltipPosition(helper_1.getActiveValue(newValue, 0), 0);
97
+ onChange === null || onChange === void 0 ? void 0 : onChange({
98
+ e: e,
99
+ value: newValue
100
+ });
101
+ }
102
+ }
103
+ };
77
104
  var onKeyPress = react_1.useCallback(function (event, typeButton) {
78
105
  if (!disabled && typeof typeButton === 'number' && typeof currentValue !== 'undefined') {
79
106
  var stepIncrement_1 = !Array.isArray(step) ? step || 1 : 1;
@@ -151,8 +178,8 @@ function useSlider(props) {
151
178
  return value;
152
179
  }
153
180
  var position = helper_1.trackPosition(nativeEvent);
154
- var positionValue = helper_1.getValueByPosition(position, sliderRef, minValue, maxValue);
155
- return helper_1.getNewValue(positionValue, currentValue, step, min, max, activeButton.current);
181
+ var positionValue = helper_1.getValueByPosition(position, sliderRef, minValue, maxValue, step);
182
+ return helper_1.getNewValue(positionValue, currentValue, dragStepValue, min, max, activeButton.current);
156
183
  };
157
184
  var onFocus = function (e, button) {
158
185
  activeButton.current = button;
@@ -163,8 +190,8 @@ function useSlider(props) {
163
190
  var position = changePosition(event);
164
191
  var oldValue = helper_1.getActiveValue(currentValue, button);
165
192
  var newValue = helper_1.getActiveValue(position, button);
193
+ setCurrentValue(position);
166
194
  if (oldValue !== newValue) {
167
- setCurrentValue(position);
168
195
  onAfterChange === null || onAfterChange === void 0 ? void 0 : onAfterChange({ e: event, value: position });
169
196
  }
170
197
  }
@@ -202,6 +229,7 @@ function useSlider(props) {
202
229
  onKeyPress: onKeyPress,
203
230
  onFocus: onFocus,
204
231
  handlePress: handlePress,
232
+ onSliderClick: onSliderClick,
205
233
  activeButton: activeButton.current,
206
234
  popoverPosition: [leftPopover, rightPopover],
207
235
  currentValue: Array.isArray(currentValue) ? currentValue : [currentValue]
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Line, PropView } from './helper';
3
- declare type UseSliderStationing = (value: number | [number, number] | undefined, min: number, max: number, view: PropView, range: boolean | undefined, step: number | number[] | undefined, buttonRefs: [React.RefObject<HTMLButtonElement>, React.RefObject<HTMLButtonElement>], sliderLineRef: React.RefObject<HTMLDivElement>) => {
3
+ declare type UseSliderStationing = (value: number | [number, number] | undefined, min: number, max: number, view: PropView, range: boolean | undefined, step: number | number[] | undefined, buttonRefs: [React.RefObject<HTMLButtonElement>, React.RefObject<HTMLButtonElement>], sliderLineRef: React.RefObject<HTMLButtonElement | HTMLDivElement>) => {
4
4
  lineSizes: Line[];
5
5
  buttonPositions: number[];
6
6
  };
@@ -3,6 +3,7 @@ exports.__esModule = true;
3
3
  exports.useSliderStationing = exports.getSteps = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var react_1 = require("react");
6
+ var useSlider_1 = require("./useSlider/useSlider");
6
7
  exports.getSteps = function (step, min, max) {
7
8
  var stepsArray = [];
8
9
  var size = min;
@@ -29,6 +30,16 @@ exports.useSliderStationing = function (value, min, max, view, range, step, butt
29
30
  if (step === void 0) { step = 1; }
30
31
  var _a = tslib_1.__read(react_1.useState([]), 2), lineSizes = _a[0], setLineSizes = _a[1];
31
32
  var _b = tslib_1.__read(react_1.useState([]), 2), buttonPositions = _b[0], setButtonPositions = _b[1];
33
+ var calcualtedStep = react_1.useMemo(function () {
34
+ if (!Array.isArray(step)) {
35
+ var val = Math.abs((max - min) / useSlider_1.COUNT_STEPS);
36
+ if (val > step) {
37
+ return val - (val % step);
38
+ }
39
+ return Math.max(val, step);
40
+ }
41
+ return step;
42
+ }, [max, min, step]);
32
43
  var calculateLines = function () {
33
44
  var sizesArray = [];
34
45
  var absoluteSize = Math.abs(max - min);
@@ -62,8 +73,8 @@ exports.useSliderStationing = function (value, min, max, view, range, step, butt
62
73
  });
63
74
  }
64
75
  }
65
- else if (typeof step !== 'undefined') {
66
- exports.getSteps(step, min, max).forEach(function (stepSize) {
76
+ else if (typeof calcualtedStep !== 'undefined') {
77
+ exports.getSteps(calcualtedStep, min, max).forEach(function (stepSize) {
67
78
  sizesArray.push({
68
79
  width: (Math.abs(stepSize.max - stepSize.min) * 100) / absoluteSize,
69
80
  active: (typeof value === 'number' || Array.isArray(value)) &&
@@ -114,7 +125,7 @@ exports.useSliderStationing = function (value, min, max, view, range, step, butt
114
125
  react_1.useEffect(function () {
115
126
  setLineSizes(calculateLines());
116
127
  setButtonPositions(calculateButtonPositions());
117
- }, [value, min, max, range, step, view]);
128
+ }, [value, min, max, range, calcualtedStep, view]);
118
129
  return {
119
130
  lineSizes: lineSizes,
120
131
  buttonPositions: buttonPositions
@@ -27,9 +27,11 @@ exports.cnTextField = bem_1.cn(exports.COMPONENT_NAME);
27
27
  function TextFieldRender(props, ref) {
28
28
  var textFieldRef = react_1["default"].useRef(null);
29
29
  var inputRef = react_1["default"].useRef(null);
30
- var _a = usePropsHandler_1.usePropsHandler(exports.COMPONENT_NAME, props, textFieldRef), className = _a.className, _b = _a.type, type = _b === void 0 ? 'text' : _b, value = _a.value, onChange = _a.onChange, id = _a.id, name = _a.name, rows = _a.rows, cols = _a.cols, minRows = _a.minRows, maxRows = _a.maxRows, inputRefProp = _a.inputRef, maxLength = _a.maxLength, disabled = _a.disabled, _c = _a.size, size = _c === void 0 ? types_1.textFieldPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? types_1.textFieldPropViewDefault : _d, _e = _a.form, form = _e === void 0 ? types_1.textFieldPropFormDefault : _e, state = _a.state, status = _a.status, _f = _a.width, width = _f === void 0 ? types_1.textFieldPropWidthDefault : _f, onBlur = _a.onBlur, onFocus = _a.onFocus, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, placeholder = _a.placeholder, leftSide = _a.leftSide, rightSide = _a.rightSide, autoComplete = _a.autoComplete, withClearButton = _a.withClearButton, max = _a.max, min = _a.min, readOnly = _a.readOnly, required = _a.required, _h = _a.step, step = _h === void 0 ? 1 : _h, tabIndex = _a.tabIndex, ariaLabel = _a.ariaLabel, label = _a.label, inputContainerRef = _a.inputContainerRef, _j = _a.labelPosition, labelPosition = _j === void 0 ? 'top' : _j, caption = _a.caption, iconSizeProp = _a.iconSize, focused = _a.focused, onClick = _a.onClick, otherProps = tslib_1.__rest(_a, ["className", "type", "value", "onChange", "id", "name", "rows", "cols", "minRows", "maxRows", "inputRef", "maxLength", "disabled", "size", "view", "form", "state", "status", "width", "onBlur", "onFocus", "autoFocus", "placeholder", "leftSide", "rightSide", "autoComplete", "withClearButton", "max", "min", "readOnly", "required", "step", "tabIndex", "ariaLabel", "label", "inputContainerRef", "labelPosition", "caption", "iconSize", "focused", "onClick"]);
31
- var _k = tslib_1.__read(useFlag_1.useFlag(autoFocus), 2), focus = _k[0], setFocus = _k[1];
32
- var _l = tslib_1.__read(useFlag_1.useFlag(false), 2), passwordVisible = _l[0], setPasswordVisuble = _l[1];
30
+ var _a = usePropsHandler_1.usePropsHandler(exports.COMPONENT_NAME, props, textFieldRef), className = _a.className, _b = _a.type, type = _b === void 0 ? 'text' : _b, value = _a.value, onChange = _a.onChange, id = _a.id, name = _a.name, rows = _a.rows, cols = _a.cols, minRows = _a.minRows, maxRows = _a.maxRows, inputRefProp = _a.inputRef, maxLength = _a.maxLength, disabled = _a.disabled, _c = _a.size, size = _c === void 0 ? types_1.textFieldPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? types_1.textFieldPropViewDefault : _d, _e = _a.form, form = _e === void 0 ? types_1.textFieldPropFormDefault : _e, state = _a.state, status = _a.status, _f = _a.width, width = _f === void 0 ? types_1.textFieldPropWidthDefault : _f, onBlur = _a.onBlur, onFocus = _a.onFocus, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, placeholder = _a.placeholder, leftSide = _a.leftSide, rightSide = _a.rightSide, autoComplete = _a.autoComplete, withClearButton = _a.withClearButton, _h = _a.incrementButtons, incrementButtons = _h === void 0 ? true : _h, max = _a.max, min = _a.min, readOnly = _a.readOnly, required = _a.required, _j = _a.step, step = _j === void 0 ? 1 : _j, tabIndex = _a.tabIndex, ariaLabel = _a.ariaLabel, label = _a.label, inputContainerRef = _a.inputContainerRef, _k = _a.labelPosition, labelPosition = _k === void 0 ? 'top' : _k, caption = _a.caption, iconSizeProp = _a.iconSize, focused = _a.focused, onClick = _a.onClick,
31
+ // onkey props
32
+ onKeyDownProp = _a.onKeyDown, onKeyDownCapture = _a.onKeyDownCapture, onKeyPress = _a.onKeyPress, onKeyPressCapture = _a.onKeyPressCapture, onKeyUp = _a.onKeyUp, onKeyUpCapture = _a.onKeyUpCapture, otherProps = tslib_1.__rest(_a, ["className", "type", "value", "onChange", "id", "name", "rows", "cols", "minRows", "maxRows", "inputRef", "maxLength", "disabled", "size", "view", "form", "state", "status", "width", "onBlur", "onFocus", "autoFocus", "placeholder", "leftSide", "rightSide", "autoComplete", "withClearButton", "incrementButtons", "max", "min", "readOnly", "required", "step", "tabIndex", "ariaLabel", "label", "inputContainerRef", "labelPosition", "caption", "iconSize", "focused", "onClick", "onKeyDown", "onKeyDownCapture", "onKeyPress", "onKeyPressCapture", "onKeyUp", "onKeyUpCapture"]);
33
+ var _l = tslib_1.__read(useFlag_1.useFlag(autoFocus), 2), focus = _l[0], setFocus = _l[1];
34
+ var _m = tslib_1.__read(useFlag_1.useFlag(false), 2), passwordVisible = _m[0], setPasswordVisuble = _m[1];
33
35
  var valueRef = useMutableRef_1.useMutableRef(value);
34
36
  var onClickRef = useMutableRef_1.useMutableRef(onClick);
35
37
  var onChangeRef = useMutableRef_1.useMutableRef(onChange);
@@ -49,7 +51,7 @@ function TextFieldRender(props, ref) {
49
51
  var handleChange = react_1.useCallback(function (e) {
50
52
  var _a;
51
53
  !disabled && ((_a = onChangeRef.current) === null || _a === void 0 ? void 0 : _a.call(onChangeRef, { e: e, id: id, name: name, value: e.target.value || null }));
52
- }, [id, name]);
54
+ }, [id, name, disabled]);
53
55
  var handleBlur = function (e) {
54
56
  setFocus.off();
55
57
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
@@ -72,12 +74,18 @@ function TextFieldRender(props, ref) {
72
74
  readOnly: readOnly,
73
75
  tabIndex: tabIndex,
74
76
  name: name,
77
+ onKeyDownCapture: onKeyDownCapture,
78
+ onKeyPress: onKeyPress,
79
+ onKeyPressCapture: onKeyPressCapture,
80
+ onKeyUp: onKeyUp,
81
+ onKeyUpCapture: onKeyUpCapture,
75
82
  'id': id ? id.toString() : '',
76
83
  'aria-label': ariaLabel
77
84
  };
78
85
  var Eye = passwordVisible ? IconEyeClose_1.IconEyeClose : IconEye_1.IconEye;
79
86
  var onKeyDown = function (e) {
80
87
  var flag = helpers_1.getIncrementFlag(e);
88
+ onKeyDownProp === null || onKeyDownProp === void 0 ? void 0 : onKeyDownProp(e);
81
89
  if (type === 'number' && typeof flag === 'boolean' && !disabled) {
82
90
  e.preventDefault();
83
91
  onChange === null || onChange === void 0 ? void 0 : onChange({
@@ -146,7 +154,7 @@ function TextFieldRender(props, ref) {
146
154
  type: leftSideIsString ? 'string' : 'icon'
147
155
  }), title: typeof leftSide === 'string' ? leftSide : undefined }, leftSideIsString ? (leftSide) : (react_1["default"].createElement(LeftIcon, { className: exports.cnTextField('Icon'), size: iconSize })))),
148
156
  textarea ? (react_1["default"].createElement(react_textarea_autosize_1["default"], tslib_1.__assign({}, commonProps, textareaProps))) : (react_1["default"].createElement("input", tslib_1.__assign({}, commonProps, inputProps))),
149
- type === 'number' && (react_1["default"].createElement("div", { className: exports.cnTextField('Counter') },
157
+ type === 'number' && incrementButtons && (react_1["default"].createElement("div", { className: exports.cnTextField('Counter') },
150
158
  react_1["default"].createElement("button", { onFocus: handleFocus, onClick: function (e) { return changeNumberValue(e, true); }, type: "button", className: exports.cnTextField('CounterButton') },
151
159
  react_1["default"].createElement(IconSelectOpen_1.IconSelectOpen, { size: "xs" })),
152
160
  react_1["default"].createElement("button", { onFocus: handleFocus, onClick: function (e) { return changeNumberValue(e, false); }, type: "button", className: exports.cnTextField('CounterButton') },
@@ -62,6 +62,7 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
62
62
  width?: TextFieldPropWidth;
63
63
  onFocus?: React.FocusEventHandler<HTMLElement>;
64
64
  onBlur?: React.FocusEventHandler<HTMLElement>;
65
+ incrementButtons?: boolean;
65
66
  autoFocus?: boolean;
66
67
  placeholder?: string;
67
68
  leftSide?: string | IconComponent;
@@ -83,5 +84,11 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
83
84
  caption?: string;
84
85
  labelPosition?: 'top' | 'left';
85
86
  focused?: boolean;
87
+ onKeyDownCapture?: React.KeyboardEventHandler;
88
+ onKeyPress?: React.KeyboardEventHandler;
89
+ onKeyPressCapture?: React.KeyboardEventHandler;
90
+ onKeyUp?: React.KeyboardEventHandler;
91
+ onKeyUpCapture?: React.KeyboardEventHandler;
92
+ onKeyDown?: React.KeyboardEventHandler;
86
93
  }, HTMLDivElement> & TextFieldPropsTextareaType<TYPE> & TextFieldPropRightSide<TYPE>;
87
94
  export declare type TextFieldComponent = <TYPE extends string>(props: TextFieldProps<TYPE> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
@@ -80,6 +80,7 @@
80
80
  .User-Info {
81
81
  display: -webkit-box;
82
82
  overflow: hidden;
83
+ word-wrap: break-word;
83
84
  -webkit-line-clamp: 1;
84
85
  -webkit-box-orient: vertical;
85
86
  }
@@ -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,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 }),