@consta/uikit 3.18.1 → 3.19.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 (442) 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 +41 -64
  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/ChoiceGroup/package.json +1 -1
  15. package/Collapse/package.json +1 -1
  16. package/CollapseGroup/package.json +1 -1
  17. package/Combobox/package.json +1 -1
  18. package/ComboboxDeprecated/package.json +1 -1
  19. package/ContextMenu/package.json +1 -1
  20. package/ContextMenuCanary/package.json +1 -1
  21. package/DatePickerCanary/package.json +1 -1
  22. package/DateTimeCanary/package.json +1 -1
  23. package/DragNDropField/package.json +1 -1
  24. package/EventInterceptor/package.json +1 -1
  25. package/FieldCaption/package.json +1 -1
  26. package/FieldLabel/package.json +1 -1
  27. package/File/package.json +1 -1
  28. package/FileField/package.json +1 -1
  29. package/FileIcon/package.json +1 -1
  30. package/FileIconAvi/package.json +1 -1
  31. package/FileIconBmp/package.json +1 -1
  32. package/FileIconCsv/package.json +1 -1
  33. package/FileIconDoc/package.json +1 -1
  34. package/FileIconExe/package.json +1 -1
  35. package/FileIconGif/package.json +1 -1
  36. package/FileIconJpg/package.json +1 -1
  37. package/FileIconJson/package.json +1 -1
  38. package/FileIconLoading/package.json +1 -1
  39. package/FileIconMov/package.json +1 -1
  40. package/FileIconMp3/package.json +1 -1
  41. package/FileIconMp4/package.json +1 -1
  42. package/FileIconPdf/package.json +1 -1
  43. package/FileIconPng/package.json +1 -1
  44. package/FileIconPtt/package.json +1 -1
  45. package/FileIconRar/package.json +1 -1
  46. package/FileIconRtf/package.json +1 -1
  47. package/FileIconTiff/package.json +1 -1
  48. package/FileIconTxt/package.json +1 -1
  49. package/FileIconUndefined/package.json +1 -1
  50. package/FileIconWav/package.json +1 -1
  51. package/FileIconXls/package.json +1 -1
  52. package/FileIconZip/package.json +1 -1
  53. package/Grid/package.json +1 -1
  54. package/Header/package.json +1 -1
  55. package/Icon/package.json +1 -1
  56. package/IconAdd/package.json +1 -1
  57. package/IconAddToComparison/package.json +1 -1
  58. package/IconAlert/package.json +1 -1
  59. package/IconAlignBlocksLeft/package.json +1 -1
  60. package/IconAlignBlocksRight/package.json +1 -1
  61. package/IconAlignCenter/package.json +1 -1
  62. package/IconAlignJustify/package.json +1 -1
  63. package/IconAlignLeft/package.json +1 -1
  64. package/IconAlignRight/package.json +1 -1
  65. package/IconAllDone/package.json +1 -1
  66. package/IconArrowDown/package.json +1 -1
  67. package/IconArrowLeft/package.json +1 -1
  68. package/IconArrowRight/package.json +1 -1
  69. package/IconArrowUp/package.json +1 -1
  70. package/IconArtBrush/package.json +1 -1
  71. package/IconAttach/package.json +1 -1
  72. package/IconBackward/package.json +1 -1
  73. package/IconBag/package.json +1 -1
  74. package/IconBarrier/package.json +1 -1
  75. package/IconBento/package.json +1 -1
  76. package/IconBold/package.json +1 -1
  77. package/IconBook/package.json +1 -1
  78. package/IconBookmarkFilled/package.json +1 -1
  79. package/IconBookmarkStroked/package.json +1 -1
  80. package/IconCalculator/package.json +1 -1
  81. package/IconCalendar/package.json +1 -1
  82. package/IconCamera/package.json +1 -1
  83. package/IconCancel/package.json +1 -1
  84. package/IconCards/package.json +1 -1
  85. package/IconChat/package.json +1 -1
  86. package/IconCheck/package.json +1 -1
  87. package/IconClose/package.json +1 -1
  88. package/IconCollapse/package.json +1 -1
  89. package/IconColorFill/package.json +1 -1
  90. package/IconColorText/package.json +1 -1
  91. package/IconColumns/package.json +1 -1
  92. package/IconComment/package.json +1 -1
  93. package/IconConnection/package.json +1 -1
  94. package/IconCopy/package.json +1 -1
  95. package/IconCrown/package.json +1 -1
  96. package/IconCursorMouse/package.json +1 -1
  97. package/IconDataNull/package.json +1 -1
  98. package/IconDiamond/package.json +1 -1
  99. package/IconDinosaur/package.json +1 -1
  100. package/IconDisconnection/package.json +1 -1
  101. package/IconDocAdd/package.json +1 -1
  102. package/IconDocBlank/package.json +1 -1
  103. package/IconDocDelete/package.json +1 -1
  104. package/IconDocExport/package.json +1 -1
  105. package/IconDocFilled/package.json +1 -1
  106. package/IconDown/package.json +1 -1
  107. package/IconDownload/package.json +1 -1
  108. package/IconDrag/package.json +1 -1
  109. package/IconDraggable/package.json +1 -1
  110. package/IconDrillingRig/package.json +1 -1
  111. package/IconDrop/package.json +1 -1
  112. package/IconEdit/package.json +1 -1
  113. package/IconExit/package.json +1 -1
  114. package/IconExpand/package.json +1 -1
  115. package/IconEye/package.json +1 -1
  116. package/IconEyeClose/package.json +1 -1
  117. package/IconFacebook/package.json +1 -1
  118. package/IconFavorite/package.json +1 -1
  119. package/IconFilter/package.json +1 -1
  120. package/IconFitToDefault/package.json +1 -1
  121. package/IconFlagFilled/package.json +1 -1
  122. package/IconFlagStroked/package.json +1 -1
  123. package/IconFolders/package.json +1 -1
  124. package/IconForward/package.json +1 -1
  125. package/IconFunnel/package.json +1 -1
  126. package/IconGas/package.json +1 -1
  127. package/IconGeo/package.json +1 -1
  128. package/IconGrouping/package.json +1 -1
  129. package/IconHamburger/package.json +1 -1
  130. package/IconHand/package.json +1 -1
  131. package/IconHealth/package.json +1 -1
  132. package/IconHome/package.json +1 -1
  133. package/IconInComparison/package.json +1 -1
  134. package/IconInfo/package.json +1 -1
  135. package/IconInstagram/package.json +1 -1
  136. package/IconIntroduction/package.json +1 -1
  137. package/IconIpad/package.json +1 -1
  138. package/IconItalic/package.json +1 -1
  139. package/IconKebab/package.json +1 -1
  140. package/IconLaptop/package.json +1 -1
  141. package/IconLayers/package.json +1 -1
  142. package/IconLeaf/package.json +1 -1
  143. package/IconLightningBolt/package.json +1 -1
  144. package/IconLineAndBarChart/package.json +1 -1
  145. package/IconLink/package.json +1 -1
  146. package/IconList/package.json +1 -1
  147. package/IconListNumbered/package.json +1 -1
  148. package/IconLock/package.json +1 -1
  149. package/IconLogicalElement/package.json +1 -1
  150. package/IconMBU/package.json +1 -1
  151. package/IconMGRP/package.json +1 -1
  152. package/IconMLSP/package.json +1 -1
  153. package/IconMMP/package.json +1 -1
  154. package/IconMail/package.json +1 -1
  155. package/IconMap/package.json +1 -1
  156. package/IconMaxHeight/package.json +1 -1
  157. package/IconMaxWidth/package.json +1 -1
  158. package/IconMeatball/package.json +1 -1
  159. package/IconMic/package.json +1 -1
  160. package/IconMolecules/package.json +1 -1
  161. package/IconMoon/package.json +1 -1
  162. package/IconNodeEnd/package.json +1 -1
  163. package/IconNodeStart/package.json +1 -1
  164. package/IconNodeStep/package.json +1 -1
  165. package/IconNodes/package.json +1 -1
  166. package/IconOpenInNew/package.json +1 -1
  167. package/IconOperators/package.json +1 -1
  168. package/IconPanelBottom/package.json +1 -1
  169. package/IconPanelLeft/package.json +1 -1
  170. package/IconPanelRight/package.json +1 -1
  171. package/IconPanelTop/package.json +1 -1
  172. package/IconPaste/package.json +1 -1
  173. package/IconPause/package.json +1 -1
  174. package/IconPhone/package.json +1 -1
  175. package/IconPhoto/package.json +1 -1
  176. package/IconPicture/package.json +1 -1
  177. package/IconPlay/package.json +1 -1
  178. package/IconPressure/package.json +1 -1
  179. package/IconPriceLabel/package.json +1 -1
  180. package/IconProcessing/package.json +1 -1
  181. package/IconQuestion/package.json +1 -1
  182. package/IconQuote/package.json +1 -1
  183. package/IconRUO/package.json +1 -1
  184. package/IconRUS/package.json +1 -1
  185. package/IconRecord/package.json +1 -1
  186. package/IconRemove/package.json +1 -1
  187. package/IconRemoveFromComparison/package.json +1 -1
  188. package/IconReply/package.json +1 -1
  189. package/IconResize/package.json +1 -1
  190. package/IconRestart/package.json +1 -1
  191. package/IconRevert/package.json +1 -1
  192. package/IconRing/package.json +1 -1
  193. package/IconRouble/package.json +1 -1
  194. package/IconRuler/package.json +1 -1
  195. package/IconSave/package.json +1 -1
  196. package/IconScreen/package.json +1 -1
  197. package/IconSearch/package.json +1 -1
  198. package/IconSelect/package.json +1 -1
  199. package/IconSelectOpen/package.json +1 -1
  200. package/IconSendMessage/package.json +1 -1
  201. package/IconSettings/package.json +1 -1
  202. package/IconShape/package.json +1 -1
  203. package/IconShuffle/package.json +1 -1
  204. package/IconSmile/package.json +1 -1
  205. package/IconSortDown/package.json +1 -1
  206. package/IconSortDownCenter/package.json +1 -1
  207. package/IconSortUp/package.json +1 -1
  208. package/IconSortUpCenter/package.json +1 -1
  209. package/IconStop/package.json +1 -1
  210. package/IconStorage/package.json +1 -1
  211. package/IconStrikethrough/package.json +1 -1
  212. package/IconSun/package.json +1 -1
  213. package/IconTable/package.json +1 -1
  214. package/IconTable2/package.json +1 -1
  215. package/IconTarget/package.json +1 -1
  216. package/IconTeam/package.json +1 -1
  217. package/IconTechResponse/package.json +1 -1
  218. package/IconTest/package.json +1 -1
  219. package/IconThumbUp/package.json +1 -1
  220. package/IconTie/package.json +1 -1
  221. package/IconTop/package.json +1 -1
  222. package/IconTrash/package.json +1 -1
  223. package/IconType/package.json +1 -1
  224. package/IconUnderline/package.json +1 -1
  225. package/IconUnlock/package.json +1 -1
  226. package/IconUnsort/package.json +1 -1
  227. package/IconUnsortCenter/package.json +1 -1
  228. package/IconUpload/package.json +1 -1
  229. package/IconUser/package.json +1 -1
  230. package/IconVZD/package.json +1 -1
  231. package/IconVideo/package.json +1 -1
  232. package/IconVkontakte/package.json +1 -1
  233. package/IconWarning/package.json +1 -1
  234. package/IconWatch/package.json +1 -1
  235. package/IconWideScreen/package.json +1 -1
  236. package/IconWorld/package.json +1 -1
  237. package/IconWrench/package.json +1 -1
  238. package/IconYandexDzen/package.json +1 -1
  239. package/IconYoutube/package.json +1 -1
  240. package/Informer/package.json +1 -1
  241. package/LayoutCanary/package.json +1 -1
  242. package/Loader/package.json +1 -1
  243. package/MixCard/package.json +1 -1
  244. package/MixFocus/package.json +1 -1
  245. package/MixPopoverAnimate/package.json +1 -1
  246. package/MixPopoverArrow/package.json +1 -1
  247. package/MixSpace/package.json +1 -1
  248. package/MixVisuallyHidden/package.json +1 -1
  249. package/Modal/package.json +1 -1
  250. package/MultiComboboxDeprecated/package.json +1 -1
  251. package/Pagination/package.json +1 -1
  252. package/Popover/package.json +1 -1
  253. package/PortalWithTheme/package.json +1 -1
  254. package/ProgressSpin/package.json +1 -1
  255. package/ProgressStepBarCanary/package.json +1 -1
  256. package/README.md +6 -6
  257. package/Radio/package.json +1 -1
  258. package/RadioGroup/package.json +1 -1
  259. package/Responses/package.json +1 -1
  260. package/Responses403/package.json +1 -1
  261. package/Responses404/package.json +1 -1
  262. package/Responses500/package.json +1 -1
  263. package/Responses503/package.json +1 -1
  264. package/ResponsesConnectionError/package.json +1 -1
  265. package/ResponsesDeleted/package.json +1 -1
  266. package/ResponsesEmptyBox/package.json +1 -1
  267. package/ResponsesEmptyPockets/package.json +1 -1
  268. package/ResponsesExit/package.json +1 -1
  269. package/ResponsesImage/package.json +1 -1
  270. package/ResponsesImage403/package.json +1 -1
  271. package/ResponsesImage404/package.json +1 -1
  272. package/ResponsesImage500/package.json +1 -1
  273. package/ResponsesImage503/package.json +1 -1
  274. package/ResponsesImageConnectionError/package.json +1 -1
  275. package/ResponsesImageDeleted/package.json +1 -1
  276. package/ResponsesImageEmptyBox/package.json +1 -1
  277. package/ResponsesImageEmptyPockets/package.json +1 -1
  278. package/ResponsesImageNothingFound/package.json +1 -1
  279. package/ResponsesImageSuccess/package.json +1 -1
  280. package/ResponsesNothingFound/package.json +1 -1
  281. package/ResponsesSuccess/package.json +1 -1
  282. package/Select/package.json +1 -1
  283. package/Sidebar/package.json +1 -1
  284. package/Skeleton/package.json +1 -1
  285. package/SliderCanary/package.json +1 -1
  286. package/SnackBar/package.json +1 -1
  287. package/Steps/package.json +1 -1
  288. package/Switch/package.json +1 -1
  289. package/SwitchGroup/package.json +1 -1
  290. package/Table/package.json +1 -1
  291. package/Tabs/package.json +1 -1
  292. package/Tag/package.json +1 -1
  293. package/TagBase/package.json +1 -1
  294. package/Text/package.json +1 -1
  295. package/TextField/package.json +1 -1
  296. package/Theme/package.json +1 -1
  297. package/ThemeToggler/package.json +1 -1
  298. package/Timer/package.json +1 -1
  299. package/Tooltip/package.json +1 -1
  300. package/User/package.json +1 -1
  301. package/UserSelect/package.json +1 -1
  302. package/UserSelectDeprecated/package.json +1 -1
  303. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsCanary.js +9 -3
  304. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsFitModeDropdown/BreadcrumbsFitModeDropdown.js +2 -2
  305. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.css +20 -0
  306. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.d.ts +2 -14
  307. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.js +31 -8
  308. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.d.ts +7 -1
  309. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.js +24 -14
  310. package/__internal__/cjs-src/components/BreadcrumbsCanary/helpers.d.ts +267 -18
  311. package/__internal__/cjs-src/components/BreadcrumbsCanary/helpers.js +3 -10
  312. package/__internal__/cjs-src/components/BreadcrumbsCanary/types.d.ts +18 -0
  313. package/__internal__/cjs-src/components/ChoiceGroup/ChoiceGroup.css +4 -1
  314. package/__internal__/cjs-src/components/ChoiceGroup/ChoiceGroup.d.ts +1 -0
  315. package/__internal__/cjs-src/components/ChoiceGroup/ChoiceGroup.js +4 -2
  316. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +1 -0
  317. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +27 -5
  318. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +2 -0
  319. package/__internal__/cjs-src/components/ContextMenuCanary/helper.d.ts +2 -2
  320. package/__internal__/cjs-src/components/ContextMenuCanary/types.d.ts +2 -2
  321. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerCanary.js +12 -8
  322. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +6 -70
  323. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.d.ts +1 -1
  324. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.js +82 -13
  325. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js +9 -2
  326. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.d.ts +0 -2
  327. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.js +12 -22
  328. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +48 -0
  329. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js +75 -0
  330. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.d.ts +49 -0
  331. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.js +83 -0
  332. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeDateTime/DatePickerTypeDateTime.js +3 -3
  333. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeTime/DatePickerTypeTime.d.ts +2 -0
  334. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerTypeTime/DatePickerTypeTime.js +35 -0
  335. package/__internal__/cjs-src/components/DatePickerCanary/helpers.d.ts +6 -1
  336. package/__internal__/cjs-src/components/DatePickerCanary/helpers.js +33 -4
  337. package/__internal__/cjs-src/components/EventInterceptor/types.d.ts +1 -1
  338. package/__internal__/cjs-src/components/Modal/Modal.css +50 -25
  339. package/__internal__/cjs-src/components/Modal/Modal.js +3 -3
  340. package/__internal__/cjs-src/components/Pagination/Pagination.d.ts +0 -1
  341. package/__internal__/cjs-src/components/Pagination/Pagination.js +8 -11
  342. package/__internal__/cjs-src/components/PortalWithTheme/PortalWithTheme.js +15 -4
  343. package/__internal__/cjs-src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.d.ts +4 -1
  344. package/__internal__/cjs-src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.js +3 -2
  345. package/__internal__/cjs-src/components/SelectComponents/SelectDropdown/SelectDropdown.js +1 -1
  346. package/__internal__/cjs-src/components/Sidebar/Sidebar.css +10 -10
  347. package/__internal__/cjs-src/components/Sidebar/Sidebar.js +2 -2
  348. package/__internal__/cjs-src/hooks/useClickOutside/useClickOutside.d.ts +3 -3
  349. package/__internal__/cjs-src/hooks/useClickOutside/useClickOutside.js +18 -7
  350. package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_m.js +1 -1
  351. package/__internal__/cjs-src/icons/IconFacebook/IconFacebook_size_s.js +1 -1
  352. package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_m.js +1 -1
  353. package/__internal__/cjs-src/icons/IconInstagram/IconInstagram_size_s.js +1 -1
  354. package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_m.js +1 -1
  355. package/__internal__/cjs-src/icons/IconVkontakte/IconVkontakte_size_s.js +1 -1
  356. package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_m.js +1 -1
  357. package/__internal__/cjs-src/icons/IconYandexDzen/IconYandexDzen_size_s.js +1 -1
  358. package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_m.js +1 -1
  359. package/__internal__/cjs-src/icons/IconYoutube/IconYoutube_size_s.js +1 -1
  360. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsCanary.js +10 -4
  361. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsFitModeDropdown/BreadcrumbsFitModeDropdown.js +2 -2
  362. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.css +20 -0
  363. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.d.ts +2 -14
  364. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsItem/BreadcrumbsItem.js +33 -10
  365. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.d.ts +7 -1
  366. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsMore/BreadcrumbsMore.js +22 -15
  367. package/__internal__/src/components/BreadcrumbsCanary/helpers.d.ts +267 -18
  368. package/__internal__/src/components/BreadcrumbsCanary/helpers.js +2 -8
  369. package/__internal__/src/components/BreadcrumbsCanary/types.d.ts +18 -0
  370. package/__internal__/src/components/ChoiceGroup/ChoiceGroup.css +4 -1
  371. package/__internal__/src/components/ChoiceGroup/ChoiceGroup.d.ts +1 -0
  372. package/__internal__/src/components/ChoiceGroup/ChoiceGroup.js +4 -2
  373. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +1 -0
  374. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +25 -4
  375. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +3 -1
  376. package/__internal__/src/components/ContextMenuCanary/helper.d.ts +2 -2
  377. package/__internal__/src/components/ContextMenuCanary/types.d.ts +2 -2
  378. package/__internal__/src/components/DatePickerCanary/DatePickerCanary.js +14 -10
  379. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +9 -73
  380. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.d.ts +1 -1
  381. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/helpers.js +81 -12
  382. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.js +11 -4
  383. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.d.ts +0 -2
  384. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDateTime/helpers.js +13 -23
  385. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +48 -0
  386. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/DatePickerFieldTypeTime.js +72 -0
  387. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.d.ts +49 -0
  388. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeTime/helpers.js +80 -0
  389. package/__internal__/src/components/DatePickerCanary/DatePickerTypeDateTime/DatePickerTypeDateTime.js +3 -3
  390. package/__internal__/src/components/DatePickerCanary/DatePickerTypeTime/DatePickerTypeTime.d.ts +2 -0
  391. package/__internal__/src/components/DatePickerCanary/DatePickerTypeTime/DatePickerTypeTime.js +32 -0
  392. package/__internal__/src/components/DatePickerCanary/helpers.d.ts +6 -1
  393. package/__internal__/src/components/DatePickerCanary/helpers.js +32 -3
  394. package/__internal__/src/components/EventInterceptor/types.d.ts +1 -1
  395. package/__internal__/src/components/Modal/Modal.css +50 -25
  396. package/__internal__/src/components/Modal/Modal.js +3 -3
  397. package/__internal__/src/components/Pagination/Pagination.d.ts +0 -1
  398. package/__internal__/src/components/Pagination/Pagination.js +7 -10
  399. package/__internal__/src/components/PortalWithTheme/PortalWithTheme.js +15 -4
  400. package/__internal__/src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.d.ts +4 -1
  401. package/__internal__/src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.js +3 -2
  402. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +1 -1
  403. package/__internal__/src/components/Sidebar/Sidebar.css +10 -10
  404. package/__internal__/src/components/Sidebar/Sidebar.js +2 -2
  405. package/__internal__/src/hooks/useClickOutside/useClickOutside.d.ts +3 -3
  406. package/__internal__/src/hooks/useClickOutside/useClickOutside.js +18 -7
  407. package/__internal__/src/icons/IconFacebook/IconFacebook_size_m.js +1 -1
  408. package/__internal__/src/icons/IconFacebook/IconFacebook_size_s.js +1 -1
  409. package/__internal__/src/icons/IconInstagram/IconInstagram_size_m.js +1 -1
  410. package/__internal__/src/icons/IconInstagram/IconInstagram_size_s.js +1 -1
  411. package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_m.js +1 -1
  412. package/__internal__/src/icons/IconVkontakte/IconVkontakte_size_s.js +1 -1
  413. package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_m.js +1 -1
  414. package/__internal__/src/icons/IconYandexDzen/IconYandexDzen_size_s.js +1 -1
  415. package/__internal__/src/icons/IconYoutube/IconYoutube_size_m.js +1 -1
  416. package/__internal__/src/icons/IconYoutube/IconYoutube_size_s.js +1 -1
  417. package/createIcon/package.json +1 -1
  418. package/createResponsesImage/package.json +1 -1
  419. package/package.json +2 -2
  420. package/useBreakpoints/package.json +1 -1
  421. package/useChoiceGroup/package.json +1 -1
  422. package/useChoiceGroupIndexed/package.json +1 -1
  423. package/useClickOutside/package.json +1 -1
  424. package/useComponentSize/package.json +1 -1
  425. package/useDebounce/package.json +1 -1
  426. package/useFlag/package.json +1 -1
  427. package/useForkRef/package.json +1 -1
  428. package/useGlobalKeys/package.json +1 -1
  429. package/useHideElementsInLine/package.json +1 -1
  430. package/useKeys/package.json +1 -1
  431. package/useMutableRef/package.json +1 -1
  432. package/useOverflow/package.json +1 -1
  433. package/usePrevious/package.json +1 -1
  434. package/useRefs/package.json +1 -1
  435. package/useResizeObserved/package.json +1 -1
  436. package/useScrollElements/package.json +1 -1
  437. package/useScrollPosition/package.json +1 -1
  438. package/useSelect/package.json +1 -1
  439. package/useSortSteps/package.json +1 -1
  440. package/useThemeVars/package.json +1 -1
  441. package/useTimer/package.json +1 -1
  442. package/withTooltip/package.json +1 -1
@@ -24,7 +24,7 @@ var sizeMap = {
24
24
  };
25
25
  exports.cnChoiceGroup = bem_1.cn('ChoiceGroup');
26
26
  exports.ChoiceGroup = react_1["default"].forwardRef(function (props, ref) {
27
- var _a = props.size, size = _a === void 0 ? exports.choiceGroupDefaultSize : _a, _b = props.form, form = _b === void 0 ? exports.choiceGroupDefaultForm : _b, _c = props.view, view = _c === void 0 ? exports.choiceGroupDefaultView : _c, _d = props.width, width = _d === void 0 ? exports.choiceGroupWidthDefault : _d, onlyIcon = props.onlyIcon, iconSizeProp = props.iconSize, _e = props.value, value = _e === void 0 ? null : _e, _f = props.multiple, multiple = _f === void 0 ? false : _f, items = props.items, getLabel = props.getLabel, onChange = props.onChange, getIcon = props.getIcon, name = props.name, className = props.className, _g = props.disabled, disabled = _g === void 0 ? false : _g, getDisabled = props.getDisabled, otherProps = tslib_1.__rest(props, ["size", "form", "view", "width", "onlyIcon", "iconSize", "value", "multiple", "items", "getLabel", "onChange", "getIcon", "name", "className", "disabled", "getDisabled"]);
27
+ var _a = props.size, size = _a === void 0 ? exports.choiceGroupDefaultSize : _a, _b = props.form, form = _b === void 0 ? exports.choiceGroupDefaultForm : _b, _c = props.view, view = _c === void 0 ? exports.choiceGroupDefaultView : _c, _d = props.width, width = _d === void 0 ? exports.choiceGroupWidthDefault : _d, onlyIcon = props.onlyIcon, iconSizeProp = props.iconSize, _e = props.value, value = _e === void 0 ? null : _e, _f = props.multiple, multiple = _f === void 0 ? false : _f, items = props.items, getLabel = props.getLabel, onChange = props.onChange, getIcon = props.getIcon, name = props.name, className = props.className, _g = props.disabled, disabled = _g === void 0 ? false : _g, getDisabled = props.getDisabled, truncate = props.truncate, otherProps = tslib_1.__rest(props, ["size", "form", "view", "width", "onlyIcon", "iconSize", "value", "multiple", "items", "getLabel", "onChange", "getIcon", "name", "className", "disabled", "getDisabled", "truncate"]);
28
28
  var _h = useChoiceGroup_1.useChoiceGroup({
29
29
  value: value,
30
30
  getKey: getLabel,
@@ -32,7 +32,9 @@ exports.ChoiceGroup = react_1["default"].forwardRef(function (props, ref) {
32
32
  multiple: multiple
33
33
  }), getOnChange = _h.getOnChange, getChecked = _h.getChecked;
34
34
  var iconSize = getByMap_1.getByMap(sizeMap, size, iconSizeProp);
35
- return (react_1["default"].createElement("div", tslib_1.__assign({}, otherProps, { ref: ref, className: exports.cnChoiceGroup({ size: size, form: form, view: view, width: width, onlyIcon: onlyIcon, disabled: disabled }, [className]) }), items.map(function (item, idx) {
35
+ return (react_1["default"].createElement("div", tslib_1.__assign({}, otherProps, { ref: ref, className: exports.cnChoiceGroup({ size: size, form: form, view: view, width: width, onlyIcon: onlyIcon, disabled: disabled, truncate: truncate }, [
36
+ className,
37
+ ]) }), items.map(function (item, idx) {
36
38
  var itemChecked = getChecked(item);
37
39
  var itemDisabled = !!getDisabled && getDisabled(item);
38
40
  return (react_1["default"].createElement(react_1["default"].Fragment, { key: getLabel(item) },
@@ -1,4 +1,5 @@
1
1
  import './ContextMenuLevel.css';
2
2
  import { ContextMenuLevelComponent } from '../types';
3
3
  export declare const cnContextMenuLevel: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare function clearTimers(): void;
4
5
  export declare const ContextMenuLevel: ContextMenuLevelComponent;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.ContextMenuLevel = exports.cnContextMenuLevel = void 0;
3
+ exports.ContextMenuLevel = exports.clearTimers = exports.cnContextMenuLevel = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  require("./ContextMenuLevel.css");
6
6
  var react_1 = tslib_1.__importStar(require("react"));
@@ -24,6 +24,26 @@ var renderHeader = function (groupLabel, first, size) {
24
24
  }
25
25
  return (react_1["default"].createElement(Text_1.Text, { view: "secondary", transform: "uppercase", className: exports.cnContextMenuLevel('Header', { size: size, first: first }), size: getByMap_1.getByMap(helper_1.sizeMapHeader, size) }, groupLabel));
26
26
  };
27
+ var timers = [];
28
+ function clearTimers() {
29
+ var e_1, _a;
30
+ try {
31
+ for (var timers_1 = tslib_1.__values(timers), timers_1_1 = timers_1.next(); !timers_1_1.done; timers_1_1 = timers_1.next()) {
32
+ var timer = timers_1_1.value;
33
+ clearTimeout(timer);
34
+ }
35
+ }
36
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
37
+ finally {
38
+ try {
39
+ if (timers_1_1 && !timers_1_1.done && (_a = timers_1["return"])) _a.call(timers_1);
40
+ }
41
+ finally { if (e_1) throw e_1.error; }
42
+ }
43
+ timers = [];
44
+ }
45
+ exports.clearTimers = clearTimers;
46
+ var closeDelay = 300;
27
47
  function ContextMenuLevelRender(props, ref) {
28
48
  var _a = props.size, size = _a === void 0 ? types_1.contextMenuDefaultSize : _a, items = props.items, groupsProp = props.groups, className = props.className,
29
49
  // Свойства относящиеся к меню
@@ -37,7 +57,7 @@ function ContextMenuLevelRender(props, ref) {
37
57
  var _b = tslib_1.__read(useFlag_1.useFlag(false), 2), hovered = _b[0], setHovered = _b[1];
38
58
  var groups = getGroups_1.getGroups(items, getItemGroupId, groupsProp, getGroupId, sortGroup && (function (a, b) { return sortGroup(a.key, b.key); }));
39
59
  var constructItemRefs = function () {
40
- var e_1, _a;
60
+ var e_2, _a;
41
61
  var refs = {};
42
62
  try {
43
63
  for (var groups_1 = tslib_1.__values(groups), groups_1_1 = groups_1.next(); !groups_1_1.done; groups_1_1 = groups_1.next()) {
@@ -47,20 +67,22 @@ function ContextMenuLevelRender(props, ref) {
47
67
  }
48
68
  }
49
69
  }
50
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
70
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
51
71
  finally {
52
72
  try {
53
73
  if (groups_1_1 && !groups_1_1.done && (_a = groups_1["return"])) _a.call(groups_1);
54
74
  }
55
- finally { if (e_1) throw e_1.error; }
75
+ finally { if (e_2) throw e_2.error; }
56
76
  }
57
77
  return refs;
58
78
  };
59
79
  var itemsRefs = react_1.useMemo(constructItemRefs, [items, groupsProp]);
60
80
  react_1.useEffect(function () {
61
81
  if (levelDepth !== 0 && !hovered && hoveredParenLevel < levelDepth) {
62
- setTimeout(function () { return deleteLevel(levelDepth); }, 300);
82
+ clearTimeout(timers[levelDepth]);
83
+ timers[levelDepth] = setTimeout(function () { return deleteLevel(levelDepth); }, closeDelay);
63
84
  }
85
+ return function () { return clearTimeout(timers[levelDepth]); };
64
86
  }, [hovered, hoveredParenLevel]);
65
87
  var onMouseEnter = function (item, itemIndex) {
66
88
  var subMenu = getItemSubMenu(item);
@@ -57,6 +57,7 @@ function ContextMenuLevelsRender(propsComponent, ref) {
57
57
  handler: function (e) { return onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside(e); }
58
58
  });
59
59
  react_1.useEffect(function () {
60
+ ContextMenuLevel_1.clearTimers();
60
61
  setLevels(helper_1.getLevels({
61
62
  levels: levels,
62
63
  items: items,
@@ -64,6 +65,7 @@ function ContextMenuLevelsRender(propsComponent, ref) {
64
65
  getItemKey: getItemKey,
65
66
  getItemSubMenu: getItemSubMenu
66
67
  }));
68
+ return function () { return ContextMenuLevel_1.clearTimers(); };
67
69
  }, [items]);
68
70
  var firstLevelRef = useForkRef_1.useForkRef([levelsRefs[0], ref]);
69
71
  return (react_1["default"].createElement(react_1["default"].Fragment, null, levels.map(function (level, index) { return (react_1["default"].createElement(ContextMenuLevel_1.ContextMenuLevel, tslib_1.__assign({}, otherProps, level, { key: "ContextMenu-" + index, style: tslib_1.__assign(tslib_1.__assign({}, style), {
@@ -6,7 +6,7 @@ export declare function withDefaultGetters<ITEM, GROUP>(props: ContextMenuProps<
6
6
  items: ITEM[];
7
7
  size?: "xs" | "s" | "m" | "l" | undefined;
8
8
  direction?: "downCenter" | "upCenter" | "downRight" | "downLeft" | "upRight" | "upLeft" | "leftUp" | "leftCenter" | "leftDown" | "rightUp" | "rightCenter" | "rightDown" | "downStartLeft" | "upStartLeft" | "downStartRight" | "upStartRight" | "leftStartUp" | "leftStartDown" | "rightStartUp" | "rightStartDown" | undefined;
9
- offset?: number | undefined;
9
+ offset?: number | "xs" | "s" | "m" | "l" | "2xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "3xs" | undefined;
10
10
  groups?: GROUP[] | undefined;
11
11
  sortGroup?: import("./types").ContextMenuPropSortGroup | undefined;
12
12
  onItemClick?: import("./types").ContextMenuPropOnClick<ITEM> | undefined;
@@ -47,7 +47,7 @@ export declare function withDefaultGetters<ITEM, GROUP>(props: ContextMenuProps<
47
47
  items: ITEM[];
48
48
  size?: "xs" | "s" | "m" | "l" | undefined;
49
49
  direction?: "downCenter" | "upCenter" | "downRight" | "downLeft" | "upRight" | "upLeft" | "leftUp" | "leftCenter" | "leftDown" | "rightUp" | "rightCenter" | "rightDown" | "downStartLeft" | "upStartLeft" | "downStartRight" | "upStartRight" | "leftStartUp" | "leftStartDown" | "rightStartUp" | "rightStartDown" | undefined;
50
- offset?: number | undefined;
50
+ offset?: number | "xs" | "s" | "m" | "l" | "2xs" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "3xs" | undefined;
51
51
  groups?: GROUP[] | undefined;
52
52
  sortGroup?: import("./types").ContextMenuPropSortGroup | undefined;
53
53
  onItemClick?: import("./types").ContextMenuPropOnClick<ITEM> | undefined;
@@ -3,7 +3,7 @@ import { ClickOutsideHandler } from '../../hooks/useClickOutside/useClickOutside
3
3
  import { IconComponent } from '../../icons/Icon/Icon';
4
4
  import { PropsWithAsAttributes } from '../../utils/types/PropsWithAsAttributes';
5
5
  import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
6
- import { Direction, Position } from '../Popover/Popover';
6
+ import { Direction, PopoverPropOffset, Position } from '../Popover/Popover';
7
7
  export declare const contextMenuSizes: readonly ["m", "xs", "s", "l"];
8
8
  export declare type ContextMenuPropSize = typeof contextMenuSizes[number];
9
9
  export declare const contextMenuDefaultSize: ContextMenuPropSize;
@@ -95,7 +95,7 @@ export declare type ContextMenuProps<ITEM = ContextMenuItemDefault, GROUP = Cont
95
95
  items: ITEM[];
96
96
  size?: ContextMenuPropSize;
97
97
  direction?: Direction;
98
- offset?: number;
98
+ offset?: PopoverPropOffset;
99
99
  groups?: GROUP[];
100
100
  sortGroup?: ContextMenuPropSortGroup;
101
101
  onItemClick?: ContextMenuPropOnClick<ITEM>;
@@ -11,24 +11,28 @@ var DatePickerTypeDate_1 = require("./DatePickerTypeDate/DatePickerTypeDate");
11
11
  var DatePickerTypeDateRange_1 = require("./DatePickerTypeDateRange/DatePickerTypeDateRange");
12
12
  var DatePickerTypeDateTime_1 = require("./DatePickerTypeDateTime/DatePickerTypeDateTime");
13
13
  var DatePickerTypeDateTimeRange_1 = require("./DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange");
14
+ var DatePickerTypeTime_1 = require("./DatePickerTypeTime/DatePickerTypeTime");
14
15
  var helpers_1 = require("./helpers");
15
16
  var typeMap = {
16
17
  'date': DatePickerTypeDate_1.DatePickerTypeDate,
17
18
  'date-range': DatePickerTypeDateRange_1.DatePickerTypeDateRange,
18
19
  'date-time': DatePickerTypeDateTime_1.DatePickerTypeDateTime,
19
- 'date-time-range': DatePickerTypeDateTimeRange_1.DatePickerTypeDateTimeRange
20
+ 'date-time-range': DatePickerTypeDateTimeRange_1.DatePickerTypeDateTimeRange,
21
+ 'time': DatePickerTypeTime_1.DatePickerTypeTime
20
22
  };
21
23
  exports.COMPONENT_NAME = 'DatePicker';
22
24
  exports.DatePicker = react_1.forwardRef(function (props, ref) {
23
25
  var datePickerRef = react_1.useRef(null);
24
26
  var _a = usePropsHandler_1.usePropsHandler(exports.COMPONENT_NAME, props, datePickerRef), _b = _a.type, type = _b === void 0 ? helpers_1.datePickerPropTypeDefault : _b, _c = _a.minDate, minDate = _c === void 0 ? date_1.minDateDefault : _c, _d = _a.maxDate, maxDate = _d === void 0 ? date_1.maxDateDefault : _d, multiplicityMinutes = _a.multiplicityMinutes, multiplicitySeconds = _a.multiplicitySeconds, multiplicityHours = _a.multiplicityHours, otherProps = tslib_1.__rest(_a, ["type", "minDate", "maxDate", "multiplicityMinutes", "multiplicitySeconds", "multiplicityHours"]);
25
- var timeProps = type === 'date-time'
26
- ? {
27
- multiplicityMinutes: multiplicityMinutes,
28
- multiplicitySeconds: multiplicitySeconds,
29
- multiplicityHours: multiplicityHours
30
- }
31
- : undefined;
27
+ var timeProps = react_1.useMemo(function () {
28
+ return helpers_1.isTypeWithTime(type)
29
+ ? {
30
+ multiplicityMinutes: multiplicityMinutes,
31
+ multiplicitySeconds: multiplicitySeconds,
32
+ multiplicityHours: multiplicityHours
33
+ }
34
+ : undefined;
35
+ }, [type, multiplicityMinutes, multiplicitySeconds, multiplicityHours]);
32
36
  var Component = getByMap_1.getByMap(typeMap, type);
33
37
  return (react_1["default"].createElement(Component, tslib_1.__assign({}, otherProps, timeProps, { minDate: minDate, maxDate: maxDate, ref: useForkRef_1.useForkRef([ref, datePickerRef]) })));
34
38
  });
@@ -4,7 +4,6 @@ exports.DatePickerFieldTypeDate = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var react_1 = tslib_1.__importStar(require("react"));
6
6
  var date_fns_1 = require("date-fns");
7
- var imask_1 = tslib_1.__importDefault(require("imask"));
8
7
  var useForkRef_1 = require("../../../hooks/useForkRef/useForkRef");
9
8
  var useMutableRef_1 = require("../../../hooks/useMutableRef/useMutableRef");
10
9
  var date_1 = require("../../../utils/date");
@@ -14,7 +13,6 @@ var helpers_2 = require("./helpers");
14
13
  exports.DatePickerFieldTypeDate = react_1["default"].forwardRef(function (props, ref) {
15
14
  var _a = props.format, formatProp = _a === void 0 ? helpers_1.datePickerPropFormatTypeDate : _a, _b = props.separator, separator = _b === void 0 ? helpers_1.datePickerPropSeparatorDefault : _b, _c = props.placeholder, placeholder = _c === void 0 ? helpers_1.datePickerPropPlaceholderTypeDate : _c, onChange = props.onChange, onError = props.onError, _d = props.minDate, minDate = _d === void 0 ? date_1.minDateDefault : _d, _e = props.maxDate, maxDate = _e === void 0 ? date_1.maxDateDefault : _e, value = props.value, inputRefProp = props.inputRef, otherProps = tslib_1.__rest(props, ["format", "separator", "placeholder", "onChange", "onError", "minDate", "maxDate", "value", "inputRef"]);
16
15
  var inputRef = react_1.useRef(null);
17
- var imaskRef = react_1.useRef(null);
18
16
  var onChangeRef = useMutableRef_1.useMutableRef(onChange);
19
17
  var _f = tslib_1.__read(react_1.useState(value && date_fns_1.isValid(value) ? date_fns_1.format(value, formatProp) : null), 2), stringValue = _f[0], setStringValue = _f[1];
20
18
  var handleChange = react_1.useCallback(function (e, stringValue) {
@@ -25,7 +23,11 @@ exports.DatePickerFieldTypeDate = react_1["default"].forwardRef(function (props,
25
23
  onChange({ e: e, value: null });
26
24
  return;
27
25
  }
28
- var _a = tslib_1.__read(helpers_2.getPartsDate(stringValue, formatProp, separator), 3), dd = _a[0], MM = _a[1], yyyy = _a[2];
26
+ var _a = tslib_1.__read(helpers_1.getPartsDate(stringValue, formatProp, separator, false, [
27
+ 'dd',
28
+ 'MM',
29
+ 'yyyy',
30
+ ]), 3), dd = _a[0], MM = _a[1], yyyy = _a[2];
29
31
  if (dd && MM && yyyy) {
30
32
  var date = date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + yyyy, helpers_1.datePickerPropFormatTypeDate, new Date());
31
33
  if (!date_fns_1.isWithinInterval(date, { start: minDate, end: maxDate })) {
@@ -48,6 +50,7 @@ exports.DatePickerFieldTypeDate = react_1["default"].forwardRef(function (props,
48
50
  }
49
51
  }
50
52
  }, [minDate === null || minDate === void 0 ? void 0 : minDate.getTime(), maxDate === null || maxDate === void 0 ? void 0 : maxDate.getTime(), formatProp, separator]);
53
+ helpers_2.useImask(formatProp, separator, inputRef, stringValue, onError);
51
54
  // при изменении value, нужно обновить stringValue
52
55
  react_1.useEffect(function () {
53
56
  if (value && date_fns_1.isValid(value)) {
@@ -63,66 +66,6 @@ exports.DatePickerFieldTypeDate = react_1["default"].forwardRef(function (props,
63
66
  }, [value === null || value === void 0 ? void 0 : value.getTime()]);
64
67
  // задаем маску и сохраняем обьект маски в ref
65
68
  // обнавляем при смене формата
66
- react_1.useEffect(function () {
67
- if (inputRef.current) {
68
- imaskRef.current = imask_1["default"](inputRef.current, {
69
- mask: Date,
70
- pattern: formatProp,
71
- blocks: {
72
- yyyy: {
73
- mask: imask_1["default"].MaskedRange,
74
- from: 1,
75
- to: 9999
76
- },
77
- MM: {
78
- mask: imask_1["default"].MaskedRange,
79
- from: 1,
80
- to: 12
81
- },
82
- dd: {
83
- mask: imask_1["default"].MaskedRange,
84
- from: 1,
85
- to: 31
86
- }
87
- },
88
- lazy: true,
89
- autofix: true,
90
- format: function (date) { return date_fns_1.format(date, formatProp); },
91
- parse: function (string) { return date_fns_1.parse(string, formatProp, new Date()); },
92
- validate: function (string) {
93
- var _a = tslib_1.__read(helpers_2.getPartsDate(string, formatProp, separator), 3), dd = _a[0], MM = _a[1], yyyy = _a[2];
94
- if (dd &&
95
- MM &&
96
- !date_fns_1.isValid(date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + date_1.leapYear, helpers_1.datePickerPropFormatTypeDate, new Date()))) {
97
- onError &&
98
- onError({
99
- type: helpers_1.datePickerErrorTypes[1],
100
- stringValue: string,
101
- dd: dd,
102
- MM: MM,
103
- yyyy: yyyy
104
- });
105
- return false;
106
- }
107
- if (dd &&
108
- MM &&
109
- yyyy &&
110
- !date_fns_1.isValid(date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + yyyy, helpers_1.datePickerPropFormatTypeDate, new Date()))) {
111
- onError &&
112
- onError({
113
- type: helpers_1.datePickerErrorTypes[1],
114
- stringValue: string,
115
- dd: dd,
116
- MM: MM,
117
- yyyy: yyyy
118
- });
119
- return false;
120
- }
121
- return true;
122
- }
123
- });
124
- }
125
- }, [formatProp, separator]);
126
69
  // задаем нативный oninput, так как с маской по другому не будет работать
127
70
  // обнавляем oninput при смене handleChange
128
71
  react_1.useEffect(function () {
@@ -133,12 +76,5 @@ exports.DatePickerFieldTypeDate = react_1["default"].forwardRef(function (props,
133
76
  };
134
77
  }
135
78
  }, [handleChange]);
136
- // Нужно для синхранизации value c Imask,
137
- // так как value мы можем задать через пропс без самого ввода,
138
- // и Imask требует ручной синхронихации в этом случае
139
- react_1.useEffect(function () {
140
- var _a;
141
- (_a = imaskRef.current) === null || _a === void 0 ? void 0 : _a.updateValue();
142
- }, [stringValue]);
143
79
  return (react_1["default"].createElement(TextField_1.TextField, tslib_1.__assign({}, otherProps, { type: "text", inputContainerRef: ref, inputRef: useForkRef_1.useForkRef([inputRef, inputRefProp]), value: stringValue, placeholder: placeholder })));
144
80
  });
@@ -42,5 +42,5 @@ export declare type DatePickerFieldTypeDateProps = PropsWithHTMLAttributes<{
42
42
  caption?: string;
43
43
  labelPosition?: 'top' | 'left';
44
44
  }, HTMLDivElement>;
45
- export declare const getPartsDate: (value: string, format: string, separator: string, markers?: string[]) => (string | undefined)[];
45
+ export declare const useImask: (formatProp: string, separator: string, inputRef: React.RefObject<HTMLInputElement>, stringValue: string | null, onError: DatePickerPropOnError | undefined) => void;
46
46
  export {};
@@ -1,16 +1,85 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.getPartsDate = void 0;
4
- var getPartDate = function (formatArray, stringArray, marker) {
5
- var index = formatArray.indexOf(marker);
6
- if (index >= 0 && stringArray[index] && stringArray[index].length === marker.length) {
7
- return stringArray[index];
8
- }
9
- return undefined;
10
- };
11
- exports.getPartsDate = function (value, format, separator, markers) {
12
- if (markers === void 0) { markers = ['dd', 'MM', 'yyyy']; }
13
- var formatArray = format.split(separator);
14
- var valueArray = value.split(separator);
15
- return markers.map(function (marker) { return getPartDate(formatArray, valueArray, marker); });
3
+ exports.useImask = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var react_1 = require("react");
6
+ var date_fns_1 = require("date-fns");
7
+ var imask_1 = tslib_1.__importDefault(require("imask"));
8
+ var date_1 = require("../../../utils/date");
9
+ var helpers_1 = require("../helpers");
10
+ exports.useImask = function (formatProp, separator, inputRef, stringValue, onError) {
11
+ var imaskRef = react_1.useRef(null);
12
+ // задаем маску и сохраняем обьект маски в ref
13
+ // обнавляем при смене формата
14
+ react_1.useEffect(function () {
15
+ if (inputRef.current) {
16
+ imaskRef.current = imask_1["default"](inputRef.current, {
17
+ mask: Date,
18
+ pattern: formatProp,
19
+ blocks: {
20
+ yyyy: {
21
+ mask: imask_1["default"].MaskedRange,
22
+ from: 1,
23
+ to: 9999
24
+ },
25
+ MM: {
26
+ mask: imask_1["default"].MaskedRange,
27
+ from: 1,
28
+ to: 12
29
+ },
30
+ dd: {
31
+ mask: imask_1["default"].MaskedRange,
32
+ from: 1,
33
+ to: 31
34
+ }
35
+ },
36
+ lazy: true,
37
+ autofix: true,
38
+ format: function (date) { return date_fns_1.format(date, formatProp); },
39
+ parse: function (string) { return date_fns_1.parse(string, formatProp, new Date()); },
40
+ validate: function (string) {
41
+ var _a = tslib_1.__read(helpers_1.getPartsDate(string, formatProp, separator, false, [
42
+ 'dd',
43
+ 'MM',
44
+ 'yyyy',
45
+ ]), 3), dd = _a[0], MM = _a[1], yyyy = _a[2];
46
+ if (dd &&
47
+ MM &&
48
+ !date_fns_1.isValid(date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + date_1.leapYear, helpers_1.datePickerPropFormatTypeDate, new Date()))) {
49
+ onError &&
50
+ onError({
51
+ type: helpers_1.datePickerErrorTypes[1],
52
+ stringValue: string,
53
+ dd: dd,
54
+ MM: MM,
55
+ yyyy: yyyy
56
+ });
57
+ return false;
58
+ }
59
+ if (dd &&
60
+ MM &&
61
+ yyyy &&
62
+ !date_fns_1.isValid(date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + yyyy, helpers_1.datePickerPropFormatTypeDate, new Date()))) {
63
+ onError &&
64
+ onError({
65
+ type: helpers_1.datePickerErrorTypes[1],
66
+ stringValue: string,
67
+ dd: dd,
68
+ MM: MM,
69
+ yyyy: yyyy
70
+ });
71
+ return false;
72
+ }
73
+ return true;
74
+ }
75
+ });
76
+ }
77
+ }, [formatProp, separator]);
78
+ // Нужно для синхранизации value c Imask,
79
+ // так как value мы можем задать через пропс без самого ввода,
80
+ // и Imask требует ручной синхронихации в этом случае
81
+ react_1.useEffect(function () {
82
+ var _a;
83
+ (_a = imaskRef.current) === null || _a === void 0 ? void 0 : _a.updateValue();
84
+ }, [stringValue]);
16
85
  };
@@ -15,7 +15,7 @@ exports.DatePickerFieldTypeDateTime = react_1["default"].forwardRef(function (pr
15
15
  var inputRef = react_1.useRef(null);
16
16
  var onChangeRef = useMutableRef_1.useMutableRef(onChange);
17
17
  var _f = tslib_1.__read(react_1.useState(value && date_fns_1.isValid(value) ? date_fns_1.format(value, formatProp) : null), 2), stringValue = _f[0], setStringValue = _f[1];
18
- var formatParts = react_1.useMemo(function () { return helpers_2.getParts(formatProp, separator); }, [formatProp, separator]);
18
+ var formatParts = react_1.useMemo(function () { return helpers_1.getParts(formatProp, separator, true); }, [formatProp, separator]);
19
19
  var handleChange = react_1.useCallback(function (e, stringValue) {
20
20
  setStringValue(stringValue);
21
21
  var onChange = onChangeRef.current;
@@ -24,7 +24,14 @@ exports.DatePickerFieldTypeDateTime = react_1["default"].forwardRef(function (pr
24
24
  onChange({ e: e, value: null });
25
25
  return;
26
26
  }
27
- var partsDate = helpers_2.getPartsDate(stringValue, formatProp, separator);
27
+ var partsDate = helpers_1.getPartsDate(stringValue, formatProp, separator, true, [
28
+ 'dd',
29
+ 'MM',
30
+ 'yyyy',
31
+ 'HH',
32
+ 'mm',
33
+ 'ss',
34
+ ]);
28
35
  var _a = tslib_1.__read(partsDate, 6), dd = _a[0], MM = _a[1], yyyy = _a[2], HH = _a[3], mm = _a[4], ss = _a[5];
29
36
  if (partsDate.filter(function (item) { return !!item; }).length === formatParts.length) {
30
37
  var date = date_fns_1.parse("" + dd + helpers_1.datePickerPropSeparatorDefault + MM + helpers_1.datePickerPropSeparatorDefault + yyyy + " " + (HH ||
@@ -45,7 +45,5 @@ export declare type DatePickerFieldTypeDateTimeProps = PropsWithHTMLAttributes<{
45
45
  caption?: string;
46
46
  labelPosition?: 'top' | 'left';
47
47
  }, HTMLDivElement>;
48
- export declare const getParts: (format: string, separator: string) => string[];
49
- export declare const getPartsDate: (value: string, format: string, separator: string, markers?: string[]) => (string | undefined)[];
50
48
  export declare const useImask: (formatProp: string, separator: string, multiplicityHours: number | undefined, multiplicitySeconds: number | undefined, multiplicityMinutes: number | undefined, inputRef: React.RefObject<HTMLInputElement>, stringValue: string | null, onError: DatePickerPropOnError | undefined) => void;
51
49
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.useImask = exports.getPartsDate = exports.getParts = void 0;
3
+ exports.useImask = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  var react_1 = require("react");
6
6
  var date_fns_1 = require("date-fns");
@@ -8,23 +8,6 @@ var imask_1 = tslib_1.__importDefault(require("imask"));
8
8
  var date_1 = require("../../../utils/date");
9
9
  var helpers_1 = require("../../DateTimeCanary/helpers");
10
10
  var helpers_2 = require("../helpers");
11
- var getPartDate = function (formatArray, stringArray, marker) {
12
- var index = formatArray.indexOf(marker);
13
- if (index >= 0 && stringArray[index] && stringArray[index].length === marker.length) {
14
- return stringArray[index];
15
- }
16
- return undefined;
17
- };
18
- exports.getParts = function (format, separator) {
19
- var _a = tslib_1.__read(format.split(' '), 2), date = _a[0], time = _a[1];
20
- return tslib_1.__spread((date ? date.split(separator) : []), (time ? time.split(':') : []));
21
- };
22
- exports.getPartsDate = function (value, format, separator, markers) {
23
- if (markers === void 0) { markers = ['dd', 'MM', 'yyyy', 'HH', 'mm', 'ss']; }
24
- var formatArray = exports.getParts(format, separator);
25
- var stringArray = exports.getParts(value, separator);
26
- return markers.map(function (marker) { return getPartDate(formatArray, stringArray, marker); });
27
- };
28
11
  exports.useImask = function (formatProp, separator, multiplicityHours, multiplicitySeconds, multiplicityMinutes, inputRef, stringValue, onError) {
29
12
  var imaskRef = react_1.useRef(null);
30
13
  // задаем маску и сохраняем обьект маски в ref
@@ -52,7 +35,7 @@ exports.useImask = function (formatProp, separator, multiplicityHours, multiplic
52
35
  from: 1,
53
36
  to: 31
54
37
  },
55
- HH: multiplicityHours && multiplicityHours > 0
38
+ HH: multiplicityHours && multiplicityHours > 1
56
39
  ? {
57
40
  mask: imask_1["default"].MaskedEnum,
58
41
  "enum": helpers_2.getTimeEnum(24, multiplicityHours, date_fns_1.startOfDay, date_fns_1.addHours, helpers_1.getLabelHours)
@@ -62,7 +45,7 @@ exports.useImask = function (formatProp, separator, multiplicityHours, multiplic
62
45
  from: 0,
63
46
  to: 23
64
47
  },
65
- mm: multiplicityMinutes && multiplicityMinutes > 0
48
+ mm: multiplicityMinutes && multiplicityMinutes > 1
66
49
  ? {
67
50
  mask: imask_1["default"].MaskedEnum,
68
51
  "enum": helpers_2.getTimeEnum(60, multiplicityMinutes, date_fns_1.startOfHour, date_fns_1.addMinutes, helpers_1.getLabelMinutes)
@@ -72,7 +55,7 @@ exports.useImask = function (formatProp, separator, multiplicityHours, multiplic
72
55
  from: 0,
73
56
  to: 59
74
57
  },
75
- ss: multiplicitySeconds && multiplicitySeconds > 0
58
+ ss: multiplicitySeconds && multiplicitySeconds > 1
76
59
  ? {
77
60
  mask: imask_1["default"].MaskedEnum,
78
61
  "enum": helpers_2.getTimeEnum(60, multiplicitySeconds, date_fns_1.startOfMinute, date_fns_1.addSeconds, helpers_1.getLabelSeconds)
@@ -88,7 +71,14 @@ exports.useImask = function (formatProp, separator, multiplicityHours, multiplic
88
71
  format: function (date) { return date_fns_1.format(date, formatProp); },
89
72
  parse: function (string) { return date_fns_1.parse(string, formatProp, new Date()); },
90
73
  validate: function (string) {
91
- var _a = tslib_1.__read(exports.getPartsDate(string, formatProp, separator), 6), dd = _a[0], MM = _a[1], yyyy = _a[2], HH = _a[3], mm = _a[4], ss = _a[5];
74
+ var _a = tslib_1.__read(helpers_2.getPartsDate(string, formatProp, separator, true, [
75
+ 'dd',
76
+ 'MM',
77
+ 'yyyy',
78
+ 'HH',
79
+ 'mm',
80
+ 'ss',
81
+ ]), 6), dd = _a[0], MM = _a[1], yyyy = _a[2], HH = _a[3], mm = _a[4], ss = _a[5];
92
82
  if (dd &&
93
83
  MM &&
94
84
  !date_fns_1.isValid(date_fns_1.parse("" + dd + helpers_2.datePickerPropSeparatorDefault + MM + helpers_2.datePickerPropSeparatorDefault + date_1.leapYear, helpers_2.datePickerPropFormatTypeDate, new Date()))) {
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ export declare const DatePickerFieldTypeTime: React.ForwardRefExoticComponent<{
3
+ className?: string | undefined;
4
+ value?: Date | null | undefined;
5
+ onChange?: ((props: {
6
+ e: Event;
7
+ value: Date | null;
8
+ }) => void) | undefined;
9
+ onError?: import("../helpers").DatePickerPropOnError | undefined;
10
+ id?: string | undefined;
11
+ name?: string | undefined;
12
+ disabled?: boolean | undefined;
13
+ size?: "xs" | "s" | "m" | "l" | undefined;
14
+ view?: "default" | "clear" | undefined;
15
+ form?: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
16
+ status?: "alert" | "success" | "warning" | undefined;
17
+ width?: "default" | "full" | undefined;
18
+ onFocus?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
19
+ onBlur?: ((event: React.FocusEvent<HTMLElement>) => void) | undefined;
20
+ autoFocus?: boolean | undefined;
21
+ placeholder?: string | undefined;
22
+ leftSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
23
+ view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
24
+ size?: "xs" | "s" | "m" | undefined;
25
+ }, HTMLSpanElement>> | undefined;
26
+ rightSide?: string | React.FC<import("../../../utils/types/PropsWithHTMLAttributes").PropsWithHTMLAttributesAndRef<{
27
+ view?: "link" | "alert" | "brand" | "ghost" | "primary" | "secondary" | "success" | "warning" | "disabled" | undefined;
28
+ size?: "xs" | "s" | "m" | undefined;
29
+ }, HTMLSpanElement>> | undefined;
30
+ readOnly?: boolean | undefined;
31
+ required?: boolean | undefined;
32
+ tabIndex?: number | undefined;
33
+ inputRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | React.RefObject<HTMLInputElement | HTMLTextAreaElement> | null | undefined;
34
+ ariaLabel?: string | undefined;
35
+ iconSize?: "xs" | "s" | "m" | undefined;
36
+ children?: undefined;
37
+ format?: string | undefined;
38
+ separator?: string | undefined;
39
+ minDate?: Date | undefined;
40
+ maxDate?: Date | undefined;
41
+ focused?: boolean | undefined;
42
+ multiplicitySeconds?: number | undefined;
43
+ multiplicityMinutes?: number | undefined;
44
+ multiplicityHours?: number | undefined;
45
+ label?: string | undefined;
46
+ caption?: string | undefined;
47
+ labelPosition?: "left" | "top" | undefined;
48
+ } & 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" | "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>>;