@consta/uikit 4.24.0 → 4.25.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 (371) hide show
  1. package/ComboboxCanary/index.d.ts +1 -0
  2. package/ComboboxCanary/index.js +1 -0
  3. package/SelectCanary/index.d.ts +1 -0
  4. package/SelectCanary/index.js +1 -0
  5. package/UserSelectCanary/index.d.ts +1 -0
  6. package/UserSelectCanary/index.js +1 -0
  7. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteCanary.js +1 -1
  8. package/__internal__/src/components/AutoCompleteCanary/AutoCompleteCanary.js.map +1 -1
  9. package/__internal__/src/components/AutoCompleteCanary/helpers.d.ts +8 -2
  10. package/__internal__/src/components/AutoCompleteCanary/types.d.ts +13 -2
  11. package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
  12. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.d.ts +6 -0
  13. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.js +1 -1
  14. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.js.map +1 -1
  15. package/__internal__/src/components/Button/Button.css +1 -1
  16. package/__internal__/src/components/CollapseGroup/helpers.d.ts +3 -3
  17. package/__internal__/src/components/Combobox/helpers.d.ts +2 -2
  18. package/__internal__/src/components/ComboboxCanary/ComboboxCanary.d.ts +4 -0
  19. package/__internal__/src/components/ComboboxCanary/ComboboxCanary.js +2 -0
  20. package/__internal__/src/components/ComboboxCanary/ComboboxCanary.js.map +1 -0
  21. package/__internal__/src/components/ComboboxCanary/helpers.d.ts +186 -0
  22. package/__internal__/src/components/ComboboxCanary/helpers.js +2 -0
  23. package/__internal__/src/components/ComboboxCanary/helpers.js.map +1 -0
  24. package/__internal__/src/components/ComboboxCanary/index.d.ts +2 -0
  25. package/__internal__/src/components/ComboboxCanary/index.js +2 -0
  26. package/__internal__/src/components/ComboboxCanary/index.js.map +1 -0
  27. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
  28. package/__internal__/src/components/ContextMenu/helpers.d.ts +2 -2
  29. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +3 -3
  30. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +4 -4
  31. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +3 -3
  32. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +4 -4
  33. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +3 -3
  34. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +4 -4
  35. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +3 -3
  36. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +3 -3
  37. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +4 -4
  38. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
  39. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  40. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
  41. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js.map +1 -1
  42. package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +4 -4
  43. package/__internal__/src/components/Select/helpers.d.ts +1 -1
  44. package/__internal__/src/components/SelectCanary/SelectCanary.d.ts +4 -0
  45. package/__internal__/src/components/SelectCanary/SelectCanary.js +2 -0
  46. package/__internal__/src/components/SelectCanary/SelectCanary.js.map +1 -0
  47. package/__internal__/src/components/SelectCanary/helpers.d.ts +159 -0
  48. package/__internal__/src/components/SelectCanary/helpers.js +2 -0
  49. package/__internal__/src/components/SelectCanary/helpers.js.map +1 -0
  50. package/__internal__/src/components/SelectCanary/index.d.ts +1 -0
  51. package/__internal__/src/components/SelectCanary/index.js +2 -0
  52. package/__internal__/src/components/SelectCanary/index.js.map +1 -0
  53. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +1 -1
  54. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
  55. package/__internal__/src/components/SelectComponentsCanary/Select.css +1 -0
  56. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/SelectContainer.d.ts +20 -0
  57. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/SelectContainer.js +2 -0
  58. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/SelectContainer.js.map +1 -0
  59. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/index.d.ts +1 -0
  60. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/index.js +2 -0
  61. package/__internal__/src/components/SelectComponentsCanary/SelectContainer/index.js.map +1 -0
  62. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/SelectCreateButton.css +1 -0
  63. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/SelectCreateButton.d.ts +15 -0
  64. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/SelectCreateButton.js +2 -0
  65. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/SelectCreateButton.js.map +1 -0
  66. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/index.d.ts +1 -0
  67. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/index.js +2 -0
  68. package/__internal__/src/components/SelectComponentsCanary/SelectCreateButton/index.js.map +1 -0
  69. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/SelectDropdown.css +1 -0
  70. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/SelectDropdown.d.ts +41 -0
  71. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/SelectDropdown.js +2 -0
  72. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/SelectDropdown.js.map +1 -0
  73. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/index.d.ts +1 -0
  74. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/index.js +2 -0
  75. package/__internal__/src/components/SelectComponentsCanary/SelectDropdown/index.js.map +1 -0
  76. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/SelectGroupLabel.d.ts +10 -0
  77. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/SelectGroupLabel.js +2 -0
  78. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/SelectGroupLabel.js.map +1 -0
  79. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/index.d.ts +1 -0
  80. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/index.js +2 -0
  81. package/__internal__/src/components/SelectComponentsCanary/SelectGroupLabel/index.js.map +1 -0
  82. package/__internal__/src/components/SelectComponentsCanary/SelectItem/SelectItem.css +1 -0
  83. package/__internal__/src/components/SelectComponentsCanary/SelectItem/SelectItem.d.ts +17 -0
  84. package/__internal__/src/components/SelectComponentsCanary/SelectItem/SelectItem.js +2 -0
  85. package/__internal__/src/components/SelectComponentsCanary/SelectItem/SelectItem.js.map +1 -0
  86. package/__internal__/src/components/SelectComponentsCanary/SelectItem/index.d.ts +1 -0
  87. package/__internal__/src/components/SelectComponentsCanary/SelectItem/index.js +2 -0
  88. package/__internal__/src/components/SelectComponentsCanary/SelectItem/index.js.map +1 -0
  89. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/SelectItemAll.css +1 -0
  90. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/SelectSelectAll.d.ts +14 -0
  91. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/SelectSelectAll.js +2 -0
  92. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/SelectSelectAll.js.map +1 -0
  93. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/index.d.ts +1 -0
  94. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/index.js +2 -0
  95. package/__internal__/src/components/SelectComponentsCanary/SelectItemAll/index.js.map +1 -0
  96. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/SelectLoader.css +1 -0
  97. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/SelectLoader.d.ts +3 -0
  98. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/SelectLoader.js +2 -0
  99. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/SelectLoader.js.map +1 -0
  100. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/index.d.ts +1 -0
  101. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/index.js +2 -0
  102. package/__internal__/src/components/SelectComponentsCanary/SelectLoader/index.js.map +1 -0
  103. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/SelectValueTag.css +1 -0
  104. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/SelectValueTag.d.ts +12 -0
  105. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/SelectValueTag.js +2 -0
  106. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/SelectValueTag.js.map +1 -0
  107. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/index.d.ts +1 -0
  108. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/index.js +2 -0
  109. package/__internal__/src/components/SelectComponentsCanary/SelectValueTag/index.js.map +1 -0
  110. package/__internal__/src/components/SelectComponentsCanary/cnSelect.d.ts +3 -0
  111. package/__internal__/src/components/SelectComponentsCanary/cnSelect.js +2 -0
  112. package/__internal__/src/components/SelectComponentsCanary/cnSelect.js.map +1 -0
  113. package/__internal__/src/components/SelectComponentsCanary/helpers.d.ts +4 -0
  114. package/__internal__/src/components/SelectComponentsCanary/helpers.js +2 -0
  115. package/__internal__/src/components/SelectComponentsCanary/helpers.js.map +1 -0
  116. package/__internal__/src/components/SelectComponentsCanary/types.d.ts +34 -0
  117. package/__internal__/src/components/SelectComponentsCanary/types.js +2 -0
  118. package/__internal__/src/components/SelectComponentsCanary/types.js.map +1 -0
  119. package/__internal__/src/components/SelectComponentsCanary/useSelect/helpers.d.ts +14 -0
  120. package/__internal__/src/components/SelectComponentsCanary/useSelect/helpers.js +2 -0
  121. package/__internal__/src/components/SelectComponentsCanary/useSelect/helpers.js.map +1 -0
  122. package/__internal__/src/components/SelectComponentsCanary/useSelect/index.d.ts +1 -0
  123. package/__internal__/src/components/SelectComponentsCanary/useSelect/index.js +2 -0
  124. package/__internal__/src/components/SelectComponentsCanary/useSelect/index.js.map +1 -0
  125. package/__internal__/src/components/SelectComponentsCanary/useSelect/useSelect.d.ts +84 -0
  126. package/__internal__/src/components/SelectComponentsCanary/useSelect/useSelect.js +2 -0
  127. package/__internal__/src/components/SelectComponentsCanary/useSelect/useSelect.js.map +1 -0
  128. package/__internal__/src/components/Slider/helper.d.ts +1 -1
  129. package/__internal__/src/components/SnackBar/helper.d.ts +1 -1
  130. package/__internal__/src/components/SpoilerCanary/SpoilerButton/SpoilerButton.js +1 -1
  131. package/__internal__/src/components/SpoilerCanary/SpoilerButton/SpoilerButton.js.map +1 -1
  132. package/__internal__/src/components/TagBase/TagBase.d.ts +1 -1
  133. package/__internal__/src/components/TextField/TextField.css +1 -1
  134. package/__internal__/src/components/TextField/TextField.js +1 -1
  135. package/__internal__/src/components/TextField/TextField.js.map +1 -1
  136. package/__internal__/src/components/UserSelect/helpers.d.ts +2 -2
  137. package/__internal__/src/components/UserSelectCanary/UserSelectCanary.d.ts +5 -0
  138. package/__internal__/src/components/UserSelectCanary/UserSelectCanary.js +2 -0
  139. package/__internal__/src/components/UserSelectCanary/UserSelectCanary.js.map +1 -0
  140. package/__internal__/src/components/UserSelectCanary/UserSelectItem/UserSelectItem.css +1 -0
  141. package/__internal__/src/components/UserSelectCanary/UserSelectItem/UserSelectItem.d.ts +14 -0
  142. package/__internal__/src/components/UserSelectCanary/UserSelectItem/UserSelectItem.js +2 -0
  143. package/__internal__/src/components/UserSelectCanary/UserSelectItem/UserSelectItem.js.map +1 -0
  144. package/__internal__/src/components/UserSelectCanary/UserSelectValue/UserSelectValue.css +1 -0
  145. package/__internal__/src/components/UserSelectCanary/UserSelectValue/UserSelectValue.d.ts +15 -0
  146. package/__internal__/src/components/UserSelectCanary/UserSelectValue/UserSelectValue.js +2 -0
  147. package/__internal__/src/components/UserSelectCanary/UserSelectValue/UserSelectValue.js.map +1 -0
  148. package/__internal__/src/components/UserSelectCanary/helpers.d.ts +191 -0
  149. package/__internal__/src/components/UserSelectCanary/helpers.js +2 -0
  150. package/__internal__/src/components/UserSelectCanary/helpers.js.map +1 -0
  151. package/__internal__/src/components/UserSelectCanary/index.d.ts +1 -0
  152. package/__internal__/src/components/UserSelectCanary/index.js +2 -0
  153. package/__internal__/src/components/UserSelectCanary/index.js.map +1 -0
  154. package/__internal__/src/hooks/useFlag/useFlag.d.ts +1 -0
  155. package/__internal__/src/hooks/useFlag/useFlag.js +1 -1
  156. package/__internal__/src/hooks/useFlag/useFlag.js.map +1 -1
  157. package/__internal__/src/hooks/useForkRef/useForkRef.d.ts +2 -1
  158. package/__internal__/src/hooks/useForkRef/useForkRef.js +1 -1
  159. package/__internal__/src/hooks/useForkRef/useForkRef.js.map +1 -1
  160. package/__internal__/src/icons/IconAdd/IconAdd.d.ts +1 -2
  161. package/__internal__/src/icons/IconAddToComparison/IconAddToComparison.d.ts +1 -2
  162. package/__internal__/src/icons/IconAlert/IconAlert.d.ts +1 -2
  163. package/__internal__/src/icons/IconAlignBlocksLeft/IconAlignBlocksLeft.d.ts +1 -2
  164. package/__internal__/src/icons/IconAlignBlocksRight/IconAlignBlocksRight.d.ts +1 -2
  165. package/__internal__/src/icons/IconAlignCenter/IconAlignCenter.d.ts +1 -2
  166. package/__internal__/src/icons/IconAlignJustify/IconAlignJustify.d.ts +1 -2
  167. package/__internal__/src/icons/IconAlignLeft/IconAlignLeft.d.ts +1 -2
  168. package/__internal__/src/icons/IconAlignRight/IconAlignRight.d.ts +1 -2
  169. package/__internal__/src/icons/IconAllDone/IconAllDone.d.ts +1 -2
  170. package/__internal__/src/icons/IconArrowDown/IconArrowDown.d.ts +1 -2
  171. package/__internal__/src/icons/IconArrowLeft/IconArrowLeft.d.ts +1 -2
  172. package/__internal__/src/icons/IconArrowRight/IconArrowRight.d.ts +1 -2
  173. package/__internal__/src/icons/IconArrowUp/IconArrowUp.d.ts +1 -2
  174. package/__internal__/src/icons/IconArtBrush/IconArtBrush.d.ts +1 -2
  175. package/__internal__/src/icons/IconAttach/IconAttach.d.ts +1 -2
  176. package/__internal__/src/icons/IconAxesRotate/IconAxesRotate.d.ts +1 -2
  177. package/__internal__/src/icons/IconBackward/IconBackward.d.ts +1 -2
  178. package/__internal__/src/icons/IconBag/IconBag.d.ts +1 -2
  179. package/__internal__/src/icons/IconBarrier/IconBarrier.d.ts +1 -2
  180. package/__internal__/src/icons/IconBento/IconBento.d.ts +1 -2
  181. package/__internal__/src/icons/IconBit/IconBit.d.ts +1 -2
  182. package/__internal__/src/icons/IconBold/IconBold.d.ts +1 -2
  183. package/__internal__/src/icons/IconBook/IconBook.d.ts +1 -2
  184. package/__internal__/src/icons/IconBookmarkFilled/IconBookmarkFilled.d.ts +1 -2
  185. package/__internal__/src/icons/IconBookmarkStroked/IconBookmarkStroked.d.ts +1 -2
  186. package/__internal__/src/icons/IconCalculator/IconCalculator.d.ts +1 -2
  187. package/__internal__/src/icons/IconCalendar/IconCalendar.d.ts +1 -2
  188. package/__internal__/src/icons/IconCamera/IconCamera.d.ts +1 -2
  189. package/__internal__/src/icons/IconCancel/IconCancel.d.ts +1 -2
  190. package/__internal__/src/icons/IconCards/IconCards.d.ts +1 -2
  191. package/__internal__/src/icons/IconChatFilled/IconChatFilled.d.ts +1 -2
  192. package/__internal__/src/icons/IconChatStroked/IconChatStroked.d.ts +1 -2
  193. package/__internal__/src/icons/IconCheck/IconCheck.d.ts +1 -2
  194. package/__internal__/src/icons/IconClose/IconClose.d.ts +1 -2
  195. package/__internal__/src/icons/IconCollapse/IconCollapse.d.ts +1 -2
  196. package/__internal__/src/icons/IconColorFill/IconColorFill.d.ts +1 -2
  197. package/__internal__/src/icons/IconColorText/IconColorText.d.ts +1 -2
  198. package/__internal__/src/icons/IconColumns/IconColumns.d.ts +1 -2
  199. package/__internal__/src/icons/IconCommentFilled/IconCommentFilled.d.ts +1 -2
  200. package/__internal__/src/icons/IconCommentStroked/IconCommentStroked.d.ts +1 -2
  201. package/__internal__/src/icons/IconConnection/IconConnection.d.ts +1 -2
  202. package/__internal__/src/icons/IconCopy/IconCopy.d.ts +1 -2
  203. package/__internal__/src/icons/IconCrown/IconCrown.d.ts +1 -2
  204. package/__internal__/src/icons/IconCursorMouse/IconCursorMouse.d.ts +1 -2
  205. package/__internal__/src/icons/IconDataNull/IconDataNull.d.ts +1 -2
  206. package/__internal__/src/icons/IconDiamond/IconDiamond.d.ts +1 -2
  207. package/__internal__/src/icons/IconDinosaur/IconDinosaur.d.ts +1 -2
  208. package/__internal__/src/icons/IconDisconnection/IconDisconnection.d.ts +1 -2
  209. package/__internal__/src/icons/IconDocAdd/IconDocAdd.d.ts +1 -2
  210. package/__internal__/src/icons/IconDocBlank/IconDocBlank.d.ts +1 -2
  211. package/__internal__/src/icons/IconDocDelete/IconDocDelete.d.ts +1 -2
  212. package/__internal__/src/icons/IconDocExport/IconDocExport.d.ts +1 -2
  213. package/__internal__/src/icons/IconDocFilled/IconDocFilled.d.ts +1 -2
  214. package/__internal__/src/icons/IconDown/IconDown.d.ts +1 -2
  215. package/__internal__/src/icons/IconDownload/IconDownload.d.ts +1 -2
  216. package/__internal__/src/icons/IconDrag/IconDrag.d.ts +1 -2
  217. package/__internal__/src/icons/IconDraggable/IconDraggable.d.ts +1 -2
  218. package/__internal__/src/icons/IconDrillingPartLeftFilled/IconDrillingPartLeftFilled.d.ts +1 -2
  219. package/__internal__/src/icons/IconDrillingPartLeftStroked/IconDrillingPartLeftStroked.d.ts +1 -2
  220. package/__internal__/src/icons/IconDrillingPartRightFilled/IconDrillingPartRightFilled.d.ts +1 -2
  221. package/__internal__/src/icons/IconDrillingPartRightStroked/IconDrillingPartRightStroked.d.ts +1 -2
  222. package/__internal__/src/icons/IconDrillingRig/IconDrillingRig.d.ts +1 -2
  223. package/__internal__/src/icons/IconDrop/IconDrop.d.ts +1 -2
  224. package/__internal__/src/icons/IconEdit/IconEdit.d.ts +1 -2
  225. package/__internal__/src/icons/IconExit/IconExit.d.ts +1 -2
  226. package/__internal__/src/icons/IconExpand/IconExpand.d.ts +1 -2
  227. package/__internal__/src/icons/IconEye/IconEye.d.ts +1 -2
  228. package/__internal__/src/icons/IconEyeClose/IconEyeClose.d.ts +1 -2
  229. package/__internal__/src/icons/IconFavorite/IconFavorite.d.ts +1 -2
  230. package/__internal__/src/icons/IconFilter/IconFilter.d.ts +1 -2
  231. package/__internal__/src/icons/IconFishboneFilled/IconFishboneFilled.d.ts +1 -2
  232. package/__internal__/src/icons/IconFishboneStroked/IconFishboneStroked.d.ts +1 -2
  233. package/__internal__/src/icons/IconFitToDefault/IconFitToDefault.d.ts +1 -2
  234. package/__internal__/src/icons/IconFlagFilled/IconFlagFilled.d.ts +1 -2
  235. package/__internal__/src/icons/IconFlagStroked/IconFlagStroked.d.ts +1 -2
  236. package/__internal__/src/icons/IconFolders/IconFolders.d.ts +1 -2
  237. package/__internal__/src/icons/IconForward/IconForward.d.ts +1 -2
  238. package/__internal__/src/icons/IconFunnel/IconFunnel.d.ts +1 -2
  239. package/__internal__/src/icons/IconGas/IconGas.d.ts +1 -2
  240. package/__internal__/src/icons/IconGeo/IconGeo.d.ts +1 -2
  241. package/__internal__/src/icons/IconGradients/IconGradients.d.ts +1 -2
  242. package/__internal__/src/icons/IconGrouping/IconGrouping.d.ts +1 -2
  243. package/__internal__/src/icons/IconHamburger/IconHamburger.d.ts +1 -2
  244. package/__internal__/src/icons/IconHand/IconHand.d.ts +1 -2
  245. package/__internal__/src/icons/IconHealth/IconHealth.d.ts +1 -2
  246. package/__internal__/src/icons/IconHome/IconHome.d.ts +1 -2
  247. package/__internal__/src/icons/IconInComparison/IconInComparison.d.ts +1 -2
  248. package/__internal__/src/icons/IconIncident/IconIncident.d.ts +1 -2
  249. package/__internal__/src/icons/IconInfo/IconInfo.d.ts +1 -2
  250. package/__internal__/src/icons/IconIntroduction/IconIntroduction.d.ts +1 -2
  251. package/__internal__/src/icons/IconIpad/IconIpad.d.ts +1 -2
  252. package/__internal__/src/icons/IconItalic/IconItalic.d.ts +1 -2
  253. package/__internal__/src/icons/IconKebab/IconKebab.d.ts +1 -2
  254. package/__internal__/src/icons/IconKernFilled/IconKernFilled.d.ts +1 -2
  255. package/__internal__/src/icons/IconKernStroked/IconKernStroked.d.ts +1 -2
  256. package/__internal__/src/icons/IconLaptop/IconLaptop.d.ts +1 -2
  257. package/__internal__/src/icons/IconLayers/IconLayers.d.ts +1 -2
  258. package/__internal__/src/icons/IconLeaf/IconLeaf.d.ts +1 -2
  259. package/__internal__/src/icons/IconLightningBolt/IconLightningBolt.d.ts +1 -2
  260. package/__internal__/src/icons/IconLineAndBarChart/IconLineAndBarChart.d.ts +1 -2
  261. package/__internal__/src/icons/IconLink/IconLink.d.ts +1 -2
  262. package/__internal__/src/icons/IconList/IconList.d.ts +1 -2
  263. package/__internal__/src/icons/IconListNumbered/IconListNumbered.d.ts +1 -2
  264. package/__internal__/src/icons/IconLithologyFilled/IconLithologyFilled.d.ts +1 -2
  265. package/__internal__/src/icons/IconLithologyStroked/IconLithologyStroked.d.ts +1 -2
  266. package/__internal__/src/icons/IconLock/IconLock.d.ts +1 -2
  267. package/__internal__/src/icons/IconLogicalElement/IconLogicalElement.d.ts +1 -2
  268. package/__internal__/src/icons/IconMBU/IconMBU.d.ts +1 -2
  269. package/__internal__/src/icons/IconMGRP/IconMGRP.d.ts +1 -2
  270. package/__internal__/src/icons/IconMLSP/IconMLSP.d.ts +1 -2
  271. package/__internal__/src/icons/IconMMP/IconMMP.d.ts +1 -2
  272. package/__internal__/src/icons/IconMail/IconMail.d.ts +1 -2
  273. package/__internal__/src/icons/IconMap/IconMap.d.ts +1 -2
  274. package/__internal__/src/icons/IconMaxHeight/IconMaxHeight.d.ts +1 -2
  275. package/__internal__/src/icons/IconMaxWidth/IconMaxWidth.d.ts +1 -2
  276. package/__internal__/src/icons/IconMeatball/IconMeatball.d.ts +1 -2
  277. package/__internal__/src/icons/IconMic/IconMic.d.ts +1 -2
  278. package/__internal__/src/icons/IconMolecules/IconMolecules.d.ts +1 -2
  279. package/__internal__/src/icons/IconMoon/IconMoon.d.ts +1 -2
  280. package/__internal__/src/icons/IconNodeEnd/IconNodeEnd.d.ts +1 -2
  281. package/__internal__/src/icons/IconNodeStart/IconNodeStart.d.ts +1 -2
  282. package/__internal__/src/icons/IconNodeStep/IconNodeStep.d.ts +1 -2
  283. package/__internal__/src/icons/IconNodes/IconNodes.d.ts +1 -2
  284. package/__internal__/src/icons/IconOilBarrel/IconOilBarrel.d.ts +1 -2
  285. package/__internal__/src/icons/IconOpenInNew/IconOpenInNew.d.ts +1 -2
  286. package/__internal__/src/icons/IconOperators/IconOperators.d.ts +1 -2
  287. package/__internal__/src/icons/IconPanelBottom/IconPanelBottom.d.ts +1 -2
  288. package/__internal__/src/icons/IconPanelLeft/IconPanelLeft.d.ts +1 -2
  289. package/__internal__/src/icons/IconPanelRight/IconPanelRight.d.ts +1 -2
  290. package/__internal__/src/icons/IconPanelTop/IconPanelTop.d.ts +1 -2
  291. package/__internal__/src/icons/IconPaste/IconPaste.d.ts +1 -2
  292. package/__internal__/src/icons/IconPause/IconPause.d.ts +1 -2
  293. package/__internal__/src/icons/IconPhone/IconPhone.d.ts +1 -2
  294. package/__internal__/src/icons/IconPhoto/IconPhoto.d.ts +1 -2
  295. package/__internal__/src/icons/IconPicture/IconPicture.d.ts +1 -2
  296. package/__internal__/src/icons/IconPlay/IconPlay.d.ts +1 -2
  297. package/__internal__/src/icons/IconPressureFilled/IconPressureFilled.d.ts +1 -2
  298. package/__internal__/src/icons/IconPressureStroked/IconPressureStroked.d.ts +1 -2
  299. package/__internal__/src/icons/IconPriceLabel/IconPriceLabel.d.ts +1 -2
  300. package/__internal__/src/icons/IconProcessing/IconProcessing.d.ts +1 -2
  301. package/__internal__/src/icons/IconQuestion/IconQuestion.d.ts +1 -2
  302. package/__internal__/src/icons/IconQuote/IconQuote.d.ts +1 -2
  303. package/__internal__/src/icons/IconRUO/IconRUO.d.ts +1 -2
  304. package/__internal__/src/icons/IconRUS/IconRUS.d.ts +1 -2
  305. package/__internal__/src/icons/IconRecord/IconRecord.d.ts +1 -2
  306. package/__internal__/src/icons/IconRemove/IconRemove.d.ts +1 -2
  307. package/__internal__/src/icons/IconRemoveFromComparison/IconRemoveFromComparison.d.ts +1 -2
  308. package/__internal__/src/icons/IconReply/IconReply.d.ts +1 -2
  309. package/__internal__/src/icons/IconResize/IconResize.d.ts +1 -2
  310. package/__internal__/src/icons/IconRestart/IconRestart.d.ts +1 -2
  311. package/__internal__/src/icons/IconRevert/IconRevert.d.ts +1 -2
  312. package/__internal__/src/icons/IconRing/IconRing.d.ts +1 -2
  313. package/__internal__/src/icons/IconRouble/IconRouble.d.ts +1 -2
  314. package/__internal__/src/icons/IconRuler/IconRuler.d.ts +1 -2
  315. package/__internal__/src/icons/IconSave/IconSave.d.ts +1 -2
  316. package/__internal__/src/icons/IconScreen/IconScreen.d.ts +1 -2
  317. package/__internal__/src/icons/IconSearch/IconSearch.d.ts +1 -2
  318. package/__internal__/src/icons/IconSelect/IconSelect.d.ts +1 -2
  319. package/__internal__/src/icons/IconSelectOpen/IconSelectOpen.d.ts +1 -2
  320. package/__internal__/src/icons/IconSendMessage/IconSendMessage.d.ts +1 -2
  321. package/__internal__/src/icons/IconSettings/IconSettings.d.ts +1 -2
  322. package/__internal__/src/icons/IconShape/IconShape.d.ts +1 -2
  323. package/__internal__/src/icons/IconShuffle/IconShuffle.d.ts +1 -2
  324. package/__internal__/src/icons/IconSmile/IconSmile.d.ts +1 -2
  325. package/__internal__/src/icons/IconSnowflake/IconSnowflake.d.ts +1 -2
  326. package/__internal__/src/icons/IconSortDown/IconSortDown.d.ts +1 -2
  327. package/__internal__/src/icons/IconSortDownCenter/IconSortDownCenter.d.ts +1 -2
  328. package/__internal__/src/icons/IconSortUp/IconSortUp.d.ts +1 -2
  329. package/__internal__/src/icons/IconSortUpCenter/IconSortUpCenter.d.ts +1 -2
  330. package/__internal__/src/icons/IconSpeed/IconSpeed.d.ts +1 -2
  331. package/__internal__/src/icons/IconStop/IconStop.d.ts +1 -2
  332. package/__internal__/src/icons/IconStorage/IconStorage.d.ts +1 -2
  333. package/__internal__/src/icons/IconStrikethrough/IconStrikethrough.d.ts +1 -2
  334. package/__internal__/src/icons/IconString/IconString.d.ts +1 -2
  335. package/__internal__/src/icons/IconSun/IconSun.d.ts +1 -2
  336. package/__internal__/src/icons/IconTable/IconTable.d.ts +1 -2
  337. package/__internal__/src/icons/IconTable2/IconTable2.d.ts +1 -2
  338. package/__internal__/src/icons/IconTarget/IconTarget.d.ts +1 -2
  339. package/__internal__/src/icons/IconTeam/IconTeam.d.ts +1 -2
  340. package/__internal__/src/icons/IconTechResponse/IconTechResponse.d.ts +1 -2
  341. package/__internal__/src/icons/IconTest/IconTest.d.ts +1 -2
  342. package/__internal__/src/icons/IconThumbUp/IconThumbUp.d.ts +1 -2
  343. package/__internal__/src/icons/IconTie/IconTie.d.ts +1 -2
  344. package/__internal__/src/icons/IconTop/IconTop.d.ts +1 -2
  345. package/__internal__/src/icons/IconTrajectory/IconTrajectory.d.ts +1 -2
  346. package/__internal__/src/icons/IconTrash/IconTrash.d.ts +1 -2
  347. package/__internal__/src/icons/IconType/IconType.d.ts +1 -2
  348. package/__internal__/src/icons/IconUnderline/IconUnderline.d.ts +1 -2
  349. package/__internal__/src/icons/IconUnlock/IconUnlock.d.ts +1 -2
  350. package/__internal__/src/icons/IconUnsort/IconUnsort.d.ts +1 -2
  351. package/__internal__/src/icons/IconUnsortCenter/IconUnsortCenter.d.ts +1 -2
  352. package/__internal__/src/icons/IconUpload/IconUpload.d.ts +1 -2
  353. package/__internal__/src/icons/IconUser/IconUser.d.ts +1 -2
  354. package/__internal__/src/icons/IconVZD/IconVZD.d.ts +1 -2
  355. package/__internal__/src/icons/IconVideo/IconVideo.d.ts +1 -2
  356. package/__internal__/src/icons/IconWarning/IconWarning.d.ts +1 -2
  357. package/__internal__/src/icons/IconWatch/IconWatch.d.ts +1 -2
  358. package/__internal__/src/icons/IconWellOpen/IconWellOpen.d.ts +1 -2
  359. package/__internal__/src/icons/IconWellPipe/IconWellPipe.d.ts +1 -2
  360. package/__internal__/src/icons/IconWideScreen/IconWideScreen.d.ts +1 -2
  361. package/__internal__/src/icons/IconWorldFilled/IconWorldFilled.d.ts +1 -2
  362. package/__internal__/src/icons/IconWorldStroked/IconWorldStroked.d.ts +1 -2
  363. package/__internal__/src/icons/IconWrench/IconWrench.d.ts +1 -2
  364. package/__internal__/src/icons/IconYandexDzen/IconYandexDzen.d.ts +1 -2
  365. package/__internal__/src/icons/IconYoutube/IconYoutube.d.ts +1 -2
  366. package/__internal__/src/icons/createIcon/createIcon.d.ts +1 -2
  367. package/__internal__/src/icons/createIcon/createIcon.js +1 -1
  368. package/__internal__/src/icons/createIcon/createIcon.js.map +1 -1
  369. package/__internal__/src/utils/fabricIndex.js +1 -1
  370. package/__internal__/src/utils/fabricIndex.js.map +1 -1
  371. package/package.json +2 -2
@@ -0,0 +1,2 @@
1
+ export var defaultlabelForNotFound="\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E";export var defaultlabelForCreate="";export var defaultLabelForEmptyItems="\u0421\u043F\u0438\u0441\u043E\u043A \u043F\u0443\u0441\u0442";export var getInputWidth=function(a,b){if(!a.current||!b.current)return 20;var c=b.current.offsetWidth+20,d=a.current?a.current.offsetWidth-15:2,e=c>d?d:c;return e};
2
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","names":["defaultlabelForNotFound","defaultlabelForCreate","defaultLabelForEmptyItems","getInputWidth","controlInnerRef","helperInputFakeElement","current","fakeElWidth","offsetWidth","maxWidth","width"],"sources":["../../../../../src/components/SelectComponentsCanary/helpers.ts"],"sourcesContent":["export const defaultlabelForNotFound = 'Не найдено';\nexport const defaultlabelForCreate = '';\nexport const defaultLabelForEmptyItems = 'Список пуст';\n\nexport const getInputWidth = (\n controlInnerRef: React.RefObject<HTMLDivElement>,\n helperInputFakeElement: React.RefObject<HTMLDivElement>,\n): number => {\n if (!controlInnerRef.current || !helperInputFakeElement.current) {\n return 20;\n }\n const fakeElWidth = helperInputFakeElement.current.offsetWidth + 20;\n const maxWidth = controlInnerRef.current\n ? controlInnerRef.current.offsetWidth - 15\n : 2;\n const width = fakeElWidth > maxWidth ? maxWidth : fakeElWidth;\n return width;\n};\n"],"mappings":"AAAA,MAAO,IAAMA,wBAAuB,CAAG,yDAAhC,CACP,MAAO,IAAMC,sBAAqB,CAAG,EAA9B,CACP,MAAO,IAAMC,0BAAyB,CAAG,+DAAlC,CAEP,MAAO,IAAMC,cAAa,CAAG,SAC3BC,CAD2B,CAE3BC,CAF2B,CAGhB,CACX,GAAI,CAACD,CAAe,CAACE,OAAjB,EAA4B,CAACD,CAAsB,CAACC,OAAxD,CACE,MAAO,GAAP,CAFS,GAILC,EAAW,CAAGF,CAAsB,CAACC,OAAvB,CAA+BE,WAA/B,CAA6C,EAJtD,CAKLC,CAAQ,CAAGL,CAAe,CAACE,OAAhB,CACbF,CAAe,CAACE,OAAhB,CAAwBE,WAAxB,CAAsC,EADzB,CAEb,CAPO,CAQLE,CAAK,CAAGH,CAAW,CAAGE,CAAd,CAAyBA,CAAzB,CAAoCF,CARvC,CASX,MAAOG,EACR,CAbM"}
@@ -0,0 +1,34 @@
1
+ import { RefObject } from 'react';
2
+ export declare const propSize: readonly ["m", "xs", "s", "l"];
3
+ export declare type PropSize = typeof propSize[number];
4
+ export declare const defaultPropSize: "m";
5
+ export declare const propForm: readonly ["default", "defaultClear", "defaultBrick", "brick", "brickDefault", "brickClear", "brickRound", "round", "roundClear", "roundBrick", "clearRound", "clearDefault", "clearBrick", "clearClear"];
6
+ export declare type PropForm = typeof propForm[number];
7
+ export declare const defaultPropForm: "default";
8
+ export declare const propView: readonly ["default", "clear"];
9
+ export declare type PropView = typeof propView[number];
10
+ export declare const defaultPropView: "default";
11
+ export declare const propStatus: readonly ["alert", "warning", "success"];
12
+ export declare type PropStatus = typeof propStatus[number];
13
+ export declare type CommonSelectProps<ITEM> = {
14
+ options: ITEM[];
15
+ id: string;
16
+ placeholder?: string;
17
+ ariaLabel?: string;
18
+ getOptionLabel(arg: ITEM): string;
19
+ getOptionKey?(arg: ITEM): string | number;
20
+ onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void;
21
+ onFocus?: (event?: React.FocusEvent<HTMLInputElement>) => void;
22
+ children?: never;
23
+ dropdownClassName?: string;
24
+ dropdownRef?: RefObject<HTMLDivElement>;
25
+ name?: string;
26
+ };
27
+ export declare type RenderItemProps<ITEM> = {
28
+ item: ITEM;
29
+ active: boolean;
30
+ hovered: boolean;
31
+ onClick: (e: React.SyntheticEvent) => void;
32
+ onMouseEnter: (e: React.SyntheticEvent) => void;
33
+ ref: React.Ref<HTMLDivElement>;
34
+ };
@@ -0,0 +1,2 @@
1
+ export var propSize=["m","xs","s","l"];export var defaultPropSize=propSize[0];export var propForm=["default","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clearClear"];export var defaultPropForm=propForm[0];export var propView=["default","clear"];export var defaultPropView=propView[0];export var propStatus=["alert","warning","success"];
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["propSize","defaultPropSize","propForm","defaultPropForm","propView","defaultPropView","propStatus"],"sources":["../../../../../src/components/SelectComponentsCanary/types.ts"],"sourcesContent":["import { RefObject } from 'react';\n\nexport const propSize = ['m', 'xs', 's', 'l'] as const;\nexport type PropSize = typeof propSize[number];\nexport const defaultPropSize = propSize[0];\n\nexport const propForm = [\n 'default',\n 'defaultClear',\n 'defaultBrick',\n 'brick',\n 'brickDefault',\n 'brickClear',\n 'brickRound',\n 'round',\n 'roundClear',\n 'roundBrick',\n 'clearRound',\n 'clearDefault',\n 'clearBrick',\n 'clearClear',\n] as const;\nexport type PropForm = typeof propForm[number];\nexport const defaultPropForm = propForm[0];\n\nexport const propView = ['default', 'clear'] as const;\nexport type PropView = typeof propView[number];\nexport const defaultPropView = propView[0];\n\nexport const propStatus = ['alert', 'warning', 'success'] as const;\nexport type PropStatus = typeof propStatus[number];\n\nexport type CommonSelectProps<ITEM> = {\n options: ITEM[];\n id: string;\n placeholder?: string;\n ariaLabel?: string;\n getOptionLabel(arg: ITEM): string;\n getOptionKey?(arg: ITEM): string | number;\n onBlur?: (event?: React.FocusEvent<HTMLInputElement>) => void;\n onFocus?: (event?: React.FocusEvent<HTMLInputElement>) => void;\n children?: never;\n dropdownClassName?: string;\n dropdownRef?: RefObject<HTMLDivElement>;\n name?: string;\n};\n\nexport type RenderItemProps<ITEM> = {\n item: ITEM;\n active: boolean;\n hovered: boolean;\n onClick: (e: React.SyntheticEvent) => void;\n onMouseEnter: (e: React.SyntheticEvent) => void;\n ref: React.Ref<HTMLDivElement>;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,SAAQ,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAjB,CAEP,MAAO,IAAMC,gBAAe,CAAGD,QAAQ,CAAC,CAAD,CAAhC,CAEP,MAAO,IAAME,SAAQ,CAAG,CACtB,SADsB,CAEtB,cAFsB,CAGtB,cAHsB,CAItB,OAJsB,CAKtB,cALsB,CAMtB,YANsB,CAOtB,YAPsB,CAQtB,OARsB,CAStB,YATsB,CAUtB,YAVsB,CAWtB,YAXsB,CAYtB,cAZsB,CAatB,YAbsB,CActB,YAdsB,CAAjB,CAiBP,MAAO,IAAMC,gBAAe,CAAGD,QAAQ,CAAC,CAAD,CAAhC,CAEP,MAAO,IAAME,SAAQ,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAjB,CAEP,MAAO,IAAMC,gBAAe,CAAGD,QAAQ,CAAC,CAAD,CAAhC,CAEP,MAAO,IAAME,WAAU,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAAnB"}
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ declare type State = {
3
+ searchValue: string;
4
+ resolvedSearchValue: string;
5
+ isOpen: boolean;
6
+ highlightedIndex: number;
7
+ scrollToHighlighted: boolean;
8
+ };
9
+ declare type Action = string;
10
+ declare type Updater = (state: State) => State;
11
+ export declare function useHoistedState(initialState: State): [State, (updater: Updater, action: Action) => void];
12
+ declare type ScrollToIndexFunctionType = (optionIndex: number, dropdownRef: React.MutableRefObject<HTMLDivElement | null>, optionsRefs: React.RefObject<HTMLDivElement>[], onFailure: () => void) => void;
13
+ export declare const scrollToIndex: ScrollToIndexFunctionType;
14
+ export {};
@@ -0,0 +1,2 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import React from"react";import{scrollIntoView}from"../../../utils/scrollIntoView";export function useHoistedState(a){var b=React.useRef(function(a,b){return b}),c=React.useState(a),d=_slicedToArray(c,2),e=d[0],f=d[1],g=React.useCallback(function(a,c){if(!c)throw new Error("An action type is required to update the state");return f(function(d){return b.current(d,a(d),c)})},[f]);return[e,g]}export var scrollToIndex=function(a,b,c,d){if(b.current){var e=c[a].current;e?scrollIntoView(e,b.current):d()}};
2
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","names":["React","scrollIntoView","useHoistedState","initialState","reducerRef","useRef","old","newState","useState","state","_setState","setState","useCallback","updater","action","Error","current","scrollToIndex","index","dropdownRef","optionsRefs","onFailure","element"],"sources":["../../../../../../src/components/SelectComponentsCanary/useSelect/helpers.ts"],"sourcesContent":["import React from 'react';\n\nimport { scrollIntoView } from '##/utils/scrollIntoView';\n\ntype State = {\n searchValue: string;\n resolvedSearchValue: string;\n isOpen: boolean;\n highlightedIndex: number;\n scrollToHighlighted: boolean;\n};\ntype Action = string;\ntype Reducer = (state: State, newState: State, action: Action) => State;\ntype Updater = (state: State) => State;\n\nexport function useHoistedState(\n initialState: State,\n): [State, (updater: Updater, action: Action) => void] {\n const reducerRef = React.useRef<Reducer>((old, newState) => newState);\n const [state, _setState] = React.useState<State>(initialState);\n const setState = React.useCallback(\n (updater: Updater, action: Action) => {\n if (!action) {\n throw new Error('An action type is required to update the state');\n }\n return _setState((old) => reducerRef.current(old, updater(old), action));\n },\n [_setState],\n );\n return [state, setState];\n}\n\ntype ScrollToIndexFunctionType = (\n optionIndex: number,\n dropdownRef: React.MutableRefObject<HTMLDivElement | null>,\n optionsRefs: React.RefObject<HTMLDivElement>[],\n onFailure: () => void,\n) => void;\n\nexport const scrollToIndex: ScrollToIndexFunctionType = (\n index,\n dropdownRef,\n optionsRefs,\n onFailure,\n): void => {\n if (!dropdownRef.current) {\n return;\n }\n\n const element = optionsRefs[index].current;\n\n if (element) {\n scrollIntoView(element, dropdownRef.current);\n } else {\n onFailure();\n }\n};\n"],"mappings":"iEAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,cAAT,qCAaA,MAAO,SAASC,gBAAT,CACLC,CADK,CAEgD,IAC/CC,EAAU,CAAGJ,KAAK,CAACK,MAAN,CAAsB,SAACC,CAAD,CAAMC,CAAN,QAAmBA,EAAnB,CAAtB,CADkC,GAE1BP,KAAK,CAACQ,QAAN,CAAsBL,CAAtB,CAF0B,uBAE9CM,CAF8C,MAEvCC,CAFuC,MAG/CC,CAAQ,CAAGX,KAAK,CAACY,WAAN,CACf,SAACC,CAAD,CAAmBC,CAAnB,CAAsC,CACpC,GAAI,CAACA,CAAL,CACE,KAAM,IAAIC,MAAJ,CAAU,gDAAV,CAAN,CAEF,MAAOL,EAAS,CAAC,SAACJ,CAAD,QAASF,EAAU,CAACY,OAAX,CAAmBV,CAAnB,CAAwBO,CAAO,CAACP,CAAD,CAA/B,CAAsCQ,CAAtC,CAAT,CAAD,CACjB,CANc,CAOf,CAACJ,CAAD,CAPe,CAHoC,CAYrD,MAAO,CAACD,CAAD,CAAQE,CAAR,CACR,CASD,MAAO,IAAMM,cAAwC,CAAG,SACtDC,CADsD,CAEtDC,CAFsD,CAGtDC,CAHsD,CAItDC,CAJsD,CAK7C,CACT,GAAKF,CAAW,CAACH,OAAjB,EAIA,GAAMM,EAAO,CAAGF,CAAW,CAACF,CAAD,CAAX,CAAmBF,OAAnC,CAEIM,CANJ,CAOErB,cAAc,CAACqB,CAAD,CAAUH,CAAW,CAACH,OAAtB,CAPhB,CASEK,CAAS,EATX,CAWD,CAjBM"}
@@ -0,0 +1 @@
1
+ export * from './useSelect';
@@ -0,0 +1,2 @@
1
+ export*from"./useSelect";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/SelectComponentsCanary/useSelect/index.ts"],"sourcesContent":["export * from './useSelect';\n"],"mappings":"AAAA"}
@@ -0,0 +1,84 @@
1
+ import React from 'react';
2
+ import { CountedGroup, SelectAllItem } from "../../../utils/getGroups";
3
+ declare type IndexForHighlight = number | ((oldIndex: number) => number);
4
+ declare type Group<ITEM, GROUP> = {
5
+ items: ITEM[];
6
+ key: string | number;
7
+ group?: GROUP;
8
+ };
9
+ declare type GetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
10
+ declare type GetGroupKey<GROUP> = (item: GROUP) => string | number | undefined;
11
+ declare type SortGroups<ITEM, GROUP> = (a: Group<ITEM, GROUP>, b: Group<ITEM, GROUP>) => number;
12
+ declare type OnChangeProp<ITEM, MULTIPLE extends boolean> = (value: (MULTIPLE extends true ? ITEM[] : ITEM) | null, props: {
13
+ e: React.SyntheticEvent;
14
+ }) => void;
15
+ declare type ValueProp<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
16
+ export declare type OptionForCreate = {
17
+ label: string;
18
+ __optionForCreate: boolean;
19
+ };
20
+ export declare type SelectProps<ITEM, GROUP, MULTIPLE extends boolean> = {
21
+ getItemGroupKey?: GetItemGroupKey<ITEM> | undefined;
22
+ getGroupKey?: GetGroupKey<GROUP>;
23
+ sortGroups?: SortGroups<ITEM, GROUP>;
24
+ groups?: GROUP[];
25
+ items: ITEM[];
26
+ dropdownRef: React.MutableRefObject<HTMLDivElement | null>;
27
+ controlRef: React.MutableRefObject<HTMLDivElement | null>;
28
+ disabled?: boolean;
29
+ selectAll?: boolean;
30
+ getItemLabel: (item: ITEM) => string;
31
+ getItemKey: (item: ITEM) => string | number;
32
+ getItemDisabled?: (item: ITEM) => boolean | undefined;
33
+ searchFunction?: (item: ITEM, searchValue: string) => boolean;
34
+ onCreate?: (label: string, props: {
35
+ e: React.SyntheticEvent;
36
+ }) => void;
37
+ onFocus?: React.FocusEventHandler<HTMLInputElement>;
38
+ onBlur?: React.FocusEventHandler<HTMLInputElement>;
39
+ multiple: boolean;
40
+ searchValue?: string;
41
+ onChange: OnChangeProp<ITEM, MULTIPLE>;
42
+ value: ValueProp<ITEM, MULTIPLE>;
43
+ dropdownOpen?: boolean;
44
+ onDropdownOpen?: (isOpen: boolean) => void;
45
+ onSearchValueChange?: (value: string) => void;
46
+ ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;
47
+ };
48
+ export declare type OptionProps<ITEM> = {
49
+ index: number;
50
+ item: ITEM | OptionForCreate | SelectAllItem;
51
+ keyPrefix: number;
52
+ };
53
+ export declare type GetOptionPropsResult = {
54
+ onClick: (e: React.SyntheticEvent) => void;
55
+ onMouseEnter: (e: React.SyntheticEvent) => void;
56
+ active: boolean;
57
+ hovered: boolean;
58
+ key: string | number;
59
+ };
60
+ export declare const isOptionForCreate: <ITEM, GROUP>(params: OptionForCreate | ITEM | Group<ITEM, GROUP>) => params is OptionForCreate;
61
+ export declare const isNotOptionForCreate: <ITEM, GROUP>(params: OptionForCreate | Group<ITEM, GROUP>) => params is Group<ITEM, GROUP>;
62
+ export declare const isOptionForSelectAll: <ITEM>(params: SelectAllItem | ITEM) => params is SelectAllItem;
63
+ export declare function useSelect<ITEM, GROUP, MULTIPLE extends boolean>(params: SelectProps<ITEM, GROUP, MULTIPLE>): {
64
+ isOpen: boolean;
65
+ isFocused: boolean;
66
+ highlightedIndex: number;
67
+ visibleItems: (OptionForCreate | CountedGroup<ITEM, GROUP>)[];
68
+ highlightIndex: (indexForHighlight: IndexForHighlight, scrollToHighlighted: boolean) => void;
69
+ getOptionProps: ({ index, item, keyPrefix, }: OptionProps<ITEM>) => GetOptionPropsResult;
70
+ handleInputFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
71
+ handleInputBlur: (e: React.FocusEvent<HTMLInputElement>) => void;
72
+ handleToggleDropdown: () => void;
73
+ handleInputClick: () => void;
74
+ inputRef: React.RefObject<HTMLInputElement>;
75
+ getKeyProps: (rest?: import("../../../hooks/useKeys").KeyProps | undefined) => import("../../../hooks/useKeys").KeyProps;
76
+ handleInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
77
+ searchValue: string;
78
+ clearValue: (e: React.SyntheticEvent) => void;
79
+ getHandleRemoveValue: (item: ITEM) => (e: React.SyntheticEvent) => void;
80
+ notFound: boolean;
81
+ hasItems: boolean;
82
+ optionsRefs: React.RefObject<HTMLDivElement>[];
83
+ };
84
+ export {};
@@ -0,0 +1,2 @@
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}function _createForOfIteratorHelper(a,b){var c="undefined"!=typeof Symbol&&a[Symbol.iterator]||a["@@iterator"];if(!c){if(Array.isArray(a)||(c=_unsupportedIterableToArray(a))||b&&a&&"number"==typeof a.length){c&&(a=c);var d=0,e=function(){};return{s:e,n:function n(){return d>=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){throw a}),f:e}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function(a){function b(){return a.apply(this,arguments)}return b.toString=function(){return a.toString()},b}(function(a){h=!0,f=a}),f:function f(){try{g||null==c["return"]||c["return"]()}finally{if(h)throw f}}}}function _unsupportedIterableToArray(a,b){if(a){if("string"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return"Object"===c&&a.constructor&&(c=a.constructor.name),"Map"===c||"Set"===c?Array.from(a):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);c<b;c++)d[c]=a[c];return d}import{useCallback,useEffect,useLayoutEffect,useMemo,useRef,useState}from"react";import{useClickOutside}from"../../../hooks/useClickOutside";import{useDebounce}from"../../../hooks/useDebounce";import{useKeys}from"../../../hooks/useKeys";import{useMutableRef}from"../../../hooks/useMutableRef";import{usePrevious}from"../../../hooks/usePrevious";import{useRefs}from"../../../hooks/useRefs";import{getCountedGroups,getGroups}from"../../../utils/getGroups";import{scrollToIndex,useHoistedState}from"./helpers";var isMultipleParams=function(a){return a.multiple},isNotMultipleParams=function(a){return!a.multiple},actions={setOpen:"setOpen",setSearch:"setSearch",highlightIndex:"highlightIndex"},initialState={searchValue:"",resolvedSearchValue:"",isOpen:!1,highlightedIndex:0,scrollToHighlighted:!1};export var isOptionForCreate=function(a){return a&&Object.prototype.hasOwnProperty.call(a,"__optionForCreate")};export var isNotOptionForCreate=function(a){return a&&!Object.prototype.hasOwnProperty.call(a,"__optionForCreate")};export var isOptionForSelectAll=function(a){return a&&Object.prototype.hasOwnProperty.call(a,"__optionSelctAll")};export function useSelect(a){var b=a.items,c=a.dropdownRef,d=a.controlRef,e=a.disabled,f=void 0!==e&&e,g=a.multiple,h=void 0!==g&&g,i=a.getItemLabel,j=a.getItemKey,k=a.searchFunction,l=a.getItemGroupKey,m=a.groups,n=a.selectAll,o=void 0!==n&&n,p=a.getGroupKey,q=a.sortGroups,r=a.getItemDisabled,s=a.onFocus,t=a.onBlur,u=a.searchValue,v=a.onDropdownOpen,w=a.onSearchValueChange,x=a.dropdownOpen,y=a.ignoreOutsideClicksRefs,z=useRef(null),A=useState(!1),B=_slicedToArray(A,2),C=B[0],D=B[1],E=useMemo(function(){return a.value&&(Array.isArray(a.value)?a.value:[a.value])||[]},[a.value]),F=useHoistedState(initialState),G=_slicedToArray(F,2),H=G[0],I=H.searchValue,J=H.isOpen,K=H.highlightedIndex,L=H.resolvedSearchValue,M=H.scrollToHighlighted,N=G[1],O=useMutableRef(w),P=function(a,b){return-1!==i(a).toLocaleLowerCase().indexOf(b.toLocaleLowerCase())},Q=useMemo(function(){if(L&&""!==L){var c=b.filter(function(a){return k?k(a,L):P(a,L)});return[c,a.onCreate&&!c.length?{label:I,__optionForCreate:!0}:void 0]}return[b,void 0]},[b,L]),R=_slicedToArray(Q,2),S=R[0],T=R[1],U=useMemo(function(){var b=getCountedGroups(getGroups(S,null!==m&&void 0!==m&&m.length?l:void 0,m,p,q),isMultipleParams(a)?a.value:[],o,j,r);return T?[T].concat(_toConsumableArray(b)):b},[E,o,S,m,l,r,p,q,T]),V=S.length+(T?1:0)+(o?U.length:0),W=useRefs(V,[J]),X=useMemo(function(){var b=!1;return 0<I.length&&(b=0===U.filter(function(a){return isOptionForCreate(a)||0<a.items.length||a.group}).length&&!a.onCreate),b},[U]),Y=0!==b.length,Z=function(){var a=0;if(0<E.length){var b,c=_createForOfIteratorHelper(U);try{for(c.s();!(b=c.n()).done;){var f=b.value;if(isOptionForCreate(f)){a++;continue}var d,e=_createForOfIteratorHelper(f.items);try{for(e.s();!(d=e.n()).done;){var g=d.value;if(isOptionForSelectAll(g))return a;if(j(g)===j(E[0]))return a;a++}}catch(a){e.e(a)}finally{e.f()}}}catch(a){c.e(a)}finally{c.f()}}return 0},$=useCallback(function(a){N(function(b){return _objectSpread(_objectSpread({},b),{},{isOpen:a})},actions.setOpen)},[N]),_=useDebounce(function(a){N(function(b){return b.resolvedSearchValue===a?b:_objectSpread(_objectSpread({},b),{},{resolvedSearchValue:a})},actions.setSearch)},300),aa=useCallback(function(a){N(function(b){return b.searchValue===a?b:_objectSpread(_objectSpread({},b),{},{searchValue:a||""})},actions.setSearch),_(a||"")},[N,_]),ba=usePrevious(J),ca=useCallback(function(a,b){N(function(c){var d=Math.min(Math.max(0,"function"==typeof a?a(c.highlightedIndex):a),V-1);return c.highlightedIndex===d?c:_objectSpread(_objectSpread({},c),{},{highlightedIndex:d,scrollToHighlighted:b})},actions.highlightIndex)},[S,N,T]);useLayoutEffect(function(){if(null!==E&&!ba&&J){var a=Z();0<S.length&&scrollToIndex(a,c,W,function(){return ca(0,!1)})}});var da=function(b,c){if(b.stopPropagation(),isMultipleParams(a)){var d,e=null===(d=a.value)||void 0===d?void 0:d.filter(function(a){return j(a)!==j(c)});a.onChange(null!==e&&void 0!==e&&e.length?e:null,{e:b})}},ea=function(b,c){if(!(r&&r(c))){if(isMultipleParams(a)){var d=E.some(function(a){return j(a)===j(c)})?E.filter(function(a){return j(a)!==j(c)}):[].concat(_toConsumableArray(E),[c]);a.onChange(d.length?d:null,{e:b})}isNotMultipleParams(a)&&(a.onChange(c,{e:b}),$(!1),aa(""))}},fa=function(b){var c=b.e,d=b.items;if(isMultipleParams(a)){var e=r?d.filter(function(a){return!r(a)}):d,f=[],g=[];E.forEach(function(a){e.find(function(b){return j(a)===j(b)})?f.push(a):g.push(a)}),f.length===e.length?a.onChange(g,{e:c}):a.onChange([].concat(g,_toConsumableArray(e)),{e:c})}},ga=function(b,c){a.onCreate&&a.onCreate(c,{e:b}),$(!1),aa("")},ha=function(b){if(isMultipleParams(a)){var c=null===E||void 0===E?void 0:E.filter(function(a){return null===r||void 0===r?void 0:r(a)});a.onChange(c&&0<c.length?c:null,{e:b})}isNotMultipleParams(a)&&a.onChange(null,{e:b}),aa("")},ia=function(a,b){b.preventDefault(),f||$(!0),ca(function(a){return a-1},!0)},ja=function(a,b){b.preventDefault(),f||$(!0),ca(function(a){return a+1},!0)},ka=useKeys({ArrowUp:ia,ArrowDown:ja,PageUp:ia,PageDown:ja,Home:ia,End:ja,Enter:function Enter(a,b){if(J){(I||S[K])&&b.preventDefault();var c=function(a){var b,c=0,d=_createForOfIteratorHelper(U);try{for(d.s();!(b=d.n()).done;){var e=b.value;if(isOptionForCreate(e))return c++,[void 0,e];if(e.items.length+c>a)return[e,e.items[a-c]];c+=e.items.length}}catch(a){d.e(a)}finally{d.f()}return[void 0,void 0]},d=c(K),e=_slicedToArray(d,2),f=e[0],g=e[1];if(isOptionForCreate(g))return void ga(b,g.label);if(isOptionForSelectAll(g)){var h;return void fa({e:b,items:null!==(h=null===f||void 0===f?void 0:f.items.filter(function(a){return!isOptionForSelectAll(a)}))&&void 0!==h?h:[]})}g&&ea(b,g)}else $(!0)},Escape:function Escape(){$(!1)},Tab:function Tab(a,b){J&&(b.preventDefault(),$(!1))},Backspace:function Backspace(a,b){I||(h?da(b,E[E.length-1]):ha(b))}});useClickOutside({isActive:J,ignoreClicksInsideRefs:[c,d].concat(_toConsumableArray(y||[])),handler:function handler(){$(!1)}}),useEffect(function(){f&&$(!1)},[f]),useEffect(function(){var a=Z();ca(a,!0)},[ca]),useEffect(function(){0<S.length&&M&&scrollToIndex(K,c,W,function(){return ca(0,!1)})},[K]);return useEffect(function(){aa(u)},[u]),useEffect(function(){var a;null===(a=c.current)||void 0===a?void 0:a.scrollTo({top:0})},[L]),useEffect(function(){null===v||void 0===v?void 0:v(J)},[J]),useEffect(function(){var a;null===(a=O.current)||void 0===a?void 0:a.call(O,I)},[I]),useEffect(function(){$(x||!1)},[x]),{isOpen:J,isFocused:C,highlightedIndex:K,visibleItems:U,highlightIndex:ca,getOptionProps:function getOptionProps(a){var b=a.index,c=a.item,d=a.keyPrefix;if(isOptionForCreate(c))return{onClick:function onClick(a){ga(a,c.label)},onMouseEnter:function onMouseEnter(){ca(b,!1)},active:!1,hovered:b===K,key:"".concat(d,"__optionForCreate")};if(isOptionForSelectAll(c)){var f=function(){var a,b=_createForOfIteratorHelper(U);try{for(b.s();!(a=b.n()).done;){var e=a.value;if(isOptionForCreate(e))break;if(e.key===c.groupKey){var d;return null!==(d=null===e||void 0===e?void 0:e.items.filter(function(a){return!isOptionForSelectAll(a)}))&&void 0!==d?d:[]}}}catch(a){b.e(a)}finally{b.f()}return[]};return{onClick:function onClick(a){fa({e:a,items:f()})},onMouseEnter:function onMouseEnter(){ca(b,!1)},active:!1,hovered:b===K,key:"".concat(d,"__optionForSelectAll")}}var e=j(c);return{onClick:function onClick(a){ea(a,c)},onMouseEnter:function onMouseEnter(){ca(b,!1)},active:!!E.find(function(a){return j(a)===e}),hovered:b===K,key:"".concat(d).concat(e)}},handleInputFocus:function handleInputFocus(a){f||(!C&&D(!0),"function"==typeof s&&s(a))},handleInputBlur:function handleInputBlur(a){if(J){var b;return void(null===(b=z.current)||void 0===b?void 0:b.focus())}C&&D(!1),"function"==typeof t&&t(a)},handleToggleDropdown:function handleToggleDropdown(){if(J)$(!1),D(!1);else{var a;$(!0),D(!0),null===(a=z.current)||void 0===a?void 0:a.focus()}},handleInputClick:function handleInputClick(){if(f||$(!J),h){var a;null===(a=z.current)||void 0===a?void 0:a.focus()}},inputRef:z,getKeyProps:ka,handleInputChange:function handleInputChange(a){f||!h&&0<E.length||(aa(a.target.value),$(!0))},searchValue:I,clearValue:ha,getHandleRemoveValue:function getHandleRemoveValue(a){return function(b){return da(b,a)}},notFound:X,hasItems:Y,optionsRefs:W}}
2
+ //# sourceMappingURL=useSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelect.js","names":["useCallback","useEffect","useLayoutEffect","useMemo","useRef","useState","useClickOutside","useDebounce","useKeys","useMutableRef","usePrevious","useRefs","getCountedGroups","getGroups","scrollToIndex","useHoistedState","isMultipleParams","params","multiple","isNotMultipleParams","actions","setOpen","setSearch","highlightIndex","initialState","searchValue","resolvedSearchValue","isOpen","highlightedIndex","scrollToHighlighted","isOptionForCreate","Object","prototype","hasOwnProperty","call","isNotOptionForCreate","isOptionForSelectAll","useSelect","items","dropdownRef","controlRef","disabled","getItemLabel","getItemKey","searchFunction","getItemGroupKey","groups","selectAll","getGroupKey","sortGroups","getItemDisabled","onFocus","onBlur","searchValueProp","onDropdownOpen","onSearchValueChange","dropdownOpen","ignoreOutsideClicksRefs","inputRef","isFocused","setIsFocused","value","Array","isArray","setState","onSearchValueChangeRef","searchFunctionDefault","item","toLocaleLowerCase","indexOf","fiteredOptions","filter","onCreate","length","label","__optionForCreate","filteredOptions","optionForCreate","visibleItems","resultGroups","maxHighlightIndex","optionsRefs","notFound","flag","group","hasItems","getSelectedOptionIndex","index","newIsOpen","old","setResolvedSearch","prevIsOpen","indexForHighlight","newIndex","Math","min","max","currentHighlightIndex","removeValue","e","valueItem","stopPropagation","newValue","onChange","some","onChangeAll","parametrs","nonDisabledItems","currentGroupValues","withoutGroupValues","forEach","el","find","push","clearValue","results","ArrowUp","_","preventDefault","ArrowDown","getKeyProps","PageUp","PageDown","Home","End","Enter","getData","couter","Escape","Tab","Backspace","isActive","ignoreClicksInsideRefs","handler","current","scrollTo","top","getOptionProps","keyPrefix","onClick","onMouseEnter","active","hovered","key","getItems","groupKey","handleInputFocus","handleInputBlur","focus","handleToggleDropdown","handleInputClick","handleInputChange","target","getHandleRemoveValue"],"sources":["../../../../../../src/components/SelectComponentsCanary/useSelect/useSelect.ts"],"sourcesContent":["import React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useClickOutside } from '##/hooks/useClickOutside';\nimport { useDebounce } from '##/hooks/useDebounce';\nimport { KeyHandler, useKeys } from '##/hooks/useKeys';\nimport { useMutableRef } from '##/hooks/useMutableRef';\nimport { usePrevious } from '##/hooks/usePrevious';\nimport { useRefs } from '##/hooks/useRefs';\nimport {\n CountedGroup,\n getCountedGroups,\n getGroups,\n SelectAllItem,\n} from '##/utils/getGroups';\n\nimport { scrollToIndex, useHoistedState } from './helpers';\n\ntype IndexForHighlight = number | ((oldIndex: number) => number);\n\ntype Group<ITEM, GROUP> = {\n items: ITEM[];\n key: string | number;\n group?: GROUP;\n};\ntype GetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;\ntype GetGroupKey<GROUP> = (item: GROUP) => string | number | undefined;\ntype SortGroups<ITEM, GROUP> = (\n a: Group<ITEM, GROUP>,\n b: Group<ITEM, GROUP>,\n) => number;\n\ntype OnChangeProp<ITEM, MULTIPLE extends boolean> = (\n value: (MULTIPLE extends true ? ITEM[] : ITEM) | null,\n props: {\n e: React.SyntheticEvent;\n },\n) => void;\n\ntype ValueProp<ITEM, MULTIPLE extends boolean> =\n | (MULTIPLE extends true ? ITEM[] : ITEM)\n | null\n | undefined;\n\nexport type OptionForCreate = {\n label: string;\n __optionForCreate: boolean;\n};\n\nexport type SelectProps<ITEM, GROUP, MULTIPLE extends boolean> = {\n getItemGroupKey?: GetItemGroupKey<ITEM> | undefined;\n getGroupKey?: GetGroupKey<GROUP>;\n sortGroups?: SortGroups<ITEM, GROUP>;\n groups?: GROUP[];\n items: ITEM[];\n dropdownRef: React.MutableRefObject<HTMLDivElement | null>;\n controlRef: React.MutableRefObject<HTMLDivElement | null>;\n disabled?: boolean;\n selectAll?: boolean;\n getItemLabel: (item: ITEM) => string;\n getItemKey: (item: ITEM) => string | number;\n getItemDisabled?: (item: ITEM) => boolean | undefined;\n searchFunction?: (item: ITEM, searchValue: string) => boolean;\n onCreate?: (label: string, props: { e: React.SyntheticEvent }) => void;\n onFocus?: React.FocusEventHandler<HTMLInputElement>;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n multiple: boolean;\n searchValue?: string;\n onChange: OnChangeProp<ITEM, MULTIPLE>;\n value: ValueProp<ITEM, MULTIPLE>;\n dropdownOpen?: boolean;\n onDropdownOpen?: (isOpen: boolean) => void;\n onSearchValueChange?: (value: string) => void;\n ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n};\n\nexport type OptionProps<ITEM> = {\n index: number;\n item: ITEM | OptionForCreate | SelectAllItem;\n keyPrefix: number;\n};\n\nexport type GetOptionPropsResult = {\n onClick: (e: React.SyntheticEvent) => void;\n onMouseEnter: (e: React.SyntheticEvent) => void;\n active: boolean;\n hovered: boolean;\n key: string | number;\n};\n\nconst isMultipleParams = <ITEM, GROUP>(\n params: SelectProps<ITEM, GROUP, boolean>,\n): params is SelectProps<ITEM, GROUP, true> => {\n return params.multiple;\n};\n\nconst isNotMultipleParams = <ITEM, GROUP>(\n params: SelectProps<ITEM, GROUP, boolean>,\n): params is SelectProps<ITEM, GROUP, false> => {\n return !params.multiple;\n};\n\nconst actions = {\n setOpen: 'setOpen',\n setSearch: 'setSearch',\n highlightIndex: 'highlightIndex',\n};\n\nconst initialState = {\n searchValue: '',\n resolvedSearchValue: '',\n isOpen: false,\n highlightedIndex: 0,\n scrollToHighlighted: false,\n};\n\nexport const isOptionForCreate = <ITEM, GROUP>(\n params: OptionForCreate | Group<ITEM, GROUP> | ITEM,\n): params is OptionForCreate => {\n return (\n params && Object.prototype.hasOwnProperty.call(params, '__optionForCreate')\n );\n};\n\nexport const isNotOptionForCreate = <ITEM, GROUP>(\n params: OptionForCreate | Group<ITEM, GROUP>,\n): params is Group<ITEM, GROUP> => {\n return (\n params && !Object.prototype.hasOwnProperty.call(params, '__optionForCreate')\n );\n};\n\nexport const isOptionForSelectAll = <ITEM>(\n params: SelectAllItem | ITEM,\n): params is SelectAllItem => {\n return (\n params && Object.prototype.hasOwnProperty.call(params, '__optionSelctAll')\n );\n};\n\nexport function useSelect<ITEM, GROUP, MULTIPLE extends boolean>(\n params: SelectProps<ITEM, GROUP, MULTIPLE>,\n) {\n const {\n items,\n dropdownRef,\n controlRef,\n disabled = false,\n multiple = false,\n getItemLabel,\n getItemKey,\n searchFunction,\n getItemGroupKey,\n groups,\n selectAll = false,\n getGroupKey,\n sortGroups,\n getItemDisabled,\n onFocus,\n onBlur,\n searchValue: searchValueProp,\n onDropdownOpen,\n onSearchValueChange,\n dropdownOpen,\n ignoreOutsideClicksRefs,\n } = params;\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const [isFocused, setIsFocused] = useState(false);\n\n const value = useMemo(\n () =>\n (params.value &&\n (Array.isArray(params.value) ? params.value : [params.value])) ||\n [],\n [params.value],\n );\n\n const [\n {\n searchValue,\n isOpen,\n highlightedIndex,\n resolvedSearchValue,\n scrollToHighlighted,\n },\n setState,\n ] = useHoistedState(initialState);\n\n const onSearchValueChangeRef = useMutableRef(onSearchValueChange);\n\n const searchFunctionDefault = (item: ITEM, searchValue: string) =>\n getItemLabel(item)\n .toLocaleLowerCase()\n .indexOf(searchValue.toLocaleLowerCase()) !== -1;\n\n const [filteredOptions, optionForCreate] = useMemo(() => {\n if (resolvedSearchValue && resolvedSearchValue !== '') {\n const fiteredOptions = items.filter((item) =>\n searchFunction\n ? searchFunction(item, resolvedSearchValue)\n : searchFunctionDefault(item, resolvedSearchValue),\n );\n\n const optionForCreate: OptionForCreate = {\n label: searchValue,\n __optionForCreate: true,\n };\n\n return [\n fiteredOptions,\n params.onCreate && !fiteredOptions.length ? optionForCreate : undefined,\n ] as const;\n }\n return [items, undefined] as const;\n }, [items, resolvedSearchValue]);\n\n const visibleItems = useMemo(() => {\n const resultGroups = getCountedGroups(\n getGroups(\n filteredOptions,\n groups?.length ? getItemGroupKey : undefined,\n groups,\n getGroupKey,\n sortGroups,\n ),\n isMultipleParams(params) ? params.value : [],\n selectAll,\n getItemKey,\n getItemDisabled,\n );\n\n return optionForCreate ? [optionForCreate, ...resultGroups] : resultGroups;\n }, [\n value,\n selectAll,\n filteredOptions,\n groups,\n getItemGroupKey,\n getItemDisabled,\n getGroupKey,\n sortGroups,\n optionForCreate,\n ]);\n\n const maxHighlightIndex =\n // колличество опций\n filteredOptions.length +\n // кнопка для создания\n (optionForCreate ? 1 : 0) +\n // кнопки выбрать все\n (selectAll ? visibleItems.length : 0);\n\n const optionsRefs = useRefs<HTMLDivElement>(maxHighlightIndex, [isOpen]);\n\n const notFound = useMemo(() => {\n let flag = false;\n if (searchValue.length > 0) {\n flag =\n visibleItems.filter(\n (group) =>\n isOptionForCreate(group) || group.items.length > 0 || group.group,\n ).length === 0 && !params.onCreate;\n }\n return flag;\n }, [visibleItems]);\n\n const hasItems = items.length !== 0;\n\n const getSelectedOptionIndex = (): number => {\n let index = 0;\n if (value.length > 0) {\n for (const group of visibleItems) {\n if (isOptionForCreate(group)) {\n index++;\n // eslint-disable-next-line no-continue\n continue;\n }\n for (const item of group.items) {\n if (isOptionForSelectAll(item)) {\n return index;\n }\n if (getItemKey(item) === getItemKey(value[0])) {\n return index;\n }\n index++;\n }\n }\n }\n\n return 0;\n };\n\n // Actions\n\n const setOpen = useCallback(\n (newIsOpen: boolean) => {\n setState(\n (old) => ({\n ...old,\n isOpen: newIsOpen,\n }),\n actions.setOpen,\n );\n },\n [setState],\n );\n\n const setResolvedSearch = useDebounce((value: string) => {\n setState((old) => {\n if (old.resolvedSearchValue === value) {\n return old;\n }\n return {\n ...old,\n resolvedSearchValue: value,\n };\n }, actions.setSearch);\n }, 300);\n\n const setSearch = useCallback(\n (value: string | undefined) => {\n setState((old) => {\n if (old.searchValue === value) {\n return old;\n }\n return {\n ...old,\n searchValue: value || '',\n };\n }, actions.setSearch);\n setResolvedSearch(value || '');\n },\n [setState, setResolvedSearch],\n );\n\n const prevIsOpen = usePrevious(isOpen);\n\n const highlightIndex = useCallback(\n (indexForHighlight: IndexForHighlight, scrollToHighlighted: boolean) => {\n setState((old) => {\n const newIndex = Math.min(\n Math.max(\n 0,\n typeof indexForHighlight === 'function'\n ? indexForHighlight(old.highlightedIndex)\n : indexForHighlight,\n ),\n maxHighlightIndex - 1,\n );\n\n if (old.highlightedIndex === newIndex) {\n return old;\n }\n\n return {\n ...old,\n highlightedIndex: newIndex,\n scrollToHighlighted,\n };\n }, actions.highlightIndex);\n },\n [filteredOptions, setState, optionForCreate],\n );\n\n useLayoutEffect(() => {\n if (value !== null && !prevIsOpen && isOpen) {\n const currentHighlightIndex = getSelectedOptionIndex();\n if (filteredOptions.length > 0) {\n scrollToIndex(currentHighlightIndex, dropdownRef, optionsRefs, () =>\n highlightIndex(0, false),\n );\n }\n }\n });\n\n const removeValue = (e: React.SyntheticEvent, valueItem: ITEM) => {\n e.stopPropagation();\n if (isMultipleParams(params)) {\n const newValue = params.value?.filter(\n (item) => getItemKey(item) !== getItemKey(valueItem),\n );\n params.onChange(newValue?.length ? newValue : null, {\n e,\n });\n }\n };\n\n const onChange = (e: React.SyntheticEvent, item: ITEM) => {\n if (getItemDisabled && getItemDisabled(item)) {\n return;\n }\n if (isMultipleParams(params)) {\n const newValue = value.some(\n (value) => getItemKey(value) === getItemKey(item),\n )\n ? value.filter((value) => getItemKey(value) !== getItemKey(item))\n : [...value, item];\n params.onChange(newValue.length ? newValue : null, { e });\n }\n if (isNotMultipleParams(params)) {\n params.onChange(item, { e });\n setOpen(false);\n setSearch('');\n }\n };\n\n const onChangeAll = (parametrs: {\n e: React.SyntheticEvent;\n items: ITEM[];\n }) => {\n const { e, items } = parametrs;\n if (isMultipleParams(params)) {\n const nonDisabledItems = getItemDisabled\n ? items.filter((item) => !getItemDisabled(item))\n : items;\n\n const currentGroupValues: ITEM[] = [];\n const withoutGroupValues: ITEM[] = [];\n value.forEach((el) => {\n if (\n nonDisabledItems.find((item) => getItemKey(el) === getItemKey(item))\n ) {\n currentGroupValues.push(el);\n } else {\n withoutGroupValues.push(el);\n }\n });\n if (currentGroupValues.length === nonDisabledItems.length) {\n params.onChange(withoutGroupValues, { e });\n } else {\n params.onChange([...withoutGroupValues, ...nonDisabledItems], {\n e,\n });\n }\n }\n };\n\n const onCreate = (e: React.SyntheticEvent, label: string) => {\n params.onCreate && params.onCreate(label, { e });\n setOpen(false);\n setSearch('');\n };\n\n // Handlers\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (!disabled && !(!multiple && value.length > 0)) {\n setSearch(e.target.value);\n setOpen(true);\n }\n };\n\n const handleInputClick = (): void => {\n !disabled && setOpen(!isOpen);\n\n if (multiple) {\n inputRef.current?.focus();\n }\n };\n\n const clearValue = (e: React.SyntheticEvent) => {\n if (isMultipleParams(params)) {\n const results = value?.filter((item) => getItemDisabled?.(item));\n params.onChange(results && results.length > 0 ? results : null, {\n e,\n });\n }\n if (isNotMultipleParams(params)) {\n params.onChange(null, { e });\n }\n setSearch('');\n };\n\n const getHandleRemoveValue = (item: ITEM) => (e: React.SyntheticEvent) =>\n removeValue(e, item);\n\n // Prop Getters\n\n const ArrowUp: KeyHandler = (_, e): void => {\n e.preventDefault();\n !disabled && setOpen(true);\n highlightIndex((old) => old - 1, true);\n };\n\n const ArrowDown: KeyHandler = (_, e): void => {\n e.preventDefault();\n !disabled && setOpen(true);\n highlightIndex((old) => old + 1, true);\n };\n\n const Enter: KeyHandler = (_, e): void => {\n if (isOpen) {\n if (searchValue || filteredOptions[highlightedIndex]) {\n e.preventDefault();\n }\n\n const getData = (\n index: number,\n ): [\n CountedGroup<ITEM, GROUP> | undefined,\n SelectAllItem | OptionForCreate | ITEM | undefined,\n ] => {\n let couter = 0;\n for (const group of visibleItems) {\n if (isOptionForCreate(group)) {\n couter++;\n return [undefined, group];\n }\n if (group.items.length + couter > index) {\n return [group, group.items[index - couter]];\n }\n couter += group.items.length;\n }\n return [undefined, undefined];\n };\n\n const [group, item] = getData(highlightedIndex);\n\n if (isOptionForCreate(item)) {\n onCreate(e, item.label);\n return;\n }\n\n if (isOptionForSelectAll(item)) {\n onChangeAll({\n e,\n items:\n (group?.items.filter(\n (el) => !isOptionForSelectAll(el),\n ) as ITEM[]) ?? [],\n });\n return;\n }\n\n if (item) {\n onChange(e, item);\n }\n } else {\n setOpen(true);\n }\n };\n\n const Escape: KeyHandler = (): void => {\n setOpen(false);\n };\n\n const Tab: KeyHandler = (_, e): void => {\n if (isOpen) {\n e.preventDefault();\n setOpen(false);\n }\n };\n\n const Backspace: KeyHandler = (_, e): void => {\n if (searchValue) {\n return;\n }\n if (multiple) {\n removeValue(e, value[value.length - 1]);\n } else {\n clearValue(e);\n }\n };\n\n const getKeyProps = useKeys({\n ArrowUp,\n ArrowDown,\n PageUp: ArrowUp,\n PageDown: ArrowDown,\n Home: ArrowUp,\n End: ArrowDown,\n Enter,\n Escape,\n Tab,\n Backspace,\n });\n\n const getOptionProps = ({\n index,\n item,\n keyPrefix,\n }: OptionProps<ITEM>): GetOptionPropsResult => {\n if (isOptionForCreate(item)) {\n return {\n onClick: (e: React.SyntheticEvent) => {\n onCreate(e, item.label);\n },\n onMouseEnter: () => {\n highlightIndex(index, false);\n },\n active: false,\n hovered: index === highlightedIndex,\n key: `${keyPrefix}__optionForCreate`,\n };\n }\n if (isOptionForSelectAll(item)) {\n const getItems = (): ITEM[] => {\n for (const group of visibleItems) {\n if (isOptionForCreate(group)) {\n break;\n }\n if (group.key === item.groupKey) {\n return (\n (group?.items.filter(\n (el) => !isOptionForSelectAll(el),\n ) as ITEM[]) ?? []\n );\n }\n }\n return [];\n };\n return {\n onClick: (e: React.SyntheticEvent) => {\n onChangeAll({ e, items: getItems() });\n },\n onMouseEnter: () => {\n highlightIndex(index, false);\n },\n active: false,\n hovered: index === highlightedIndex,\n key: `${keyPrefix}__optionForSelectAll`,\n };\n }\n const key = getItemKey(item);\n return {\n onClick: (e: React.SyntheticEvent) => {\n onChange(e, item);\n },\n onMouseEnter: () => {\n highlightIndex(index, false);\n },\n active: Boolean(value.find((item) => getItemKey(item) === key)),\n hovered: index === highlightedIndex,\n key: `${keyPrefix}${key}`,\n };\n };\n\n useClickOutside({\n isActive: isOpen,\n ignoreClicksInsideRefs: [\n dropdownRef,\n controlRef,\n ...(ignoreOutsideClicksRefs || []),\n ],\n handler: () => {\n setOpen(false);\n },\n });\n\n useEffect(() => {\n if (disabled) {\n setOpen(false);\n }\n }, [disabled]);\n\n useEffect(() => {\n const currentHighlightIndex = getSelectedOptionIndex();\n highlightIndex(currentHighlightIndex, true);\n }, [highlightIndex]);\n\n useEffect(() => {\n if (filteredOptions.length > 0 && scrollToHighlighted) {\n scrollToIndex(highlightedIndex, dropdownRef, optionsRefs, () =>\n highlightIndex(0, false),\n );\n }\n }, [highlightedIndex]);\n\n const handleInputFocus = (e: React.FocusEvent<HTMLInputElement>): void => {\n if (!disabled) {\n if (!isFocused) {\n setIsFocused(true);\n }\n if (typeof onFocus === 'function') {\n onFocus(e);\n }\n }\n };\n\n const handleInputBlur = (e: React.FocusEvent<HTMLInputElement>): void => {\n if (isOpen) {\n inputRef.current?.focus();\n return;\n }\n\n if (isFocused) {\n setIsFocused(false);\n }\n\n if (typeof onBlur === 'function') {\n onBlur(e);\n }\n };\n\n const handleToggleDropdown = (): void => {\n if (isOpen) {\n setOpen(false);\n setIsFocused(false);\n } else {\n setOpen(true);\n setIsFocused(true);\n inputRef.current?.focus();\n }\n };\n\n useEffect(() => {\n setSearch(searchValueProp);\n }, [searchValueProp]);\n\n useEffect(() => {\n dropdownRef.current?.scrollTo({ top: 0 });\n }, [resolvedSearchValue]);\n\n useEffect(() => {\n onDropdownOpen?.(isOpen);\n }, [isOpen]);\n\n useEffect(() => {\n onSearchValueChangeRef.current?.(searchValue);\n }, [searchValue]);\n\n useEffect(() => {\n setOpen(dropdownOpen || false);\n }, [dropdownOpen]);\n\n return {\n isOpen,\n isFocused,\n highlightedIndex,\n visibleItems,\n highlightIndex,\n getOptionProps,\n handleInputFocus,\n handleInputBlur,\n handleToggleDropdown,\n handleInputClick,\n inputRef,\n getKeyProps,\n handleInputChange,\n searchValue,\n clearValue,\n getHandleRemoveValue,\n notFound,\n hasItems,\n optionsRefs,\n };\n}\n"],"mappings":"4pEAAA,OACEA,WADF,CAEEC,SAFF,CAGEC,eAHF,CAIEC,OAJF,CAKEC,MALF,CAMEC,QANF,KAOO,OAPP,CASA,OAASC,eAAT,sCACA,OAASC,WAAT,kCACA,OAAqBC,OAArB,8BACA,OAASC,aAAT,oCACA,OAASC,WAAT,kCACA,OAASC,OAAT,8BACA,OAEEC,gBAFF,CAGEC,SAHF,gCAOA,OAASC,aAAT,CAAwBC,eAAxB,iB,GA0EMC,iBAAgB,CAAG,SACvBC,CADuB,CAEsB,CAC7C,MAAOA,EAAM,CAACC,QACf,C,CAEKC,mBAAmB,CAAG,SAC1BF,CAD0B,CAEoB,CAC9C,MAAO,CAACA,CAAM,CAACC,QAChB,C,CAEKE,OAAO,CAAG,CACdC,OAAO,CAAE,SADK,CAEdC,SAAS,CAAE,WAFG,CAGdC,cAAc,CAAE,gBAHF,C,CAMVC,YAAY,CAAG,CACnBC,WAAW,CAAE,EADM,CAEnBC,mBAAmB,CAAE,EAFF,CAGnBC,MAAM,GAHa,CAInBC,gBAAgB,CAAE,CAJC,CAKnBC,mBAAmB,GALA,C,CAQrB,MAAO,IAAMC,kBAAiB,CAAG,SAC/Bb,CAD+B,CAED,CAC9B,MAC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D,EAA4B,CAAf,CAAA2C,CAAK,CAACY,MADoC,GAExEnD,EAAS,CAAC6E,CAAC,CAACqD,MAAF,CAAS3F,KAAV,CAF+D,CAGxExC,CAAO,IAHiE,CAK3E,CAmRM,CAcLI,WAAW,CAAXA,CAdK,CAeLyF,UAAU,CAAVA,EAfK,CAgBLuC,oBAAoB,CA5QO,QAAvBA,qBAAuB,CAACtF,CAAD,QAAgB,UAACgC,CAAD,QAC3CD,GAAW,CAACC,CAAD,CAAIhC,CAAJ,CADgC,CAAhB,CA4PtB,CAiBLe,QAAQ,CAARA,CAjBK,CAkBLG,QAAQ,CAARA,CAlBK,CAmBLJ,WAAW,CAAXA,CAnBK,CAqBR"}
@@ -82,7 +82,7 @@ declare type GetOnChandgeForInputReturned = (props: {
82
82
  value: number;
83
83
  }) => void;
84
84
  export declare const getOnChandgeForInput: (props: SliderProps<boolean>, field: 0 | 1) => GetOnChandgeForInputReturned;
85
- export declare const getIcon: (side?: Side) => IconComponent | undefined;
85
+ export declare const getIcon: (side?: Side) => IconComponent<"span"> | undefined;
86
86
  export declare const getMaxForStartField: (props: SliderProps<boolean>) => number | undefined;
87
87
  export declare const getMinForEndField: (props: SliderProps<boolean>) => number | undefined;
88
88
  export declare const getValidStep: (min: number, max: number, step?: number | number[]) => number | number[];
@@ -282,7 +282,7 @@ export declare const getItem: <ITEM>(item: ITEM, props: Required<Mappers<ITEM>>
282
282
  status: "alert" | "warning" | "success" | "normal" | "system" | undefined;
283
283
  autoClose: number | boolean | undefined;
284
284
  showProgress: "line" | "timer" | undefined;
285
- icon: import("@consta/icons/Icon").IconComponent | undefined;
285
+ icon: import("@consta/icons/Icon").IconComponent<"span"> | undefined;
286
286
  actions: import("./types").SnackBarPropItemAction[] | undefined;
287
287
  onClose: (() => void) | undefined;
288
288
  onAutoClose: (() => void) | undefined;
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","lessIcon","lessLabel","moreIcon","moreLabel","className","open","as"];import"./SpoilerButton.css";import{AnimateIconSwitcher}from"@consta/icons/AnimateIconSwitcher";import React from"react";import{IconArrowDown}from"../../../icons/IconArrowDown";import{cnCanary}from"../../../utils/bem";import{forwardRefWithAs}from"../../../utils/types/PropsWithAsAttributes";import{Text}from"../../Text";import{defaultSpoilerPropSize}from"../types";export var cnSpoilerButton=cnCanary("SpoilerButton");var spoilerIconSizeMap={l:"m",m:"s",s:"s",xs:"xs"};export var SpoilerButton=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?defaultSpoilerPropSize:c,e=a.lessIcon,f=a.lessLabel,g=void 0===f?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435":f,h=a.moreIcon,i=void 0===h?IconArrowDown:h,j=a.moreLabel,k=void 0===j?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435":j,l=a.className,m=a.open,n=a.as,o=void 0===n?"div":n,p=_objectWithoutProperties(a,_excluded);return React.createElement(o,Object.assign({},p,{className:cnSpoilerButton({size:d},[l]),ref:b}),React.createElement(Text,{className:cnSpoilerButton("Label"),size:d,as:"span"},m?g:k),React.createElement(AnimateIconSwitcher,{className:cnSpoilerButton("Icon"),startIcon:i,endIcon:e,active:m,endDirection:e?void 0:180,size:spoilerIconSizeMap[d]}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","lessIcon","lessLabel","moreIcon","moreLabel","className","open","as"];import"./SpoilerButton.css";import{AnimateIconSwitcher}from"@consta/icons/AnimateIconSwitcher";import{IconArrowDown}from"@consta/icons/IconArrowDown";import React from"react";import{cnCanary}from"../../../utils/bem";import{forwardRefWithAs}from"../../../utils/types/PropsWithAsAttributes";import{Text}from"../../Text";import{defaultSpoilerPropSize}from"../types";export var cnSpoilerButton=cnCanary("SpoilerButton");var spoilerIconSizeMap={l:"m",m:"s",s:"s",xs:"xs"};export var SpoilerButton=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?defaultSpoilerPropSize:c,e=a.lessIcon,f=a.lessLabel,g=void 0===f?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435":f,h=a.moreIcon,i=void 0===h?IconArrowDown:h,j=a.moreLabel,k=void 0===j?"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435":j,l=a.className,m=a.open,n=a.as,o=void 0===n?"div":n,p=_objectWithoutProperties(a,_excluded);return React.createElement(o,Object.assign({},p,{className:cnSpoilerButton({size:d},[l]),ref:b}),React.createElement(Text,{className:cnSpoilerButton("Label"),size:d,as:"span"},m?g:k),React.createElement(AnimateIconSwitcher,{className:cnSpoilerButton("Icon"),startIcon:i,endIcon:e,active:m,endDirection:e?void 0:180,size:spoilerIconSizeMap[d]}))});
2
2
  //# sourceMappingURL=SpoilerButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SpoilerButton.js","names":["AnimateIconSwitcher","React","IconArrowDown","cnCanary","forwardRefWithAs","Text","defaultSpoilerPropSize","cnSpoilerButton","spoilerIconSizeMap","l","m","s","xs","SpoilerButton","props","ref","size","lessIcon","lessLabel","moreIcon","moreLabel","className","open","as","otherProps"],"sources":["../../../../../../src/components/SpoilerCanary/SpoilerButton/SpoilerButton.tsx"],"sourcesContent":["import './SpoilerButton.css';\n\nimport { AnimateIconSwitcher } from '@consta/icons/AnimateIconSwitcher';\nimport React from 'react';\n\nimport { IconPropSize } from '##/icons/Icon';\nimport { IconArrowDown } from '##/icons/IconArrowDown';\nimport { cnCanary } from '##/utils/bem';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport { Text } from '../../Text';\nimport {\n defaultSpoilerPropSize,\n SpoilerButtonProps,\n SpoilerPropSize,\n} from '../types';\n\nexport const cnSpoilerButton = cnCanary('SpoilerButton');\n\nconst spoilerIconSizeMap: Record<SpoilerPropSize, IconPropSize> = {\n l: 'm',\n m: 's',\n s: 's',\n xs: 'xs',\n};\n\nexport const SpoilerButton = forwardRefWithAs<SpoilerButtonProps>(\n (props, ref) => {\n const {\n size = defaultSpoilerPropSize,\n lessIcon,\n lessLabel = 'Показать меньше',\n moreIcon = IconArrowDown,\n moreLabel = 'Показать больше',\n className,\n open,\n as = 'div',\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnSpoilerButton({ size }, [className])}\n ref={ref}\n >\n <Text className={cnSpoilerButton('Label')} size={size} as=\"span\">\n {open ? lessLabel : moreLabel}\n </Text>\n <AnimateIconSwitcher\n className={cnSpoilerButton('Icon')}\n startIcon={moreIcon}\n endIcon={lessIcon}\n active={open}\n endDirection={lessIcon ? undefined : 180}\n size={spoilerIconSizeMap[size]}\n />\n </Tag>\n );\n },\n);\n"],"mappings":"kLAAA,4BAEA,OAASA,mBAAT,KAAoC,mCAApC,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAGA,OAASC,aAAT,oCACA,OAASC,QAAT,0BACA,OAASC,gBAAT,kDAEA,OAASC,IAAT,kBACA,OACEC,sBADF,gBAMA,MAAO,IAAMC,gBAAe,CAAGJ,QAAQ,CAAC,eAAD,CAAhC,CAEP,GAAMK,mBAAyD,CAAG,CAChEC,CAAC,CAAE,GAD6D,CAEhEC,CAAC,CAAE,GAF6D,CAGhEC,CAAC,CAAE,GAH6D,CAIhEC,EAAE,CAAE,IAJ4D,CAAlE,CAOA,MAAO,IAAMC,cAAa,CAAGT,gBAAgB,CAC3C,SAACU,CAAD,CAAQC,CAAR,CAAgB,OAWVD,CAXU,CAEZE,IAFY,CAEZA,CAFY,YAELV,sBAFK,GAGZW,CAHY,CAWVH,CAXU,CAGZG,QAHY,GAWVH,CAXU,CAIZI,SAJY,CAIZA,CAJY,YAIA,uFAJA,KAWVJ,CAXU,CAKZK,QALY,CAKZA,CALY,YAKDjB,aALC,KAWVY,CAXU,CAMZM,SANY,CAMZA,CANY,YAMA,uFANA,GAOZC,CAPY,CAWVP,CAXU,CAOZO,SAPY,CAQZC,CARY,CAWVR,CAXU,CAQZQ,IARY,GAWVR,CAXU,CASZS,EATY,CASZA,CATY,YASP,KATO,GAUTC,CAVS,0BAWVV,CAXU,YAed,MACE,qBAHUS,CAGV,kBACMC,CADN,EAEE,SAAS,CAAEjB,eAAe,CAAC,CAAES,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACK,CAAD,CAAX,CAF5B,CAGE,GAAG,CAAEN,CAHP,GAKE,oBAAC,IAAD,EAAM,SAAS,CAAER,eAAe,CAAC,OAAD,CAAhC,CAA2C,IAAI,CAAES,CAAjD,CAAuD,EAAE,CAAC,MAA1D,EACGM,CAAI,CAAGJ,CAAH,CAAeE,CADtB,CALF,CAQE,oBAAC,mBAAD,EACE,SAAS,CAAEb,eAAe,CAAC,MAAD,CAD5B,CAEE,SAAS,CAAEY,CAFb,CAGE,OAAO,CAAEF,CAHX,CAIE,MAAM,CAAEK,CAJV,CAKE,YAAY,CAAEL,CAAQ,QAAe,GALvC,CAME,IAAI,CAAET,kBAAkB,CAACQ,CAAD,CAN1B,EARF,CAkBH,CAnC0C,CAAtC"}
1
+ {"version":3,"file":"SpoilerButton.js","names":["AnimateIconSwitcher","IconArrowDown","React","cnCanary","forwardRefWithAs","Text","defaultSpoilerPropSize","cnSpoilerButton","spoilerIconSizeMap","l","m","s","xs","SpoilerButton","props","ref","size","lessIcon","lessLabel","moreIcon","moreLabel","className","open","as","otherProps"],"sources":["../../../../../../src/components/SpoilerCanary/SpoilerButton/SpoilerButton.tsx"],"sourcesContent":["import './SpoilerButton.css';\n\nimport { AnimateIconSwitcher } from '@consta/icons/AnimateIconSwitcher';\nimport { IconArrowDown } from '@consta/icons/IconArrowDown';\nimport React from 'react';\n\nimport { IconPropSize } from '##/icons/Icon';\nimport { cnCanary } from '##/utils/bem';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport { Text } from '../../Text';\nimport {\n defaultSpoilerPropSize,\n SpoilerButtonProps,\n SpoilerPropSize,\n} from '../types';\n\nexport const cnSpoilerButton = cnCanary('SpoilerButton');\n\nconst spoilerIconSizeMap: Record<SpoilerPropSize, IconPropSize> = {\n l: 'm',\n m: 's',\n s: 's',\n xs: 'xs',\n};\n\nexport const SpoilerButton = forwardRefWithAs<SpoilerButtonProps>(\n (props, ref) => {\n const {\n size = defaultSpoilerPropSize,\n lessIcon,\n lessLabel = 'Показать меньше',\n moreIcon = IconArrowDown,\n moreLabel = 'Показать больше',\n className,\n open,\n as = 'div',\n ...otherProps\n } = props;\n\n const Tag = as as string;\n\n return (\n <Tag\n {...otherProps}\n className={cnSpoilerButton({ size }, [className])}\n ref={ref}\n >\n <Text className={cnSpoilerButton('Label')} size={size} as=\"span\">\n {open ? lessLabel : moreLabel}\n </Text>\n <AnimateIconSwitcher\n className={cnSpoilerButton('Icon')}\n startIcon={moreIcon}\n endIcon={lessIcon}\n active={open}\n endDirection={lessIcon ? undefined : 180}\n size={spoilerIconSizeMap[size]}\n />\n </Tag>\n );\n },\n);\n"],"mappings":"kLAAA,4BAEA,OAASA,mBAAT,KAAoC,mCAApC,CACA,OAASC,aAAT,KAA8B,6BAA9B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAGA,OAASC,QAAT,0BACA,OAASC,gBAAT,kDAEA,OAASC,IAAT,kBACA,OACEC,sBADF,gBAMA,MAAO,IAAMC,gBAAe,CAAGJ,QAAQ,CAAC,eAAD,CAAhC,CAEP,GAAMK,mBAAyD,CAAG,CAChEC,CAAC,CAAE,GAD6D,CAEhEC,CAAC,CAAE,GAF6D,CAGhEC,CAAC,CAAE,GAH6D,CAIhEC,EAAE,CAAE,IAJ4D,CAAlE,CAOA,MAAO,IAAMC,cAAa,CAAGT,gBAAgB,CAC3C,SAACU,CAAD,CAAQC,CAAR,CAAgB,OAWVD,CAXU,CAEZE,IAFY,CAEZA,CAFY,YAELV,sBAFK,GAGZW,CAHY,CAWVH,CAXU,CAGZG,QAHY,GAWVH,CAXU,CAIZI,SAJY,CAIZA,CAJY,YAIA,uFAJA,KAWVJ,CAXU,CAKZK,QALY,CAKZA,CALY,YAKDlB,aALC,KAWVa,CAXU,CAMZM,SANY,CAMZA,CANY,YAMA,uFANA,GAOZC,CAPY,CAWVP,CAXU,CAOZO,SAPY,CAQZC,CARY,CAWVR,CAXU,CAQZQ,IARY,GAWVR,CAXU,CASZS,EATY,CASZA,CATY,YASP,KATO,GAUTC,CAVS,0BAWVV,CAXU,YAed,MACE,qBAHUS,CAGV,kBACMC,CADN,EAEE,SAAS,CAAEjB,eAAe,CAAC,CAAES,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACK,CAAD,CAAX,CAF5B,CAGE,GAAG,CAAEN,CAHP,GAKE,oBAAC,IAAD,EAAM,SAAS,CAAER,eAAe,CAAC,OAAD,CAAhC,CAA2C,IAAI,CAAES,CAAjD,CAAuD,EAAE,CAAC,MAA1D,EACGM,CAAI,CAAGJ,CAAH,CAAeE,CADtB,CALF,CAQE,oBAAC,mBAAD,EACE,SAAS,CAAEb,eAAe,CAAC,MAAD,CAD5B,CAEE,SAAS,CAAEY,CAFb,CAGE,OAAO,CAAEF,CAHX,CAIE,MAAM,CAAEK,CAJV,CAKE,YAAY,CAAEL,CAAQ,QAAe,GALvC,CAME,IAAI,CAAET,kBAAkB,CAACQ,CAAD,CAN1B,EARF,CAkBH,CAnC0C,CAAtC"}
@@ -6,7 +6,7 @@ export declare const tagBasePropSizeDefault: "m";
6
6
  export declare type TagBasePropSize = typeof tagBasePropSize[number];
7
7
  export declare const tagBasePropGroupNumberValue: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9];
8
8
  export declare const tagBasePropGroupStringValue: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
9
- export declare const tagBasePropGroup: (2 | 1 | "1" | 4 | 3 | 5 | "2" | 7 | 9 | "3" | "4" | "5" | "6" | "7" | "8" | 8 | 6 | "9")[];
9
+ export declare const tagBasePropGroup: (2 | 1 | "1" | 4 | 3 | 5 | "2" | 7 | 9 | 8 | "3" | "4" | "5" | "6" | "7" | "8" | 6 | "9")[];
10
10
  export declare type TagBasePropGroup = typeof tagBasePropGroup[number];
11
11
  export declare const tagBasePropView: readonly ["stroked", "filled"];
12
12
  export declare const tagBasePropViewDefault: "stroked";
@@ -1 +1 @@
1
- .TextField{--caption-margin-left:calc(var(--input-space) + var(--control-border-width));--counter-button-icon-color:var(--color-control-typo-ghost);--counter-button-background:transparent;--counter-offset:0;--clear-button-color:var(--color-control-typo-clear);display:inline-flex;position:relative}.TextField_width_full{width:100%}.TextField_size_xs{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-xs);--input-font-size:var(--control-text-size-xs);--input-space:calc(var(--control-space-xs)*0.5)}.TextField_size_xs .TextField-InputContainer_form_brickRound,.TextField_size_xs .TextField-InputContainer_form_clearRound,.TextField_size_xs .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-xs) - var(--space-3xs))}.TextField_size_s{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-s);--input-font-size:var(--control-text-size-s);--input-space:calc(var(--control-space-s)*0.5)}.TextField_size_s .TextField-InputContainer_form_brickRound,.TextField_size_s .TextField-InputContainer_form_clearRound,.TextField_size_s .TextField-InputContainer_form_round{--counter-offset:var(--space-xs)}.TextField_size_m{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-m);--input-font-size:var(--control-text-size-m);--input-space:calc(var(--control-space-m)*0.5)}.TextField_size_m .TextField-InputContainer_form_brickRound,.TextField_size_m .TextField-InputContainer_form_clearRound,.TextField_size_m .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-s) - var(--space-3xs))}.TextField_size_l{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-l);--input-font-size:var(--control-text-size-l);--input-space:calc(var(--control-space-l)*0.5)}.TextField_size_l .TextField-InputContainer_form_brickRound,.TextField_size_l .TextField-InputContainer_form_clearRound,.TextField_size_l .TextField-InputContainer_form_round{--counter-offset:var(--space-s)}.TextField_labelPosition_top{flex-direction:column}.TextField_labelPosition_top>:not(:last-child){margin-bottom:var(--label-offset)}.TextField_labelPosition_left{flex-direction:row}.TextField_labelPosition_left .TextField-Label{align-items:center;display:inline-flex;height:var(--input-height)}.TextField_labelPosition_left>:not(:last-child){margin-right:var(--space-s)}.TextField-Body{display:inline-flex;flex-direction:column;width:100%}.TextField-Body .TextField-Caption{margin-left:var(--caption-margin-left);margin-top:var(--caption-offset)}.TextField_view_clear .TextField-Caption{--caption-margin-left:0}.TextField-InputContainer{box-sizing:border-box;display:inline-flex;font-family:var(--font-primary);font-weight:var(--font-weight-text-regular);max-width:100%;min-height:var(--input-height);position:relative;transition:border-color .15s,box-shadow .15s,background-color .15s}.TextField-InputContainer_disabled{--counter-button-background:var(--color-control-bg-disable);--counter-button-icon-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear,.TextField-InputContainer_view_clear:focus,.TextField-InputContainer_view_clear:hover{color:var(--color-control-typo-default);padding:0}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default{--container-border-color:var(--color-control-bg-border-default);background:var(--color-control-bg-default);border:var(--control-border-width) solid var(--container-border-color);border-radius:var(--control-radius);color:var(--color-control-typo-default);overflow-x:hidden;padding:0 var(--input-space)}.TextField-InputContainer_view_default:hover{border-color:var(--color-control-bg-border-default-hover)}.TextField-InputContainer_view_default.TextField-InputContainer_status_alert{--container-border-color:var(--color-bg-alert)}.TextField-InputContainer_view_default.TextField-InputContainer_status_success{--container-border-color:var(--color-bg-success)}.TextField-InputContainer_view_default.TextField-InputContainer_status_warning{--container-border-color:var(--color-bg-warning)}.TextField-InputContainer_view_default .TextField-Input{color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Input::-moz-placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input::placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Side_type_string{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default.TextField-InputContainer_focus{border-color:var(--color-control-bg-border-focus);outline:none;z-index:1}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus),calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_brickClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_defaultClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_roundClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearBrick,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearDefault,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearRound{box-shadow:calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled{--clear-button-color:var(--color-control-typo-disable);background:var(--color-control-bg-disable);border-color:var(--color-control-bg-border-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_form_defaultClear{border-right-width:0}.TextField-InputContainer_form_defaultBrick,.TextField-InputContainer_form_defaultClear{border-radius:var(--control-radius) 0 0 var(--control-radius)}.TextField-InputContainer_form_round{border-radius:calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6);padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundBrick{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundClear{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);border-right-width:0;padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brick{border-radius:0}.TextField-InputContainer_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_brickRound{border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brickClear{border-radius:0;border-right-width:0}.TextField-InputContainer_form_clearDefault{border-left-width:0;border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_clearBrick{border-left-width:0;border-radius:0}.TextField-InputContainer_form_clearRound{border-left-width:0;border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_clearClear{border-width:0;border-bottom-width:var(--control-border-width);border-radius:0;border-top-width:var(--control-border-width)}.TextField-InputContainer_withValue .TextField-Side.TextField-Side_type_string{color:var(--color-control-typo-default)}.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-typo-secondary)}.TextField-InputContainer_type_number{padding-right:0}.TextField-InputContainer_type_textarea .TextField-Input{display:block;line-height:var(--line-height-text-m);min-width:0;padding-bottom:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);padding-top:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);resize:none}.TextField-Counter{display:inline-flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);margin-right:var(--counter-offset);width:var(--space-xl)}.TextField-CounterButton{align-items:center;background-color:var(--counter-button-background);border:none;color:var(--counter-button-icon-color);cursor:pointer;display:inline-flex;flex:1;flex-direction:column;justify-content:center;margin:0;overflow-y:hidden;padding:0;transition:background-color .15s;width:var(--space-xl)}.TextField-ClearButton,.TextField-EyeButton{background-color:transparent;border:none;cursor:pointer;display:flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);justify-content:center;margin:0;margin-left:var(--input-space);padding:0}.TextField-ClearButton{color:var(--clear-button-color)}.TextField-ClearButton:hover{--clear-button-color:var(--color-control-typo-clear-hover)}.TextField-EyeButton{color:var(--color-control-typo-placeholder)}.TextField-EyeButton:hover{color:var(--color-control-typo-clear-hover)}.TextField-ClearButtonIcon{position:relative;top:1px}.TextField-Input{background:transparent;border:none;color:currentColor;flex:1;font-family:var(--font-primary);font-size:var(--input-font-size);height:calc(var(--input-height) - var(--control-border-width)*2);min-width:80px;outline:none;padding:0;width:100%}.TextField-Input::-webkit-inner-spin-button,.TextField-Input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.TextField-Input[type=password]::-ms-reveal{display:none}.TextField-Input[type=number]{-moz-appearance:textfield}.TextField-Input:focus{outline:none}.TextField-Input:-webkit-autofill,.TextField-Input:-webkit-autofill:focus,.TextField-Input:-webkit-autofill:hover{border:none;-webkit-box-shadow:inset 0 0 0 1000px transparent;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}.TextField-Side{align-items:center;display:flex;height:calc(var(--input-height) - var(--control-border-width)*2);overflow:hidden}.TextField-Side_position_left{margin-right:var(--input-space)}.TextField-Side_position_right{margin-left:var(--input-space)}.TextField-Side_type_string{font-size:var(--input-font-size);white-space:nowrap}.TextField-Icon{color:var(--color-control-typo-placeholder)}
1
+ .TextField{--caption-margin-left:calc(var(--input-space) + var(--control-border-width));--counter-button-icon-color:var(--color-control-typo-ghost);--counter-button-background:transparent;--counter-offset:0;--clear-button-color:var(--color-control-typo-clear);display:inline-flex;position:relative}.TextField_width_full{width:100%}.TextField_size_xs{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-xs);--input-font-size:var(--control-text-size-xs);--input-space:calc(var(--control-space-xs)*0.5)}.TextField_size_xs .TextField-InputContainer_form_brickRound,.TextField_size_xs .TextField-InputContainer_form_clearRound,.TextField_size_xs .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-xs) - var(--space-3xs))}.TextField_size_s{--label-offset:var(--space-2xs);--caption-offset:var(--space-2xs);--input-height:var(--control-height-s);--input-font-size:var(--control-text-size-s);--input-space:calc(var(--control-space-s)*0.5)}.TextField_size_s .TextField-InputContainer_form_brickRound,.TextField_size_s .TextField-InputContainer_form_clearRound,.TextField_size_s .TextField-InputContainer_form_round{--counter-offset:var(--space-xs)}.TextField_size_m{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-m);--input-font-size:var(--control-text-size-m);--input-space:calc(var(--control-space-m)*0.5)}.TextField_size_m .TextField-InputContainer_form_brickRound,.TextField_size_m .TextField-InputContainer_form_clearRound,.TextField_size_m .TextField-InputContainer_form_round{--counter-offset:calc(var(--space-s) - var(--space-3xs))}.TextField_size_l{--label-offset:var(--space-xs);--caption-offset:var(--space-xs);--input-height:var(--control-height-l);--input-font-size:var(--control-text-size-l);--input-space:calc(var(--control-space-l)*0.5)}.TextField_size_l .TextField-InputContainer_form_brickRound,.TextField_size_l .TextField-InputContainer_form_clearRound,.TextField_size_l .TextField-InputContainer_form_round{--counter-offset:var(--space-s)}.TextField_labelPosition_top{flex-direction:column}.TextField_labelPosition_top>:not(:last-child){margin-bottom:var(--label-offset)}.TextField_labelPosition_left{flex-direction:row}.TextField_labelPosition_left .TextField-Label{align-items:center;display:inline-flex;height:var(--input-height)}.TextField_labelPosition_left>:not(:last-child){margin-right:var(--space-s)}.TextField-Body{display:inline-flex;flex-direction:column;width:100%}.TextField-Body .TextField-Caption{margin-left:var(--caption-margin-left);margin-top:var(--caption-offset)}.TextField_view_clear .TextField-Caption{--caption-margin-left:0}.TextField-InputContainer{box-sizing:border-box;display:inline-flex;font-family:var(--font-primary);font-weight:var(--font-weight-text-regular);max-width:100%;min-height:var(--input-height);position:relative;transition:border-color .15s,box-shadow .15s,background-color .15s}.TextField-InputContainer_disabled{--counter-button-background:var(--color-control-bg-disable);--counter-button-icon-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear,.TextField-InputContainer_view_clear:focus,.TextField-InputContainer_view_clear:hover{color:var(--color-control-typo-default);padding:0}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::placeholder,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default{--container-border-color:var(--color-control-bg-border-default);background:var(--color-control-bg-default);border:var(--control-border-width) solid var(--container-border-color);border-radius:var(--control-radius);color:var(--color-control-typo-default);overflow-x:hidden;padding:0 var(--input-space)}.TextField-InputContainer_view_default:hover{border-color:var(--color-control-bg-border-default-hover)}.TextField-InputContainer_view_default.TextField-InputContainer_status_alert{--container-border-color:var(--color-bg-alert)}.TextField-InputContainer_view_default.TextField-InputContainer_status_success{--container-border-color:var(--color-bg-success)}.TextField-InputContainer_view_default.TextField-InputContainer_status_warning{--container-border-color:var(--color-bg-warning)}.TextField-InputContainer_view_default .TextField-Input{color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Input::-moz-placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input::placeholder{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:focus,.TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:hover{-webkit-text-fill-color:var(--color-control-typo-default)}.TextField-InputContainer_view_default .TextField-Side_type_string{color:var(--color-control-typo-placeholder)}.TextField-InputContainer_view_default.TextField-InputContainer_focus{border-color:var(--color-control-bg-border-focus);outline:none;z-index:1}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus),calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_brickClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_defaultClear,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_roundClear{box-shadow:var(--control-border-width) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearBrick,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearDefault,.TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearRound{box-shadow:calc(var(--control-border-width)*-1) 0 var(--color-control-bg-border-focus)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled{--clear-button-color:var(--color-control-typo-disable);background:var(--color-control-bg-disable);border-color:var(--color-control-bg-border-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input{color:var(--color-control-typo-disable);pointer-events:all}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::placeholder{color:var(--color-control-typo-disable)}.TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Side_type_string,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,.TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string{color:var(--color-control-typo-disable)}.TextField-InputContainer_form_defaultClear{border-right-width:0}.TextField-InputContainer_form_defaultBrick,.TextField-InputContainer_form_defaultClear{border-radius:var(--control-radius) 0 0 var(--control-radius)}.TextField-InputContainer_form_round{border-radius:calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6);padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundBrick{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_roundClear{border-radius:calc(var(--input-height)/2) 0 0 calc(var(--input-height)/2);border-right-width:0;padding-left:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brick{border-radius:0}.TextField-InputContainer_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_brickRound{border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_brickClear{border-radius:0;border-right-width:0}.TextField-InputContainer_form_clearDefault{border-left-width:0;border-radius:0 var(--control-radius) var(--control-radius) 0}.TextField-InputContainer_form_clearBrick{border-left-width:0;border-radius:0}.TextField-InputContainer_form_clearRound{border-left-width:0;border-radius:0 calc(var(--input-height)/2) calc(var(--input-height)/2) 0;padding-right:calc(var(--input-space)*1.6)}.TextField-InputContainer_form_clearClear{border-width:0;border-bottom-width:var(--control-border-width);border-radius:0;border-top-width:var(--control-border-width)}.TextField-InputContainer_withValue .TextField-Side.TextField-Side_type_string{color:var(--color-control-typo-default)}.TextField-InputContainer_withValue .TextField-Icon{color:var(--color-typo-secondary)}.TextField-InputContainer_type_number{padding-right:0}.TextField-InputContainer_type_textarea .TextField-Input{display:block;line-height:var(--line-height-text-m);min-width:0;padding-bottom:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);padding-top:calc((var(--input-height) - (var(--control-border-width)*2) - var(--line-height-text-m))/2);resize:none}.TextField-Counter{display:inline-flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);margin-right:var(--counter-offset);width:var(--space-xl)}.TextField-CounterButton{align-items:center;background-color:var(--counter-button-background);border:none;color:var(--counter-button-icon-color);cursor:pointer;display:inline-flex;flex:1;flex-direction:column;justify-content:center;margin:0;overflow-y:hidden;padding:0;transition:background-color .15s;width:var(--space-xl)}.TextField-ClearButton,.TextField-EyeButton{background-color:transparent;border:none;cursor:pointer;display:flex;flex-direction:column;height:calc(var(--input-height) - var(--control-border-width)*2);justify-content:center;margin:0;margin-left:var(--input-space);padding:0}.TextField-ClearButton{color:var(--clear-button-color)}.TextField-ClearButton:hover{--clear-button-color:var(--color-control-typo-clear-hover)}.TextField-EyeButton{color:var(--color-control-typo-placeholder)}.TextField-EyeButton:hover{color:var(--color-control-typo-clear-hover)}.TextField-ClearButtonIcon{color:var(--color-control-typo-placeholder);position:relative;top:1px}.TextField-Input{background:transparent;border:none;color:currentColor;flex:1;font-family:var(--font-primary);font-size:var(--input-font-size);height:calc(var(--input-height) - var(--control-border-width)*2);min-width:80px;outline:none;padding:0;width:100%}.TextField-Input::-webkit-inner-spin-button,.TextField-Input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.TextField-Input[type=password]::-ms-reveal{display:none}.TextField-Input[type=number]{-moz-appearance:textfield}.TextField-Input:focus{outline:none}.TextField-Input:-webkit-autofill,.TextField-Input:-webkit-autofill:focus,.TextField-Input:-webkit-autofill:hover{border:none;-webkit-box-shadow:inset 0 0 0 1000px transparent;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s}.TextField-Side{align-items:center;display:flex;height:calc(var(--input-height) - var(--control-border-width)*2);overflow:hidden}.TextField-Side_position_left{margin-right:var(--input-space)}.TextField-Side_position_right{margin-left:var(--input-space)}.TextField-Side_type_string{font-size:var(--input-font-size);white-space:nowrap}.TextField-Icon{color:var(--color-control-typo-placeholder)}
@@ -1,2 +1,2 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["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","labelIcon","inputContainerRef","labelPosition","caption","iconSize","focused","onClick","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture"];import"./TextField.css";import{IconClose}from"@consta/icons/IconClose";import{IconEye}from"@consta/icons/IconEye";import{IconEyeClose}from"@consta/icons/IconEyeClose";import{IconSelect}from"@consta/icons/IconSelect";import{IconSelectOpen}from"@consta/icons/IconSelectOpen";import React,{forwardRef,useCallback,useEffect}from"react";import TextAreaAutoSize from"react-textarea-autosize";import{useFlag}from"../../hooks/useFlag/useFlag";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useMutableRef}from"../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../hooks/useSortSteps/useSortSteps";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{isString}from"../../utils/type-guards";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{FieldCaption}from"../FieldCaption/FieldCaption";import{FieldLabel}from"../FieldLabel/FieldLabel";import{getIncrementFlag,getTypeForRender,getValueByStep,sizeMap}from"./helpers";import{textFieldPropFormDefault,textFieldPropSizeDefault,textFieldPropViewDefault,textFieldPropWidthDefault}from"./types";export var COMPONENT_NAME="TextField";export var cnTextField=cn("TextField");export var TextFieldRender=function(a,b){var c=React.useRef(null),d=React.useRef(null),e=usePropsHandler(COMPONENT_NAME,a,c),f=e.className,g=e.type,h=void 0===g?"text":g,i=e.value,j=e.onChange,k=e.id,l=e.name,m=e.rows,n=e.cols,o=e.minRows,p=e.maxRows,q=e.inputRef,r=e.maxLength,s=e.disabled,t=e.size,u=void 0===t?textFieldPropSizeDefault:t,v=e.view,w=void 0===v?textFieldPropViewDefault:v,x=e.form,y=void 0===x?textFieldPropFormDefault:x,z=e.state,A=e.status,B=e.width,C=void 0===B?textFieldPropWidthDefault:B,D=e.onBlur,E=e.onFocus,F=e.autoFocus,G=void 0!==F&&F,H=e.placeholder,I=e.leftSide,J=e.rightSide,K=e.autoComplete,L=e.withClearButton,M=e.incrementButtons,N=e.max,O=e.min,P=e.readOnly,Q=e.required,R=e.step,S=void 0===R?1:R,T=e.tabIndex,U=e.ariaLabel,V=e.label,W=e.labelIcon,X=e.inputContainerRef,Y=e.labelPosition,Z=void 0===Y?"top":Y,$=e.caption,_=e.iconSize,aa=e.focused,ba=e.onClick,ca=e.onKeyDown,da=e.onKeyDownCapture,ea=e.onKeyPress,fa=e.onKeyPressCapture,ga=e.onKeyUp,ha=e.onKeyUpCapture,ia=_objectWithoutProperties(e,_excluded),ja=useFlag(G),ka=_slicedToArray(ja,2),la=ka[0],ma=ka[1],na=useFlag(!1),oa=_slicedToArray(na,2),pa=oa[0],qa=oa[1],ra=useMutableRef(i),sa=useMutableRef(ba),ta=useMutableRef(j),ua=useCallback(function(a){var b;a.stopPropagation(),qa.toggle(),null===(b=d.current)||void 0===b?void 0:b.focus()},[]),va=I,wa=J,xa=isString(I),ya=isString(J),za=getByMap(sizeMap,u,_),Aa=useSortSteps({step:S,min:+O,max:+N}),Ba=useCallback(function(a){var b;s||(null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:a.target.value||null}))},[k,l,s]),Ca=function(a){ma.on(),null===E||void 0===E?void 0:E(a)},Da={className:cnTextField("Input"),value:i||"",onChange:Ba,maxLength:r,disabled:s,onBlur:function handleBlur(a){ma.off(),null===D||void 0===D?void 0:D(a)},onFocus:Ca,autoFocus:G,placeholder:H,autoComplete:K,readOnly:P,tabIndex:T,name:l,onKeyDownCapture:da,onKeyPress:ea,onKeyPressCapture:fa,onKeyUp:ga,onKeyUpCapture:ha,id:k?k.toString():"","aria-label":U},Ea=pa?IconEyeClose:IconEye,Fa={rows:m,cols:n,minRows:o||m,maxRows:p||m,ref:useForkRef([d,q])},Ga={type:getTypeForRender(h,pa),max:N,min:O,step:Array.isArray(Aa)?0:Aa,onKeyDown:function onKeyDown(a){var b=getIncrementFlag(a);if(null===ca||void 0===ca?void 0:ca(a),"number"===h&&"boolean"==typeof b&&!s){var c;a.preventDefault(),null===(c=ta.current)||void 0===c?void 0:c.call(ta,{e:a,id:k,name:l,value:getValueByStep(Aa,i,b,O,N)})}},ref:useForkRef([d,q])},Ha=useCallback(function(a){var b;null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:null})},[]),Ia=function(a){var b,c=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:getValueByStep(Aa,i,c,O,N)})},Ja={onClick:useCallback(function(a){var b,c;null===(b=d.current)||void 0===b?void 0:b.focus(),null===(c=sa.current)||void 0===c?void 0:c.call(sa,a)},[])};return useEffect(function(){if("password"===h&&d.current){var a;d.current.selectionStart=(null===(a=ra.current)||void 0===a?void 0:a.length)||0}},[pa]),React.createElement("div",Object.assign({className:cnTextField({labelPosition:Z,size:u,view:w,width:C},[f]),ref:useForkRef([b,c])},Ja,ia),V&&React.createElement(FieldLabel,{as:"label",htmlFor:null===k||void 0===k?void 0:k.toString(),icon:W,required:Q,className:cnTextField("Label",{labelPosition:Z}),size:u},V),React.createElement("div",{className:cnTextField("Body")},React.createElement("div",{ref:X,className:cnTextField("InputContainer",{view:w,form:y,status:A||z,disabled:s,type:h,focus:la||aa,withValue:!!i})},va&&React.createElement("div",{className:cnTextField("Side",{position:"left",type:xa?"string":"icon"}),title:"string"==typeof I?I:void 0},xa?I:React.createElement(va,{className:cnTextField("Icon"),size:za})),"textarea"===h?React.createElement(TextAreaAutoSize,Object.assign({},Da,Fa)):React.createElement("input",Object.assign({},Da,Ga)),"number"===h&&(void 0===M||M)&&React.createElement("div",{className:cnTextField("Counter")},React.createElement("button",{onFocus:Ca,onClick:function(a){return Ia(a,!0)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelectOpen,{size:"xs"})),React.createElement("button",{onFocus:Ca,onClick:function(a){return Ia(a,!1)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelect,{size:"xs"}))),i&&L&&"number"!==h&&React.createElement("button",{type:"button",disabled:s,onClick:Ha,className:cnTextField("ClearButton")},React.createElement(IconClose,{size:"xs",className:cnTextField("ClearButtonIcon")})),"password"===h&&i&&React.createElement("button",{className:cnTextField("ClearButton"),type:"button",onClick:ua},React.createElement(Ea,{className:cnTextField("Icon"),size:za})),wa&&"number"!==h&&"password"!==h&&React.createElement("div",{className:cnTextField("Side",{position:"right",type:ya?"string":"icon"}),title:"string"==typeof J?J:void 0},ya?J:React.createElement(wa,{className:cnTextField("Icon"),size:za}))),$&&React.createElement(FieldCaption,{className:cnTextField("Caption"),status:A||z},$)))};export var TextField=forwardRef(TextFieldRender);export*from"./types";
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["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","labelIcon","inputContainerRef","labelPosition","caption","iconSize","focused","onClick","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture"];import"./TextField.css";import{IconClear}from"@consta/icons/IconClear";import{IconEye}from"@consta/icons/IconEye";import{IconEyeClose}from"@consta/icons/IconEyeClose";import{IconSelect}from"@consta/icons/IconSelect";import{IconSelectOpen}from"@consta/icons/IconSelectOpen";import React,{forwardRef,useCallback,useEffect}from"react";import TextAreaAutoSize from"react-textarea-autosize";import{useFlag}from"../../hooks/useFlag/useFlag";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useMutableRef}from"../../hooks/useMutableRef/useMutableRef";import{useSortSteps}from"../../hooks/useSortSteps/useSortSteps";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{isString}from"../../utils/type-guards";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{FieldCaption}from"../FieldCaption/FieldCaption";import{FieldLabel}from"../FieldLabel/FieldLabel";import{getIncrementFlag,getTypeForRender,getValueByStep,sizeMap}from"./helpers";import{textFieldPropFormDefault,textFieldPropSizeDefault,textFieldPropViewDefault,textFieldPropWidthDefault}from"./types";export var COMPONENT_NAME="TextField";export var cnTextField=cn("TextField");export var TextFieldRender=function(a,b){var c=React.useRef(null),d=React.useRef(null),e=usePropsHandler(COMPONENT_NAME,a,c),f=e.className,g=e.type,h=void 0===g?"text":g,i=e.value,j=e.onChange,k=e.id,l=e.name,m=e.rows,n=e.cols,o=e.minRows,p=e.maxRows,q=e.inputRef,r=e.maxLength,s=e.disabled,t=e.size,u=void 0===t?textFieldPropSizeDefault:t,v=e.view,w=void 0===v?textFieldPropViewDefault:v,x=e.form,y=void 0===x?textFieldPropFormDefault:x,z=e.state,A=e.status,B=e.width,C=void 0===B?textFieldPropWidthDefault:B,D=e.onBlur,E=e.onFocus,F=e.autoFocus,G=void 0!==F&&F,H=e.placeholder,I=e.leftSide,J=e.rightSide,K=e.autoComplete,L=e.withClearButton,M=e.incrementButtons,N=e.max,O=e.min,P=e.readOnly,Q=e.required,R=e.step,S=void 0===R?1:R,T=e.tabIndex,U=e.ariaLabel,V=e.label,W=e.labelIcon,X=e.inputContainerRef,Y=e.labelPosition,Z=void 0===Y?"top":Y,$=e.caption,_=e.iconSize,aa=e.focused,ba=e.onClick,ca=e.onKeyDown,da=e.onKeyDownCapture,ea=e.onKeyPress,fa=e.onKeyPressCapture,ga=e.onKeyUp,ha=e.onKeyUpCapture,ia=_objectWithoutProperties(e,_excluded),ja=useFlag(G),ka=_slicedToArray(ja,2),la=ka[0],ma=ka[1],na=useFlag(!1),oa=_slicedToArray(na,2),pa=oa[0],qa=oa[1],ra=useMutableRef(i),sa=useMutableRef(ba),ta=useMutableRef(j),ua=useCallback(function(a){var b;a.stopPropagation(),qa.toggle(),null===(b=d.current)||void 0===b?void 0:b.focus()},[]),va=I,wa=J,xa=isString(I),ya=isString(J),za=getByMap(sizeMap,u,_),Aa=useSortSteps({step:S,min:+O,max:+N}),Ba=useCallback(function(a){var b;s||(null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:a.target.value||null}))},[k,l,s]),Ca=function(a){ma.on(),null===E||void 0===E?void 0:E(a)},Da={className:cnTextField("Input"),value:i||"",onChange:Ba,maxLength:r,disabled:s,onBlur:function handleBlur(a){ma.off(),null===D||void 0===D?void 0:D(a)},onFocus:Ca,autoFocus:G,placeholder:H,autoComplete:K,readOnly:P,tabIndex:T,name:l,onKeyDownCapture:da,onKeyPress:ea,onKeyPressCapture:fa,onKeyUp:ga,onKeyUpCapture:ha,id:k?k.toString():"","aria-label":U},Ea=pa?IconEyeClose:IconEye,Fa={rows:m,cols:n,minRows:o||m,maxRows:p||m,ref:useForkRef([d,q])},Ga={type:getTypeForRender(h,pa),max:N,min:O,step:Array.isArray(Aa)?0:Aa,onKeyDown:function onKeyDown(a){var b=getIncrementFlag(a);if(null===ca||void 0===ca?void 0:ca(a),"number"===h&&"boolean"==typeof b&&!s){var c;a.preventDefault(),null===(c=ta.current)||void 0===c?void 0:c.call(ta,{e:a,id:k,name:l,value:getValueByStep(Aa,i,b,O,N)})}},ref:useForkRef([d,q])},Ha=useCallback(function(a){var b;null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:null})},[]),Ia=function(a){var b,c=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];null===(b=ta.current)||void 0===b?void 0:b.call(ta,{e:a,id:k,name:l,value:getValueByStep(Aa,i,c,O,N)})},Ja={onClick:useCallback(function(a){var b,c;null===(b=d.current)||void 0===b?void 0:b.focus(),null===(c=sa.current)||void 0===c?void 0:c.call(sa,a)},[])};return useEffect(function(){if("password"===h&&d.current){var a;d.current.selectionStart=(null===(a=ra.current)||void 0===a?void 0:a.length)||0}},[pa]),React.createElement("div",Object.assign({className:cnTextField({labelPosition:Z,size:u,view:w,width:C},[f]),ref:useForkRef([b,c])},Ja,ia),V&&React.createElement(FieldLabel,{as:"label",htmlFor:null===k||void 0===k?void 0:k.toString(),icon:W,required:Q,className:cnTextField("Label",{labelPosition:Z}),size:u},V),React.createElement("div",{className:cnTextField("Body")},React.createElement("div",{ref:X,className:cnTextField("InputContainer",{view:w,form:y,status:A||z,disabled:s,type:h,focus:la||aa,withValue:!!i})},va&&React.createElement("div",{className:cnTextField("Side",{position:"left",type:xa?"string":"icon"}),title:"string"==typeof I?I:void 0},xa?I:React.createElement(va,{className:cnTextField("Icon"),size:za})),"textarea"===h?React.createElement(TextAreaAutoSize,Object.assign({},Da,Fa)):React.createElement("input",Object.assign({},Da,Ga)),"number"===h&&(void 0===M||M)&&React.createElement("div",{className:cnTextField("Counter")},React.createElement("button",{onFocus:Ca,onClick:function(a){return Ia(a,!0)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelectOpen,{size:"xs"})),React.createElement("button",{onFocus:Ca,onClick:function(a){return Ia(a,!1)},type:"button",className:cnTextField("CounterButton")},React.createElement(IconSelect,{size:"xs"}))),i&&L&&"number"!==h&&React.createElement("button",{type:"button",disabled:s,tabIndex:-1,onClick:Ha,className:cnTextField("ClearButton")},React.createElement(IconClear,{size:sizeMap[u],className:cnTextField("ClearButtonIcon")})),"password"===h&&i&&React.createElement("button",{className:cnTextField("ClearButton"),type:"button",onClick:ua},React.createElement(Ea,{className:cnTextField("Icon"),size:za})),wa&&"number"!==h&&"password"!==h&&React.createElement("div",{className:cnTextField("Side",{position:"right",type:ya?"string":"icon"}),title:"string"==typeof J?J:void 0},ya?J:React.createElement(wa,{className:cnTextField("Icon"),size:za}))),$&&React.createElement(FieldCaption,{className:cnTextField("Caption"),status:A||z},$)))};export var TextField=forwardRef(TextFieldRender);export*from"./types";
2
2
  //# sourceMappingURL=TextField.js.map