@consta/uikit 5.20.2 → 5.22.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 (272) hide show
  1. package/__internal__/src/components/AutoComplete/types.d.ts +1 -1
  2. package/__internal__/src/components/AutoComplete/types.js.map +1 -1
  3. package/__internal__/src/components/AutoCompleteCanary/types.d.ts +3 -3
  4. package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
  5. package/__internal__/src/components/AvatarGroup/helpers.d.ts +66 -56
  6. package/__internal__/src/components/AvatarGroup/types.d.ts +1 -1
  7. package/__internal__/src/components/AvatarGroup/types.js.map +1 -1
  8. package/__internal__/src/components/BadgeGroup/BadgeGroup.js +1 -1
  9. package/__internal__/src/components/BadgeGroup/BadgeGroup.js.map +1 -1
  10. package/__internal__/src/components/BadgeGroup/types.d.ts +1 -1
  11. package/__internal__/src/components/BadgeGroup/types.js.map +1 -1
  12. package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
  13. package/__internal__/src/components/BookmarkTabs/BookmarkTabsTab/BookmarkTabsTab.css +1 -1
  14. package/__internal__/src/components/BookmarkTabs/helper.d.ts +66 -56
  15. package/__internal__/src/components/BookmarkTabs/types.d.ts +3 -3
  16. package/__internal__/src/components/BookmarkTabs/types.js.map +1 -1
  17. package/__internal__/src/components/Breadcrumbs/BreadcrumbsFitModeScroll/BreadcrumbsFitModeScroll.js +1 -1
  18. package/__internal__/src/components/Breadcrumbs/BreadcrumbsFitModeScroll/BreadcrumbsFitModeScroll.js.map +1 -1
  19. package/__internal__/src/components/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.js +1 -1
  20. package/__internal__/src/components/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.js.map +1 -1
  21. package/__internal__/src/components/Breadcrumbs/BreadcrumbsMore/BreadcrumbsMore.d.ts +1 -1
  22. package/__internal__/src/components/Breadcrumbs/helpers.d.ts +74 -64
  23. package/__internal__/src/components/Breadcrumbs/helpers.js.map +1 -1
  24. package/__internal__/src/components/Breadcrumbs/types.d.ts +12 -11
  25. package/__internal__/src/components/Breadcrumbs/types.js.map +1 -1
  26. package/__internal__/src/components/Card/Card.d.ts +3 -2
  27. package/__internal__/src/components/Card/Card.js.map +1 -1
  28. package/__internal__/src/components/CheckboxGroup/helper.d.ts +66 -56
  29. package/__internal__/src/components/CheckboxGroup/types.d.ts +1 -1
  30. package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
  31. package/__internal__/src/components/Chips/ChipsChoice/types.d.ts +1 -1
  32. package/__internal__/src/components/Chips/ChipsChoice/types.js.map +1 -1
  33. package/__internal__/src/components/Chips/types.d.ts +1 -1
  34. package/__internal__/src/components/Chips/types.js.map +1 -1
  35. package/__internal__/src/components/ChoiceGroup/helper.d.ts +66 -56
  36. package/__internal__/src/components/ChoiceGroup/types.d.ts +1 -1
  37. package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
  38. package/__internal__/src/components/Collapse/types.d.ts +1 -1
  39. package/__internal__/src/components/Collapse/types.js.map +1 -1
  40. package/__internal__/src/components/CollapseGroup/helpers.d.ts +2 -2
  41. package/__internal__/src/components/CollapseGroup/helpers.js.map +1 -1
  42. package/__internal__/src/components/Combobox/helpers.d.ts +4 -4
  43. package/__internal__/src/components/Combobox/helpers.js.map +1 -1
  44. package/__internal__/src/components/ComboboxDeprecated/helpers.d.ts +4 -4
  45. package/__internal__/src/components/ComboboxDeprecated/helpers.js.map +1 -1
  46. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
  47. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.d.ts +1 -1
  48. package/__internal__/src/components/ContextMenu/types.d.ts +4 -4
  49. package/__internal__/src/components/ContextMenu/types.js.map +1 -1
  50. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.d.ts +1 -1
  51. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.js.map +1 -1
  52. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +1 -1
  53. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +1 -1
  54. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +1 -1
  55. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -1
  56. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +1 -1
  57. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +1 -1
  58. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +1 -1
  59. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +1 -1
  60. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +1 -1
  61. package/__internal__/src/components/DatePicker/types.d.ts +2 -2
  62. package/__internal__/src/components/DatePicker/types.js.map +1 -1
  63. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.d.ts +1 -1
  64. package/__internal__/src/components/DateTime/DateTimeItem/DateTimeItem.d.ts +1 -1
  65. package/__internal__/src/components/DateTime/helpers/types.d.ts +2 -2
  66. package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
  67. package/__internal__/src/components/EventInterceptor/EventInterceptor.d.ts +1 -1
  68. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.d.ts +1 -1
  69. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.js.map +1 -1
  70. package/__internal__/src/components/FieldComponents/FieldButton/FieldButton.d.ts +1 -1
  71. package/__internal__/src/components/FieldComponents/FieldClearButton/FieldClearButton.d.ts +1 -1
  72. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.d.ts +1 -1
  73. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.d.ts +1 -1
  74. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
  75. package/__internal__/src/components/FieldComponents/FieldControlLayout/types.d.ts +2 -2
  76. package/__internal__/src/components/FieldComponents/FieldControlLayout/types.js.map +1 -1
  77. package/__internal__/src/components/FieldComponents/FieldCounter/FieldCounter.d.ts +1 -1
  78. package/__internal__/src/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
  79. package/__internal__/src/components/FieldComponents/FieldToggleVisiblePasswordButton/FieldToggleVisiblePasswordButton.d.ts +1 -1
  80. package/__internal__/src/components/FieldComponents/FieldWrapper/helpers.js +1 -1
  81. package/__internal__/src/components/FieldComponents/FieldWrapper/helpers.js.map +1 -1
  82. package/__internal__/src/components/FieldComponents/renderSide.d.ts +1 -1
  83. package/__internal__/src/components/Grid/helpers.d.ts +1 -1
  84. package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.d.ts +1 -1
  85. package/__internal__/src/components/ListCanary/ListBox/ListBox.d.ts +1 -1
  86. package/__internal__/src/components/ListCanary/ListDivider/ListDivider.d.ts +1 -1
  87. package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.d.ts +1 -1
  88. package/__internal__/src/components/ListCanary/ListLoader/ListLoader.d.ts +1 -1
  89. package/__internal__/src/components/ListCanary/types.d.ts +3 -3
  90. package/__internal__/src/components/ListCanary/types.js.map +1 -1
  91. package/__internal__/src/components/Modal/Modal.js.map +1 -1
  92. package/__internal__/src/components/Pagination/PaginationArrow/PaginationArrow.d.ts +1 -1
  93. package/__internal__/src/components/Pagination/types.d.ts +3 -3
  94. package/__internal__/src/components/Pagination/types.js.map +1 -1
  95. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.d.ts +1 -1
  96. package/__internal__/src/components/PaginationDeprecated/PaginationDeprecated.js.map +1 -1
  97. package/__internal__/src/components/Picture/Picture.d.ts +1 -1
  98. package/__internal__/src/components/Popover/Popover.d.ts +1 -1
  99. package/__internal__/src/components/Popover/Popover.js.map +1 -1
  100. package/__internal__/src/components/ProgressLine/helpers.d.ts +66 -56
  101. package/__internal__/src/components/ProgressLine/types.d.ts +1 -1
  102. package/__internal__/src/components/ProgressLine/types.js.map +1 -1
  103. package/__internal__/src/components/ProgressStepBar/ProgressStepBarLine/ProgressStepBarLine.d.ts +1 -1
  104. package/__internal__/src/components/ProgressStepBar/helpers.d.ts +3 -3
  105. package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
  106. package/__internal__/src/components/RadioGroup/helper.d.ts +66 -56
  107. package/__internal__/src/components/RadioGroup/types.d.ts +1 -1
  108. package/__internal__/src/components/RadioGroup/types.js.map +1 -1
  109. package/__internal__/src/components/Select/helpers.d.ts +4 -4
  110. package/__internal__/src/components/Select/helpers.js.map +1 -1
  111. package/__internal__/src/components/SelectCanary/SelectControlLayout/SelectControlLayout.d.ts +1 -1
  112. package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.d.ts +1 -1
  113. package/__internal__/src/components/SelectCanary/SelectCreateButton/SelectCreateButton.js.map +1 -1
  114. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.d.ts +1 -1
  115. package/__internal__/src/components/SelectCanary/SelectDropdown/SelectDropdown.js.map +1 -1
  116. package/__internal__/src/components/SelectCanary/SelectInput/SelectInput.d.ts +1 -1
  117. package/__internal__/src/components/SelectCanary/SelectLoader/SelectLoader.d.ts +1 -1
  118. package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.d.ts +2 -2
  119. package/__internal__/src/components/SelectCanary/SelectMultipleValue/SelectMultipleValue.js.map +1 -1
  120. package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.d.ts +1 -1
  121. package/__internal__/src/components/SelectCanary/SelectRenderItem/SelectRenderItem.js.map +1 -1
  122. package/__internal__/src/components/SelectCanary/helpers.d.ts +1 -1
  123. package/__internal__/src/components/SelectCanary/types.d.ts +1 -1
  124. package/__internal__/src/components/SelectCanary/types.js.map +1 -1
  125. package/__internal__/src/components/SelectComponents/SelectContainer/SelectContainer.d.ts +1 -1
  126. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +2 -2
  127. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
  128. package/__internal__/src/components/SelectComponents/SelectLoader/SelectLoader.d.ts +1 -1
  129. package/__internal__/src/components/SelectComponentsDeprecated/SelectContainer/SelectContainer.d.ts +1 -1
  130. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +2 -2
  131. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
  132. package/__internal__/src/components/SelectComponentsDeprecated/SelectItemAll/SelectSelectAll.d.ts +1 -1
  133. package/__internal__/src/components/SelectComponentsDeprecated/SelectLoader/SelectLoader.d.ts +1 -1
  134. package/__internal__/src/components/SelectDeprecated/helpers.d.ts +4 -4
  135. package/__internal__/src/components/SelectDeprecated/helpers.js.map +1 -1
  136. package/__internal__/src/components/Sidebar/Sidebar.js.map +1 -1
  137. package/__internal__/src/components/Skeleton/SkeletonBrick/SkeletonBrick.d.ts +1 -1
  138. package/__internal__/src/components/Skeleton/SkeletonCircle/SkeletonCircle.d.ts +1 -1
  139. package/__internal__/src/components/Slider/SliderInput/SliderInput.d.ts +1 -1
  140. package/__internal__/src/components/Slider/SliderLine/SliderLine.d.ts +1 -1
  141. package/__internal__/src/components/Slider/SliderPoint/SliderPoint.d.ts +1 -1
  142. package/__internal__/src/components/Slider/helper.d.ts +1 -1
  143. package/__internal__/src/components/Slider/helper.js.map +1 -1
  144. package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +1 -1
  145. package/__internal__/src/components/SnackBar/helper.d.ts +67 -57
  146. package/__internal__/src/components/SnackBar/types.d.ts +2 -2
  147. package/__internal__/src/components/SnackBar/types.js.map +1 -1
  148. package/__internal__/src/components/Steps/helper.d.ts +66 -56
  149. package/__internal__/src/components/Steps/types.d.ts +1 -1
  150. package/__internal__/src/components/Steps/types.js.map +1 -1
  151. package/__internal__/src/components/StepsCanary/helper.d.ts +66 -56
  152. package/__internal__/src/components/StepsCanary/types.d.ts +1 -1
  153. package/__internal__/src/components/StepsCanary/types.js.map +1 -1
  154. package/__internal__/src/components/Switch/Switch.d.ts +2 -1
  155. package/__internal__/src/components/Switch/Switch.js +1 -1
  156. package/__internal__/src/components/Switch/Switch.js.map +1 -1
  157. package/__internal__/src/components/Switch/types.d.ts +1 -0
  158. package/__internal__/src/components/Switch/types.js.map +1 -1
  159. package/__internal__/src/components/SwitchGroup/helpers.d.ts +66 -56
  160. package/__internal__/src/components/SwitchGroup/types.d.ts +1 -1
  161. package/__internal__/src/components/SwitchGroup/types.js.map +1 -1
  162. package/__internal__/src/components/Table/Cell/TableCell.d.ts +1 -1
  163. package/__internal__/src/components/Table/Cell/TableCell.js.map +1 -1
  164. package/__internal__/src/components/Table/Header/TableHeader.d.ts +1 -1
  165. package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
  166. package/__internal__/src/components/Table/Resizer/TableResizer.d.ts +1 -1
  167. package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
  168. package/__internal__/src/components/Table/Table.d.ts +1 -1
  169. package/__internal__/src/components/Table/Table.js.map +1 -1
  170. package/__internal__/src/components/Table/__mock__/data.mock.d.ts +1 -1
  171. package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
  172. package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.d.ts +1 -1
  173. package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.js.map +1 -1
  174. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.d.ts +1 -1
  175. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.js.map +1 -1
  176. package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.d.ts +1 -1
  177. package/__internal__/src/components/Tabs/helpers.d.ts +199 -169
  178. package/__internal__/src/components/Tabs/types.d.ts +4 -4
  179. package/__internal__/src/components/Tabs/types.js.map +1 -1
  180. package/__internal__/src/components/Tag/Tag.d.ts +1 -1
  181. package/__internal__/src/components/Tag/Tag.js.map +1 -1
  182. package/__internal__/src/components/TagBase/TagBase.d.ts +1 -1
  183. package/__internal__/src/components/TextField/TextField.d.ts +1 -1
  184. package/__internal__/src/components/TextField/types.d.ts +1 -1
  185. package/__internal__/src/components/TextField/types.js.map +1 -1
  186. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js +1 -1
  187. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js.map +1 -1
  188. package/__internal__/src/components/TextFieldCanary/types.d.ts +2 -2
  189. package/__internal__/src/components/TextFieldCanary/types.js.map +1 -1
  190. package/__internal__/src/components/ThemeToggler/ThemeToggler.js +1 -1
  191. package/__internal__/src/components/ThemeToggler/ThemeToggler.js.map +1 -1
  192. package/__internal__/src/components/ThemeToggler/helpers.d.ts +66 -56
  193. package/__internal__/src/components/ThemeToggler/types.d.ts +1 -1
  194. package/__internal__/src/components/ThemeToggler/types.js.map +1 -1
  195. package/__internal__/src/components/Timer/Timer.d.ts +1 -1
  196. package/__internal__/src/components/Tooltip/Tooltip.d.ts +1 -1
  197. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +1 -1
  198. package/__internal__/src/components/UserSelect/helpers.d.ts +4 -4
  199. package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
  200. package/__internal__/src/components/UserSelectDeprecated/helpers.d.ts +4 -4
  201. package/__internal__/src/components/UserSelectDeprecated/helpers.js.map +1 -1
  202. package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_m.d.ts +1 -1
  203. package/__internal__/src/fileIcons/FileIconAvi/FileIconAvi_size_s.d.ts +1 -1
  204. package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_m.d.ts +1 -1
  205. package/__internal__/src/fileIcons/FileIconBmp/FileIconBmp_size_s.d.ts +1 -1
  206. package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_m.d.ts +1 -1
  207. package/__internal__/src/fileIcons/FileIconCsv/FileIconCsv_size_s.d.ts +1 -1
  208. package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_m.d.ts +1 -1
  209. package/__internal__/src/fileIcons/FileIconDoc/FileIconDoc_size_s.d.ts +1 -1
  210. package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_m.d.ts +1 -1
  211. package/__internal__/src/fileIcons/FileIconExe/FileIconExe_size_s.d.ts +1 -1
  212. package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_m.d.ts +1 -1
  213. package/__internal__/src/fileIcons/FileIconGif/FileIconGif_size_s.d.ts +1 -1
  214. package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_m.d.ts +1 -1
  215. package/__internal__/src/fileIcons/FileIconJpg/FileIconJpg_size_s.d.ts +1 -1
  216. package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_m.d.ts +1 -1
  217. package/__internal__/src/fileIcons/FileIconJson/FileIconJson_size_s.d.ts +1 -1
  218. package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_m.d.ts +1 -1
  219. package/__internal__/src/fileIcons/FileIconLoading/FileIconLoading_size_s.d.ts +1 -1
  220. package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_m.d.ts +1 -1
  221. package/__internal__/src/fileIcons/FileIconMov/FileIconMov_size_s.d.ts +1 -1
  222. package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_m.d.ts +1 -1
  223. package/__internal__/src/fileIcons/FileIconMp3/FileIconMp3_size_s.d.ts +1 -1
  224. package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_m.d.ts +1 -1
  225. package/__internal__/src/fileIcons/FileIconMp4/FileIconMp4_size_s.d.ts +1 -1
  226. package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_m.d.ts +1 -1
  227. package/__internal__/src/fileIcons/FileIconMsg/FileIconMsg_size_s.d.ts +1 -1
  228. package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_m.d.ts +1 -1
  229. package/__internal__/src/fileIcons/FileIconPdf/FileIconPdf_size_s.d.ts +1 -1
  230. package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_m.d.ts +1 -1
  231. package/__internal__/src/fileIcons/FileIconPng/FileIconPng_size_s.d.ts +1 -1
  232. package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_m.d.ts +1 -1
  233. package/__internal__/src/fileIcons/FileIconPpt/FileIconPpt_size_s.d.ts +1 -1
  234. package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_m.d.ts +1 -1
  235. package/__internal__/src/fileIcons/FileIconRar/FileIconRar_size_s.d.ts +1 -1
  236. package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_m.d.ts +1 -1
  237. package/__internal__/src/fileIcons/FileIconRtf/FileIconRtf_size_s.d.ts +1 -1
  238. package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_m.d.ts +1 -1
  239. package/__internal__/src/fileIcons/FileIconSvg/FileIconSvg_size_s.d.ts +1 -1
  240. package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_m.d.ts +1 -1
  241. package/__internal__/src/fileIcons/FileIconTiff/FileIconTiff_size_s.d.ts +1 -1
  242. package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_m.d.ts +1 -1
  243. package/__internal__/src/fileIcons/FileIconTxt/FileIconTxt_size_s.d.ts +1 -1
  244. package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_m.d.ts +1 -1
  245. package/__internal__/src/fileIcons/FileIconUndefined/FileIconUndefined_size_s.d.ts +1 -1
  246. package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_m.d.ts +1 -1
  247. package/__internal__/src/fileIcons/FileIconVsd/FileIconVsd_size_s.d.ts +1 -1
  248. package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_m.d.ts +1 -1
  249. package/__internal__/src/fileIcons/FileIconWav/FileIconWav_size_s.d.ts +1 -1
  250. package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_m.d.ts +1 -1
  251. package/__internal__/src/fileIcons/FileIconXls/FileIconXls_size_s.d.ts +1 -1
  252. package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_m.d.ts +1 -1
  253. package/__internal__/src/fileIcons/FileIconZip/FileIconZip_size_s.d.ts +1 -1
  254. package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
  255. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  256. package/__internal__/src/hooks/useForkRef/useForkRef.d.ts +1 -1
  257. package/__internal__/src/responsesImages/ResponsesImage403/ResponsesImage403Svg.d.ts +1 -1
  258. package/__internal__/src/responsesImages/ResponsesImage404/ResponsesImage404Svg.d.ts +1 -1
  259. package/__internal__/src/responsesImages/ResponsesImage500/ResponsesImage500Svg.d.ts +1 -1
  260. package/__internal__/src/responsesImages/ResponsesImage503/ResponsesImage503Svg.d.ts +1 -1
  261. package/__internal__/src/responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionErrorSvg.d.ts +1 -1
  262. package/__internal__/src/responsesImages/ResponsesImageDeleted/ResponsesImageDeletedSvg.d.ts +1 -1
  263. package/__internal__/src/responsesImages/ResponsesImageEmptyBox/ResponsesImageEmptyBoxSvg.d.ts +1 -1
  264. package/__internal__/src/responsesImages/ResponsesImageEmptyPockets/ResponsesImageEmptyPocketsSvg.d.ts +1 -1
  265. package/__internal__/src/responsesImages/ResponsesImageExit/ResponsesImageExitSvg.d.ts +1 -1
  266. package/__internal__/src/responsesImages/ResponsesImageNothingFound/ResponsesImageNothingFoundSvg.d.ts +1 -1
  267. package/__internal__/src/responsesImages/ResponsesImageSuccess/ResponsesImageSuccessSvg.d.ts +1 -1
  268. package/__internal__/src/uiKit/components/Image/Image.d.ts +1 -1
  269. package/__internal__/src/utils/state/withCtx/withCtx.js.map +1 -1
  270. package/__internal__/src/utils/types/PropsWithAsAttributes.d.ts +2 -2
  271. package/__internal__/src/utils/types/PropsWithAsAttributes.js.map +1 -1
  272. package/package.json +1 -1
@@ -2,4 +2,4 @@ import './ListDivider.css';
2
2
  import React from 'react';
3
3
  import { ListDividerProps } from '../types';
4
4
  export declare const cnListDivider: import("@bem-react/classname").ClassNameFormatter;
5
- export declare const ListDivider: React.ForwardRefExoticComponent<Pick<ListDividerProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "key" | "space" | "innerOffset"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const ListDivider: React.ForwardRefExoticComponent<Omit<ListDividerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -2,4 +2,4 @@ import './ListGroupLabel.css';
2
2
  import React from 'react';
3
3
  import { ListGroupLabelProps } from '../types';
4
4
  export declare const cnListGroupLabel: import("@bem-react/classname").ClassNameFormatter;
5
- export declare const ListGroupLabel: React.ForwardRefExoticComponent<Pick<ListGroupLabelProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "label" | "key" | "rightSide" | "space" | "innerOffset"> & React.RefAttributes<HTMLDivElement>>;
5
+ export declare const ListGroupLabel: React.ForwardRefExoticComponent<Omit<ListGroupLabelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -7,5 +7,5 @@ type Props = PropsWithHTMLAttributesAndRef<{
7
7
  size?: ListPropSize;
8
8
  innerOffset?: ListPropInnerOffset;
9
9
  }, HTMLDivElement>;
10
- export declare const ListLoader: React.ForwardRefExoticComponent<Pick<Props, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "key" | "innerOffset"> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const ListLoader: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
11
  export {};
@@ -38,7 +38,7 @@ export type ListPropOnItemClick<ITEM> = (item: ITEM, params: {
38
38
  e: React.MouseEvent;
39
39
  item: ITEM;
40
40
  }) => void;
41
- export type ListPropRenderItem<ITEM> = (item: ITEM) => React.ReactElement | null;
41
+ export type ListPropRenderItem<ITEM> = (item: ITEM) => React.ReactNode | null;
42
42
  export type ListPropGetItemLabel<ITEM> = (item: ITEM) => React.ReactNode;
43
43
  export type ListPropGetItemAdditionalClassName<ITEM> = (item: ITEM) => string;
44
44
  export type ListPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
@@ -99,14 +99,14 @@ export type ListProps<ITEM = DefaultListItem, GROUP = DefaultListGroup> = {
99
99
  } ? {} : {
100
100
  getGroupKey: ListPropGetGroupKey<GROUP>;
101
101
  });
102
- export type ListComponent = <ITEM = DefaultListItem, GROUP = DefaultListGroup>(props: ListProps<ITEM, GROUP>) => React.ReactElement | null;
102
+ export type ListComponent = <ITEM = DefaultListItem, GROUP = DefaultListGroup>(props: ListProps<ITEM, GROUP>) => React.ReactNode | null;
103
103
  export type ListItemProps<AS extends AsTags = 'div'> = PropsWithAsAttributes<Omit<DefaultListItem, 'id' | 'groupId' | 'attributes' | 'onClick'> & {
104
104
  size?: ListPropSize;
105
105
  innerOffset?: 'normal' | 'increased';
106
106
  space?: MixSpaceProps;
107
107
  iconSize?: IconPropSize;
108
108
  }, AS>;
109
- export type ListItemComponent = <AS extends AsTags = 'div'>(props: ListItemProps<AS>) => React.ReactElement | null;
109
+ export type ListItemComponent = <AS extends AsTags = 'div'>(props: ListItemProps<AS>) => React.ReactNode | null;
110
110
  export type ListGroupLabelProps = PropsWithHTMLAttributesAndRef<{
111
111
  size?: ListPropSize;
112
112
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["listPropSize","defaultListPropSize","listPropInnerOffset","defaultListPropInnerOffset","listPropStatus","listPropForm","defaultListPropForm"],"sources":["../../../../../src/components/ListCanary/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { MixSpaceProps } from '##/mixs/MixSpace';\nimport { Group } from '##/utils/getGroups';\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const listPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ListPropSize = typeof listPropSize[number];\nexport const defaultListPropSize = listPropSize[0];\n\nexport const listPropInnerOffset = ['normal', 'increased'] as const;\nexport type ListPropInnerOffset = typeof listPropInnerOffset[number];\nexport const defaultListPropInnerOffset = listPropInnerOffset[0];\n\nexport const listPropStatus = ['alert', 'success', 'warning'] as const;\nexport type ListPropStatus = typeof listPropStatus[number];\n\nexport const listPropForm = ['default', 'brick', 'round'] as const;\nexport type ListPropForm = typeof listPropForm[number];\nexport const defaultListPropForm = listPropForm[0];\n\nexport type DefaultListGroup = {\n id: string | number;\n label?: string;\n rightSide?: React.ReactNode;\n};\n\nexport type DefaultListItem = {\n label: React.ReactNode;\n disabled?: boolean;\n active?: boolean;\n checked?: boolean;\n status?: ListPropStatus;\n groupId?: string | number;\n leftSide?: React.ReactNode;\n leftIcon?: IconComponent;\n rightSide?: React.ReactNode;\n rightIcon?: IconComponent;\n onClick?: React.MouseEventHandler;\n};\n\nexport type ListPropOnItemClick<ITEM> = (\n item: ITEM,\n params: {\n e: React.MouseEvent;\n item: ITEM;\n },\n) => void;\n\nexport type ListPropRenderItem<ITEM> = (\n item: ITEM,\n) => React.ReactElement | null;\n\n// ITEMS\n\nexport type ListPropGetItemLabel<ITEM> = (item: ITEM) => React.ReactNode;\n\nexport type ListPropGetItemAdditionalClassName<ITEM> = (item: ITEM) => string;\n\nexport type ListPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemChecked<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ListPropStatus | undefined;\n\nexport type ListPropGetItemGroupId<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\n\nexport type ListPropGetItemLeftSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemLeftIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type ListPropGetItemRightSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type ListPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\n\nexport type ListPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type ListPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.MouseEventHandler | undefined;\n\nexport type ListPropSortGroup<ITEM, GROUP> = (\n a: Group<ITEM, GROUP>,\n b: Group<ITEM, GROUP>,\n) => number;\n\n// GROUPS\nexport type ListPropGetGroupKey<GROUP> = (item: GROUP) => string | number;\nexport type ListPropGetGroupAdditionalClassName<GROUP> = (\n item: GROUP,\n) => string;\n\nexport type ListPropGetGroupLabel<GROUP> = (item: GROUP) => string | undefined;\nexport type ListPropGetGroupRightSide<GROUP> = (\n item: GROUP,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type ListProps<ITEM = DefaultListItem, GROUP = DefaultListGroup> = {\n size?: ListPropSize;\n items: ITEM[];\n innerOffset?: ListPropInnerOffset;\n itemSpace?: MixSpaceProps;\n groupLabelSpace?: MixSpaceProps;\n dividerSpace?: MixSpaceProps;\n onItemClick?: ListPropOnItemClick<ITEM>;\n getItemLabel?: ListPropGetItemLabel<ITEM>;\n getItemDisabled?: ListPropGetItemDisabled<ITEM>;\n getItemActive?: ListPropGetItemActive<ITEM>;\n getItemChecked?: ListPropGetItemActive<ITEM>;\n getItemLeftSide?: ListPropGetItemLeftSide<ITEM>;\n getItemLeftIcon?: ListPropGetItemLeftIcon<ITEM>;\n getItemRightSide?: ListPropGetItemRightSide<ITEM>;\n getItemRightIcon?: ListPropGetItemRightIcon<ITEM>;\n getItemGroupKey?: ListPropGetItemGroupId<ITEM>;\n getItemOnClick?: ListPropGetItemOnClick<ITEM>;\n getItemStatus?: ListPropGetItemStatus<ITEM>;\n getItemAs?: ListPropGetItemAs<ITEM>;\n getItemAttributes?: ListPropGetItemAttributes<ITEM>;\n getItemRef?: ListPropGetItemRef<ITEM>;\n getItemAdditionalClassName?: ListPropGetItemAdditionalClassName<ITEM>;\n renderItem?: ListPropRenderItem<ITEM>;\n groups?: GROUP[];\n getGroupKey?: ListPropGetGroupKey<GROUP>;\n getGroupLabel?: ListPropGetGroupLabel<GROUP>;\n getGroupRightSide?: ListPropGetGroupRightSide<GROUP>;\n sortGroup?: ListPropSortGroup<ITEM, GROUP>;\n getGroupAdditionalClassName?: ListPropGetGroupAdditionalClassName<GROUP>;\n disabled?: boolean;\n} & (ITEM extends { label: DefaultListItem['label'] }\n ? {}\n : { getItemLabel: ListPropGetItemLabel<ITEM> }) &\n (GROUP extends { id: DefaultListGroup['id'] }\n ? {}\n : { getGroupKey: ListPropGetGroupKey<GROUP> });\n\nexport type ListComponent = <ITEM = DefaultListItem, GROUP = DefaultListGroup>(\n props: ListProps<ITEM, GROUP>,\n) => React.ReactElement | null;\n\nexport type ListItemProps<AS extends AsTags = 'div'> = PropsWithAsAttributes<\n Omit<DefaultListItem, 'id' | 'groupId' | 'attributes' | 'onClick'> & {\n size?: ListPropSize;\n innerOffset?: 'normal' | 'increased';\n space?: MixSpaceProps;\n iconSize?: IconPropSize;\n },\n AS\n>;\n\nexport type ListItemComponent = <AS extends AsTags = 'div'>(\n props: ListItemProps<AS>,\n) => React.ReactElement | null;\n\nexport type ListGroupLabelProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n label: string;\n innerOffset?: ListPropInnerOffset;\n rightSide?: React.ReactNode;\n space?: MixSpaceProps;\n },\n HTMLDivElement\n>;\n\nexport type ListDividerProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n innerOffset?: ListPropInnerOffset;\n space?: MixSpaceProps;\n },\n HTMLDivElement\n>;\n\nexport type ListBoxProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n form?: ListPropForm;\n border?: boolean;\n shadow?: boolean;\n },\n HTMLDivElement\n>;\n\nexport type ListAddItemProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n label: React.ReactNode;\n innerOffset?: ListPropInnerOffset;\n active?: boolean;\n underLine?: boolean;\n },\n HTMLDivElement\n>;\n"],"mappings":"AASA,MAAO,IAAMA,aAAY,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAArB,CAEP,MAAO,IAAMC,oBAAmB,CAAGD,YAAY,CAAC,CAAD,CAAxC,CAEP,MAAO,IAAME,oBAAmB,CAAG,CAAC,QAAD,CAAW,WAAX,CAA5B,CAEP,MAAO,IAAMC,2BAA0B,CAAGD,mBAAmB,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAAvB,CAGP,MAAO,IAAMC,aAAY,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAArB,CAEP,MAAO,IAAMC,oBAAmB,CAAGD,YAAY,CAAC,CAAD,CAAxC"}
1
+ {"version":3,"file":"types.js","names":["listPropSize","defaultListPropSize","listPropInnerOffset","defaultListPropInnerOffset","listPropStatus","listPropForm","defaultListPropForm"],"sources":["../../../../../src/components/ListCanary/types.ts"],"sourcesContent":["import { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { MixSpaceProps } from '##/mixs/MixSpace';\nimport { Group } from '##/utils/getGroups';\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const listPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ListPropSize = typeof listPropSize[number];\nexport const defaultListPropSize = listPropSize[0];\n\nexport const listPropInnerOffset = ['normal', 'increased'] as const;\nexport type ListPropInnerOffset = typeof listPropInnerOffset[number];\nexport const defaultListPropInnerOffset = listPropInnerOffset[0];\n\nexport const listPropStatus = ['alert', 'success', 'warning'] as const;\nexport type ListPropStatus = typeof listPropStatus[number];\n\nexport const listPropForm = ['default', 'brick', 'round'] as const;\nexport type ListPropForm = typeof listPropForm[number];\nexport const defaultListPropForm = listPropForm[0];\n\nexport type DefaultListGroup = {\n id: string | number;\n label?: string;\n rightSide?: React.ReactNode;\n};\n\nexport type DefaultListItem = {\n label: React.ReactNode;\n disabled?: boolean;\n active?: boolean;\n checked?: boolean;\n status?: ListPropStatus;\n groupId?: string | number;\n leftSide?: React.ReactNode;\n leftIcon?: IconComponent;\n rightSide?: React.ReactNode;\n rightIcon?: IconComponent;\n onClick?: React.MouseEventHandler;\n};\n\nexport type ListPropOnItemClick<ITEM> = (\n item: ITEM,\n params: {\n e: React.MouseEvent;\n item: ITEM;\n },\n) => void;\n\nexport type ListPropRenderItem<ITEM> = (item: ITEM) => React.ReactNode | null;\n\n// ITEMS\n\nexport type ListPropGetItemLabel<ITEM> = (item: ITEM) => React.ReactNode;\n\nexport type ListPropGetItemAdditionalClassName<ITEM> = (item: ITEM) => string;\n\nexport type ListPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemChecked<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type ListPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => ListPropStatus | undefined;\n\nexport type ListPropGetItemGroupId<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\n\nexport type ListPropGetItemLeftSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemLeftIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type ListPropGetItemRightSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type ListPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\n\nexport type ListPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type ListPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.MouseEventHandler | undefined;\n\nexport type ListPropSortGroup<ITEM, GROUP> = (\n a: Group<ITEM, GROUP>,\n b: Group<ITEM, GROUP>,\n) => number;\n\n// GROUPS\nexport type ListPropGetGroupKey<GROUP> = (item: GROUP) => string | number;\nexport type ListPropGetGroupAdditionalClassName<GROUP> = (\n item: GROUP,\n) => string;\n\nexport type ListPropGetGroupLabel<GROUP> = (item: GROUP) => string | undefined;\nexport type ListPropGetGroupRightSide<GROUP> = (\n item: GROUP,\n) => React.ReactNode | undefined;\n\nexport type ListPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type ListProps<ITEM = DefaultListItem, GROUP = DefaultListGroup> = {\n size?: ListPropSize;\n items: ITEM[];\n innerOffset?: ListPropInnerOffset;\n itemSpace?: MixSpaceProps;\n groupLabelSpace?: MixSpaceProps;\n dividerSpace?: MixSpaceProps;\n onItemClick?: ListPropOnItemClick<ITEM>;\n getItemLabel?: ListPropGetItemLabel<ITEM>;\n getItemDisabled?: ListPropGetItemDisabled<ITEM>;\n getItemActive?: ListPropGetItemActive<ITEM>;\n getItemChecked?: ListPropGetItemActive<ITEM>;\n getItemLeftSide?: ListPropGetItemLeftSide<ITEM>;\n getItemLeftIcon?: ListPropGetItemLeftIcon<ITEM>;\n getItemRightSide?: ListPropGetItemRightSide<ITEM>;\n getItemRightIcon?: ListPropGetItemRightIcon<ITEM>;\n getItemGroupKey?: ListPropGetItemGroupId<ITEM>;\n getItemOnClick?: ListPropGetItemOnClick<ITEM>;\n getItemStatus?: ListPropGetItemStatus<ITEM>;\n getItemAs?: ListPropGetItemAs<ITEM>;\n getItemAttributes?: ListPropGetItemAttributes<ITEM>;\n getItemRef?: ListPropGetItemRef<ITEM>;\n getItemAdditionalClassName?: ListPropGetItemAdditionalClassName<ITEM>;\n renderItem?: ListPropRenderItem<ITEM>;\n groups?: GROUP[];\n getGroupKey?: ListPropGetGroupKey<GROUP>;\n getGroupLabel?: ListPropGetGroupLabel<GROUP>;\n getGroupRightSide?: ListPropGetGroupRightSide<GROUP>;\n sortGroup?: ListPropSortGroup<ITEM, GROUP>;\n getGroupAdditionalClassName?: ListPropGetGroupAdditionalClassName<GROUP>;\n disabled?: boolean;\n} & (ITEM extends { label: DefaultListItem['label'] }\n ? {}\n : { getItemLabel: ListPropGetItemLabel<ITEM> }) &\n (GROUP extends { id: DefaultListGroup['id'] }\n ? {}\n : { getGroupKey: ListPropGetGroupKey<GROUP> });\n\nexport type ListComponent = <ITEM = DefaultListItem, GROUP = DefaultListGroup>(\n props: ListProps<ITEM, GROUP>,\n) => React.ReactNode | null;\n\nexport type ListItemProps<AS extends AsTags = 'div'> = PropsWithAsAttributes<\n Omit<DefaultListItem, 'id' | 'groupId' | 'attributes' | 'onClick'> & {\n size?: ListPropSize;\n innerOffset?: 'normal' | 'increased';\n space?: MixSpaceProps;\n iconSize?: IconPropSize;\n },\n AS\n>;\n\nexport type ListItemComponent = <AS extends AsTags = 'div'>(\n props: ListItemProps<AS>,\n) => React.ReactNode | null;\n\nexport type ListGroupLabelProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n label: string;\n innerOffset?: ListPropInnerOffset;\n rightSide?: React.ReactNode;\n space?: MixSpaceProps;\n },\n HTMLDivElement\n>;\n\nexport type ListDividerProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n innerOffset?: ListPropInnerOffset;\n space?: MixSpaceProps;\n },\n HTMLDivElement\n>;\n\nexport type ListBoxProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n form?: ListPropForm;\n border?: boolean;\n shadow?: boolean;\n },\n HTMLDivElement\n>;\n\nexport type ListAddItemProps = PropsWithHTMLAttributesAndRef<\n {\n size?: ListPropSize;\n label: React.ReactNode;\n innerOffset?: ListPropInnerOffset;\n active?: boolean;\n underLine?: boolean;\n },\n HTMLDivElement\n>;\n"],"mappings":"AASA,MAAO,IAAMA,aAAY,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAArB,CAEP,MAAO,IAAMC,oBAAmB,CAAGD,YAAY,CAAC,CAAD,CAAxC,CAEP,MAAO,IAAME,oBAAmB,CAAG,CAAC,QAAD,CAAW,WAAX,CAA5B,CAEP,MAAO,IAAMC,2BAA0B,CAAGD,mBAAmB,CAAC,CAAD,CAAtD,CAEP,MAAO,IAAME,eAAc,CAAG,CAAC,OAAD,CAAU,SAAV,CAAqB,SAArB,CAAvB,CAGP,MAAO,IAAMC,aAAY,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAArB,CAEP,MAAO,IAAMC,oBAAmB,CAAGD,YAAY,CAAC,CAAD,CAAxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","names":["React","useEffect","useRef","Transition","PortalWithTheme","usePortalContext","useTheme","useClickOutside","useGlobalKeys","animateTimeout","cnMixPopoverAnimate","cnMixScrollBar","cn","modalPropWidth","modalPropWidthDefault","modalPropPosition","modalPropPositionDefault","cnModal","ContextConsumer","onClickOutside","children","ignoreClicksInsideRefs","refs","isActive","handler","Modal","props","isOpen","onClose","onOpen","hasOverlay","onOverlayClick","onEsc","className","width","position","container","window","document","body","refsForExcludeClickOutside","rootClassName","afterClose","style","otherProps","ref","portalRef","theme","Escape","e","animate","zIndex"],"sources":["../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import './Modal.css';\n\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\n\nimport {\n PortalWithTheme,\n usePortalContext,\n} from '##/components/PortalWithTheme';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { useClickOutside } from '##/hooks/useClickOutside';\nimport { useGlobalKeys } from '##/hooks/useGlobalKeys';\nimport { animateTimeout, cnMixPopoverAnimate } from '##/mixs/MixPopoverAnimate';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nconst modalPropWidth = ['auto'] as const;\ntype ModalPropWidth = typeof modalPropWidth[number];\nconst modalPropWidthDefault: ModalPropWidth = modalPropWidth[0];\n\nconst modalPropPosition = ['center', 'top'] as const;\ntype ModalPropPosition = typeof modalPropPosition[number];\nconst modalPropPositionDefault: ModalPropPosition = modalPropPosition[0];\n\ntype ModalProps = PropsWithHTMLAttributes<\n {\n isOpen?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n hasOverlay?: boolean;\n /** @deprecated use onClickOutside */\n onOverlayClick?: (event: MouseEvent) => void;\n onClickOutside?: (event: MouseEvent) => void;\n onEsc?: (event: KeyboardEvent) => void;\n rootClassName?: string;\n width?: ModalPropWidth;\n position?: ModalPropPosition;\n children?: React.ReactNode;\n container?: HTMLDivElement | undefined;\n afterClose?: () => void;\n refsForExcludeClickOutside?: React.RefObject<HTMLElement>[];\n },\n HTMLDivElement\n>;\n\nconst cnModal = cn('Modal');\n\n/**\n * Подписчик на PortalWithThemeProvider\n * получает рефы всех вложенных порталов во всплывающем окне\n * для дальнейшего исключения их из useClickOutside\n */\nconst ContextConsumer: React.FC<{\n onClickOutside?: (event: MouseEvent) => void;\n ignoreClicksInsideRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n children: React.ReactNode;\n}> = ({ onClickOutside, children, ignoreClicksInsideRefs }) => {\n const { refs } = usePortalContext();\n\n useClickOutside({\n isActive: !!onClickOutside,\n ignoreClicksInsideRefs: [\n ...(ignoreClicksInsideRefs || []),\n ...(refs || []),\n ],\n handler: onClickOutside,\n });\n\n return children as React.ReactElement;\n};\n\nexport const Modal: React.FC<ModalProps> = (props) => {\n const {\n isOpen,\n onClose,\n onOpen,\n hasOverlay = true,\n onOverlayClick,\n onClickOutside,\n onEsc,\n className,\n width = modalPropWidthDefault,\n position = modalPropPositionDefault,\n children,\n container = window.document.body,\n refsForExcludeClickOutside,\n rootClassName,\n afterClose,\n style,\n ...otherProps\n } = props;\n\n const ref = useRef<HTMLDivElement | null>(null);\n const portalRef = useRef<HTMLDivElement | null>(null);\n const { theme } = useTheme();\n\n useEffect(() => {\n if (isOpen) {\n onOpen?.();\n } else {\n onClose?.();\n }\n }, [isOpen]);\n\n useGlobalKeys({\n Escape: (e: KeyboardEvent) => isOpen && onEsc && onEsc(e),\n });\n\n return (\n <Transition\n in={isOpen}\n unmountOnExit\n nodeRef={portalRef}\n timeout={animateTimeout}\n onExited={afterClose}\n >\n {(animate) => (\n <PortalWithTheme\n preset={theme}\n container={container}\n className={cnModal({ hasOverlay }, [rootClassName])}\n ref={portalRef}\n style={\n typeof style?.zIndex === 'number'\n ? { zIndex: style.zIndex }\n : undefined\n }\n >\n {hasOverlay && (\n <div\n className={cnModal('Overlay', { animate })}\n aria-label=\"Overlay\"\n />\n )}\n <div\n {...otherProps}\n style={{\n ...style,\n zIndex: undefined,\n }}\n className={cnModal('Window', { width, position }, [\n cnMixPopoverAnimate({ animate }),\n className,\n cnMixScrollBar(),\n ])}\n ref={ref}\n >\n <ContextConsumer\n onClickOutside={onClickOutside || onOverlayClick}\n ignoreClicksInsideRefs={[\n ...(refsForExcludeClickOutside || []),\n ref,\n ]}\n >\n {children}\n </ContextConsumer>\n </div>\n </PortalWithTheme>\n )}\n </Transition>\n );\n};\n"],"mappings":"8hCAAA,oBAEA,MAAOA,MAAP,EAAgBC,SAAhB,CAA2BC,MAA3B,KAAyC,OAAzC,CACA,OAASC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VA,CAAF,CAAD,CAAiB,CAACW,CAAD,CAAjB,CAHpB,CAIE,GAAG,CAAEK,CAJP,CAKE,KAAK,CACsB,QAAzB,gBAAOH,CAAP,WAAOA,CAAP,QAAOA,CAAK,CAAEQ,MAAd,EACI,CAAEA,MAAM,CAAER,CAAK,CAACQ,MAAhB,CADJ,OANJ,EAWGrB,CAAU,EACT,2BACE,SAAS,CAAEb,OAAO,CAAC,SAAD,CAAY,CAAEiC,OAAO,CAAPA,CAAF,CAAZ,CADpB,CAEE,aAAW,SAFb,EAZJ,CAiBE,2CACMN,CADN,EAEE,KAAK,gCACAD,CADA,MAEHQ,MAAM,OAFH,EAFP,CAME,SAAS,CAAElC,OAAO,CAAC,QAAD,CAAW,CAAEiB,KAAK,CAALA,CAAF,CAASC,QAAQ,CAARA,CAAT,CAAX,CAAgC,CAChDzB,mBAAmB,CAAC,CAAEwC,OAAO,CAAPA,CAAF,CAAD,CAD6B,CAEhDjB,CAFgD,CAGhDtB,cAAc,EAHkC,CAAhC,CANpB,CAWE,GAAG,CAAEkC,CAXP,GAaE,oBAAC,eAAD,EACE,cAAc,CAAE1B,CAAc,EAAIY,CADpC,CAEE,sBAAsB,8BAChBS,CAA0B,EAAI,EADd,GAEpBK,CAFoB,EAFxB,EAOGzB,CAPH,CAbF,CAjBF,CADD,CAPH,CAoDH,CA1FM"}
1
+ {"version":3,"file":"Modal.js","names":["React","useEffect","useRef","Transition","PortalWithTheme","usePortalContext","useTheme","useClickOutside","useGlobalKeys","animateTimeout","cnMixPopoverAnimate","cnMixScrollBar","cn","modalPropWidth","modalPropWidthDefault","modalPropPosition","modalPropPositionDefault","cnModal","ContextConsumer","onClickOutside","children","ignoreClicksInsideRefs","refs","isActive","handler","Modal","props","isOpen","onClose","onOpen","hasOverlay","onOverlayClick","onEsc","className","width","position","container","window","document","body","refsForExcludeClickOutside","rootClassName","afterClose","style","otherProps","ref","portalRef","theme","Escape","e","animate","zIndex"],"sources":["../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import './Modal.css';\n\nimport React, { useEffect, useRef } from 'react';\nimport { Transition } from 'react-transition-group';\n\nimport {\n PortalWithTheme,\n usePortalContext,\n} from '##/components/PortalWithTheme';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { useClickOutside } from '##/hooks/useClickOutside';\nimport { useGlobalKeys } from '##/hooks/useGlobalKeys';\nimport { animateTimeout, cnMixPopoverAnimate } from '##/mixs/MixPopoverAnimate';\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nconst modalPropWidth = ['auto'] as const;\ntype ModalPropWidth = typeof modalPropWidth[number];\nconst modalPropWidthDefault: ModalPropWidth = modalPropWidth[0];\n\nconst modalPropPosition = ['center', 'top'] as const;\ntype ModalPropPosition = typeof modalPropPosition[number];\nconst modalPropPositionDefault: ModalPropPosition = modalPropPosition[0];\n\ntype ModalProps = PropsWithHTMLAttributes<\n {\n isOpen?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n hasOverlay?: boolean;\n /** @deprecated use onClickOutside */\n onOverlayClick?: (event: MouseEvent) => void;\n onClickOutside?: (event: MouseEvent) => void;\n onEsc?: (event: KeyboardEvent) => void;\n rootClassName?: string;\n width?: ModalPropWidth;\n position?: ModalPropPosition;\n children?: React.ReactNode;\n container?: HTMLDivElement | undefined;\n afterClose?: () => void;\n refsForExcludeClickOutside?: React.RefObject<HTMLElement>[];\n },\n HTMLDivElement\n>;\n\nconst cnModal = cn('Modal');\n\n/**\n * Подписчик на PortalWithThemeProvider\n * получает рефы всех вложенных порталов во всплывающем окне\n * для дальнейшего исключения их из useClickOutside\n */\nconst ContextConsumer: React.FC<{\n onClickOutside?: (event: MouseEvent) => void;\n ignoreClicksInsideRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n children: React.ReactNode;\n}> = ({ onClickOutside, children, ignoreClicksInsideRefs }) => {\n const { refs } = usePortalContext();\n\n useClickOutside({\n isActive: !!onClickOutside,\n ignoreClicksInsideRefs: [\n ...(ignoreClicksInsideRefs || []),\n ...(refs || []),\n ],\n handler: onClickOutside,\n });\n\n return children as React.ReactNode;\n};\n\nexport const Modal: React.FC<ModalProps> = (props) => {\n const {\n isOpen,\n onClose,\n onOpen,\n hasOverlay = true,\n onOverlayClick,\n onClickOutside,\n onEsc,\n className,\n width = modalPropWidthDefault,\n position = modalPropPositionDefault,\n children,\n container = window.document.body,\n refsForExcludeClickOutside,\n rootClassName,\n afterClose,\n style,\n ...otherProps\n } = props;\n\n const ref = useRef<HTMLDivElement | null>(null);\n const portalRef = useRef<HTMLDivElement | null>(null);\n const { theme } = useTheme();\n\n useEffect(() => {\n if (isOpen) {\n onOpen?.();\n } else {\n onClose?.();\n }\n }, [isOpen]);\n\n useGlobalKeys({\n Escape: (e: KeyboardEvent) => isOpen && onEsc && onEsc(e),\n });\n\n return (\n <Transition\n in={isOpen}\n unmountOnExit\n nodeRef={portalRef}\n timeout={animateTimeout}\n onExited={afterClose}\n >\n {(animate) => (\n <PortalWithTheme\n preset={theme}\n container={container}\n className={cnModal({ hasOverlay }, [rootClassName])}\n ref={portalRef}\n style={\n typeof style?.zIndex === 'number'\n ? { zIndex: style.zIndex }\n : undefined\n }\n >\n {hasOverlay && (\n <div\n className={cnModal('Overlay', { animate })}\n aria-label=\"Overlay\"\n />\n )}\n <div\n {...otherProps}\n style={{\n ...style,\n zIndex: undefined,\n }}\n className={cnModal('Window', { width, position }, [\n cnMixPopoverAnimate({ animate }),\n className,\n cnMixScrollBar(),\n ])}\n ref={ref}\n >\n <ContextConsumer\n onClickOutside={onClickOutside || onOverlayClick}\n ignoreClicksInsideRefs={[\n ...(refsForExcludeClickOutside || []),\n ref,\n ]}\n >\n {children}\n </ContextConsumer>\n </div>\n </PortalWithTheme>\n )}\n </Transition>\n );\n};\n"],"mappings":"8hCAAA,oBAEA,MAAOA,MAAP,EAAgBC,SAAhB,CAA2BC,MAA3B,K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CAAC,CAAEa,UAAU,CAAVA,CAAF,CAAD,CAAiB,CAACW,CAAD,CAAjB,CAHpB,CAIE,GAAG,CAAEK,CAJP,CAKE,KAAK,CACsB,QAAzB,gBAAOH,CAAP,WAAOA,CAAP,QAAOA,CAAK,CAAEQ,MAAd,EACI,CAAEA,MAAM,CAAER,CAAK,CAACQ,MAAhB,CADJ,OANJ,EAWGrB,CAAU,EACT,2BACE,SAAS,CAAEb,OAAO,CAAC,SAAD,CAAY,CAAEiC,OAAO,CAAPA,CAAF,CAAZ,CADpB,CAEE,aAAW,SAFb,EAZJ,CAiBE,2CACMN,CADN,EAEE,KAAK,gCACAD,CADA,MAEHQ,MAAM,OAFH,EAFP,CAME,SAAS,CAAElC,OAAO,CAAC,QAAD,CAAW,CAAEiB,KAAK,CAALA,CAAF,CAASC,QAAQ,CAARA,CAAT,CAAX,CAAgC,CAChDzB,mBAAmB,CAAC,CAAEwC,OAAO,CAAPA,CAAF,CAAD,CAD6B,CAEhDjB,CAFgD,CAGhDtB,cAAc,EAHkC,CAAhC,CANpB,CAWE,GAAG,CAAEkC,CAXP,GAaE,oBAAC,eAAD,EACE,cAAc,CAAE1B,CAAc,EAAIY,CADpC,CAEE,sBAAsB,8BAChBS,CAA0B,EAAI,EADd,GAEpBK,CAFoB,EAFxB,EAOGzB,CAPH,CAbF,CAjBF,CADD,CAPH,CAoDH,CA1FM"}
@@ -8,4 +8,4 @@ export declare const PaginationArrow: React.ForwardRefExoticComponent<{
8
8
  orientation?: "start" | "end";
9
9
  label?: string;
10
10
  caption?: string;
11
- } & Omit<React.HTMLAttributes<HTMLButtonElement>, "css" | "size" | "caption" | "form" | "label" | "disabled" | "icon" | "orientation"> & React.RefAttributes<HTMLButtonElement>>;
11
+ } & Omit<React.HTMLAttributes<HTMLButtonElement>, "css" | "size" | "form" | "caption" | "label" | "disabled" | "icon" | "orientation"> & React.RefAttributes<HTMLButtonElement>>;
@@ -66,7 +66,7 @@ export type PaginationProps<TYPE extends PaginationPropType> = PropsWithHTMLAttr
66
66
  } : {
67
67
  getTotalLabel?: never;
68
68
  });
69
- export type PaginationComponent = <TYPE extends PaginationPropType>(props: PaginationProps<TYPE>) => React.ReactElement | null;
69
+ export type PaginationComponent = <TYPE extends PaginationPropType>(props: PaginationProps<TYPE>) => React.ReactNode | null;
70
70
  export type PaginationBaseItemDefault = {
71
71
  key: string | number;
72
72
  label?: string;
@@ -108,7 +108,7 @@ export type PaginationItemProps<AS extends AsTags = 'button'> = PropsWithAsAttri
108
108
  active?: boolean;
109
109
  clickable?: boolean;
110
110
  }, AS>;
111
- export type PaginationItemComponent = <AS extends AsTags = 'button'>(props: PaginationItemProps<AS>) => React.ReactElement | null;
111
+ export type PaginationItemComponent = <AS extends AsTags = 'button'>(props: PaginationItemProps<AS>) => React.ReactNode | null;
112
112
  export type PaginationNumberInputProps = PropsWithHTMLAttributes<{
113
113
  value?: number;
114
114
  onChange?: PaginationPropOnChange<number>;
@@ -124,5 +124,5 @@ export type PaginationListProps<ITEM> = PropsWithHTMLAttributesAndRef<{
124
124
  value?: ITEM;
125
125
  onItemClick?: PaginationPropOnItemClick<ITEM>;
126
126
  }, HTMLDivElement> & Mappers<ITEM>;
127
- export type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(props: PaginationListProps<ITEM>) => React.ReactElement | null;
127
+ export type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(props: PaginationListProps<ITEM>) => React.ReactNode | null;
128
128
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["paginationPropForm","paginationPropFormDefault","paginationPropSize","paginationPropSizeDefault","paginationPropType","paginationPropTypeDefault"],"sources":["../../../../../src/components/Pagination/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport {\n PropsWithHTMLAttributes,\n PropsWithHTMLAttributesAndRef,\n} from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const paginationPropForm = ['default', 'brick', 'round'] as const;\nexport type PaginationPropForm = typeof paginationPropForm[number];\nexport const paginationPropFormDefault: PaginationPropForm =\n paginationPropForm[0];\n\nexport const paginationPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type PaginationPropSize = typeof paginationPropSize[number];\nexport const paginationPropSizeDefault: PaginationPropSize =\n paginationPropSize[0];\n\nexport const paginationPropType = ['default', 'input'] as const;\nexport type PaginationPropType = typeof paginationPropType[number];\nexport const paginationPropTypeDefault: PaginationPropType =\n paginationPropType[0];\n\nexport type PaginationArrowTypes = 'first' | 'previous' | 'next' | 'last';\n\nexport type PaginationPropHotKey = { label: string; keys: string[] };\n\nexport type PaginationPropOnItemClick<ITEM> = (\n item: ITEM,\n params: { e: React.MouseEvent },\n) => void;\n\nexport type PaginationPropOnChange<ITEM> = (\n value: ITEM,\n params: { e: React.MouseEvent | KeyboardEvent },\n) => void;\n\n// ARROWS\n\nexport type PaginationPropArrow =\n | boolean\n | IconComponent\n | {\n label?: string;\n icon?: IconComponent;\n };\n\nexport type PaginationBasePropArrow =\n | false\n | {\n label?: string;\n disabled?: boolean;\n icon?: IconComponent;\n onClick?: React.MouseEventHandler;\n };\n\ntype PaginationArrowsProps = {\n outerMostArrows?: [PaginationPropArrow?, PaginationPropArrow?];\n} & (\n | {\n arrows: [PaginationPropArrow?, PaginationPropArrow?];\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n }\n | {\n arrows?: never;\n hotKeys?: never;\n }\n);\n\nexport type PaginationItem = {\n key: string | number;\n label: string;\n clickable: boolean;\n};\n\nexport type PaginationProps<TYPE extends PaginationPropType> =\n PropsWithHTMLAttributes<\n {\n type?: TYPE;\n showFirstPage?: boolean;\n showLastPage?: boolean;\n visibleCount?: number;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n containerEventListener?: HTMLElement | Window;\n value?: number;\n items?: number;\n onChange?: PaginationPropOnChange<number>;\n getItemAs?: PaginationPropGetItemAs<PaginationItem>;\n getItemAttributes?: PaginationPropGetItemAttributes<PaginationItem>;\n getItemRef?: PaginationPropGetItemRef<PaginationItem>;\n },\n HTMLDivElement\n > &\n PaginationArrowsProps &\n (TYPE extends 'input'\n ? { getTotalLabel?: (pages: number) => string | number }\n : {\n getTotalLabel?: never;\n });\n\nexport type PaginationComponent = <TYPE extends PaginationPropType>(\n props: PaginationProps<TYPE>,\n) => React.ReactElement | null;\n\nexport type PaginationBaseItemDefault = {\n key: string | number;\n label?: string;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n clickable?: boolean;\n attributes?: AsAttributes;\n onClick?: React.MouseEventHandler;\n};\n\nexport type PaginationPropGetItemKey<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['key'];\nexport type PaginationPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['label'];\nexport type PaginationPropGetItemClickable<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['clickable'];\nexport type PaginationPropGetItemAs<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['as'];\nexport type PaginationPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['attributes'];\nexport type PaginationPropGetItemRef<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['ref'];\nexport type PaginationPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['onClick'];\n\ntype Mappers<ITEM = PaginationBaseItemDefault> = {\n getItemLabel?: PaginationPropGetItemLabel<ITEM>;\n getItemKey: PaginationPropGetItemKey<ITEM>;\n getItemAs?: PaginationPropGetItemAs<ITEM>;\n getItemAttributes?: PaginationPropGetItemAttributes<ITEM>;\n getItemRef?: PaginationPropGetItemRef<ITEM>;\n getItemClickable?: PaginationPropGetItemClickable<ITEM>;\n getItemOnClick?: PaginationPropGetItemOnClick<ITEM>;\n};\n\nexport type PaginationArrowProps = PropsWithHTMLAttributes<\n {\n icon?: IconComponent;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n disabled?: boolean;\n orientation?: 'start' | 'end';\n label?: string;\n caption?: string;\n },\n HTMLButtonElement\n>;\n\nexport type PaginationItemProps<AS extends AsTags = 'button'> =\n PropsWithAsAttributes<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n label?: string;\n active?: boolean;\n clickable?: boolean;\n },\n AS\n >;\n\nexport type PaginationItemComponent = <AS extends AsTags = 'button'>(\n props: PaginationItemProps<AS>,\n) => React.ReactElement | null;\n\nexport type PaginationNumberInputProps = PropsWithHTMLAttributes<\n {\n value?: number;\n onChange?: PaginationPropOnChange<number>;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n total: number;\n getTotalLabel?: (pages: number) => string | number;\n },\n HTMLDivElement\n>;\n\nexport type PaginationListProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n items: ITEM[];\n value?: ITEM;\n onItemClick?: PaginationPropOnItemClick<ITEM>;\n },\n HTMLDivElement\n> &\n Mappers<ITEM>;\n\nexport type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(\n props: PaginationListProps<ITEM>,\n) => React.ReactElement | null;\n"],"mappings":"AAUA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
1
+ {"version":3,"file":"types.js","names":["paginationPropForm","paginationPropFormDefault","paginationPropSize","paginationPropSizeDefault","paginationPropType","paginationPropTypeDefault"],"sources":["../../../../../src/components/Pagination/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport {\n PropsWithHTMLAttributes,\n PropsWithHTMLAttributesAndRef,\n} from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const paginationPropForm = ['default', 'brick', 'round'] as const;\nexport type PaginationPropForm = typeof paginationPropForm[number];\nexport const paginationPropFormDefault: PaginationPropForm =\n paginationPropForm[0];\n\nexport const paginationPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type PaginationPropSize = typeof paginationPropSize[number];\nexport const paginationPropSizeDefault: PaginationPropSize =\n paginationPropSize[0];\n\nexport const paginationPropType = ['default', 'input'] as const;\nexport type PaginationPropType = typeof paginationPropType[number];\nexport const paginationPropTypeDefault: PaginationPropType =\n paginationPropType[0];\n\nexport type PaginationArrowTypes = 'first' | 'previous' | 'next' | 'last';\n\nexport type PaginationPropHotKey = { label: string; keys: string[] };\n\nexport type PaginationPropOnItemClick<ITEM> = (\n item: ITEM,\n params: { e: React.MouseEvent },\n) => void;\n\nexport type PaginationPropOnChange<ITEM> = (\n value: ITEM,\n params: { e: React.MouseEvent | KeyboardEvent },\n) => void;\n\n// ARROWS\n\nexport type PaginationPropArrow =\n | boolean\n | IconComponent\n | {\n label?: string;\n icon?: IconComponent;\n };\n\nexport type PaginationBasePropArrow =\n | false\n | {\n label?: string;\n disabled?: boolean;\n icon?: IconComponent;\n onClick?: React.MouseEventHandler;\n };\n\ntype PaginationArrowsProps = {\n outerMostArrows?: [PaginationPropArrow?, PaginationPropArrow?];\n} & (\n | {\n arrows: [PaginationPropArrow?, PaginationPropArrow?];\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n }\n | {\n arrows?: never;\n hotKeys?: never;\n }\n);\n\nexport type PaginationItem = {\n key: string | number;\n label: string;\n clickable: boolean;\n};\n\nexport type PaginationProps<TYPE extends PaginationPropType> =\n PropsWithHTMLAttributes<\n {\n type?: TYPE;\n showFirstPage?: boolean;\n showLastPage?: boolean;\n visibleCount?: number;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n containerEventListener?: HTMLElement | Window;\n value?: number;\n items?: number;\n onChange?: PaginationPropOnChange<number>;\n getItemAs?: PaginationPropGetItemAs<PaginationItem>;\n getItemAttributes?: PaginationPropGetItemAttributes<PaginationItem>;\n getItemRef?: PaginationPropGetItemRef<PaginationItem>;\n },\n HTMLDivElement\n > &\n PaginationArrowsProps &\n (TYPE extends 'input'\n ? { getTotalLabel?: (pages: number) => string | number }\n : {\n getTotalLabel?: never;\n });\n\nexport type PaginationComponent = <TYPE extends PaginationPropType>(\n props: PaginationProps<TYPE>,\n) => React.ReactNode | null;\n\nexport type PaginationBaseItemDefault = {\n key: string | number;\n label?: string;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n clickable?: boolean;\n attributes?: AsAttributes;\n onClick?: React.MouseEventHandler;\n};\n\nexport type PaginationPropGetItemKey<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['key'];\nexport type PaginationPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['label'];\nexport type PaginationPropGetItemClickable<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['clickable'];\nexport type PaginationPropGetItemAs<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['as'];\nexport type PaginationPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['attributes'];\nexport type PaginationPropGetItemRef<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['ref'];\nexport type PaginationPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['onClick'];\n\ntype Mappers<ITEM = PaginationBaseItemDefault> = {\n getItemLabel?: PaginationPropGetItemLabel<ITEM>;\n getItemKey: PaginationPropGetItemKey<ITEM>;\n getItemAs?: PaginationPropGetItemAs<ITEM>;\n getItemAttributes?: PaginationPropGetItemAttributes<ITEM>;\n getItemRef?: PaginationPropGetItemRef<ITEM>;\n getItemClickable?: PaginationPropGetItemClickable<ITEM>;\n getItemOnClick?: PaginationPropGetItemOnClick<ITEM>;\n};\n\nexport type PaginationArrowProps = PropsWithHTMLAttributes<\n {\n icon?: IconComponent;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n disabled?: boolean;\n orientation?: 'start' | 'end';\n label?: string;\n caption?: string;\n },\n HTMLButtonElement\n>;\n\nexport type PaginationItemProps<AS extends AsTags = 'button'> =\n PropsWithAsAttributes<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n label?: string;\n active?: boolean;\n clickable?: boolean;\n },\n AS\n >;\n\nexport type PaginationItemComponent = <AS extends AsTags = 'button'>(\n props: PaginationItemProps<AS>,\n) => React.ReactNode | null;\n\nexport type PaginationNumberInputProps = PropsWithHTMLAttributes<\n {\n value?: number;\n onChange?: PaginationPropOnChange<number>;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n total: number;\n getTotalLabel?: (pages: number) => string | number;\n },\n HTMLDivElement\n>;\n\nexport type PaginationListProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n items: ITEM[];\n value?: ITEM;\n onItemClick?: PaginationPropOnItemClick<ITEM>;\n },\n HTMLDivElement\n> &\n Mappers<ITEM>;\n\nexport type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(\n props: PaginationListProps<ITEM>,\n) => React.ReactNode | null;\n"],"mappings":"AAUA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
@@ -40,6 +40,6 @@ type Props = {
40
40
  minified?: false;
41
41
  position?: PaginationPropPosition;
42
42
  });
43
- type Pagination = (props: PropsWithHTMLAttributesAndRef<Props, HTMLDivElement>) => React.ReactElement | null;
43
+ type Pagination = (props: PropsWithHTMLAttributesAndRef<Props, HTMLDivElement>) => React.ReactNode | null;
44
44
  export declare const Pagination: Pagination;
45
45
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationDeprecated.js","names":["IconBackward","IconForward","React","cnDeprecated","Button","Text","TextField","getPaginationInfo","paginationForms","paginationDefaultForm","paginationSizes","paginationDefaultSize","paginationTypes","paginationDefaultType","paginationPositions","paginationDefaultPosition","getDefaultLabel","totalPages","cnPagination","Pagination","forwardRef","props","ref","currentPage","onChange","getLabel","form","size","type","position","minified","hotkeys","nextPage","label","values","prevPage","containerEventListener","window","className","otherProps","currPage","isStartDots","isEndDots","pages","isEmpty","useState","keys","setKeys","changePage","page","handleClick","e","preventDefault","keyUpListener","event","key","prevState","filter","hotKey","keyDownListener","includes","newKeys","every","useEffect","addEventListener","removeEventListener","itemWidth","show","isActive","width","map","toString","handleChange","value","pageNumber","Number","isNaN"],"sources":["../../../../../src/components/PaginationDeprecated/PaginationDeprecated.tsx"],"sourcesContent":["import './Pagination.css';\n\nimport { IconBackward } from '@consta/icons/IconBackward';\nimport { IconForward } from '@consta/icons/IconForward';\nimport React from 'react';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { Button } from '../Button/Button';\nimport { Text } from '../Text/Text';\nimport { TextField, TextFieldPropOnChange } from '../TextField/TextField';\nimport { getPaginationInfo } from './helpers';\n\nexport const paginationForms = ['default', 'round', 'brick'] as const;\nexport type PaginationPropForm = typeof paginationForms[number];\nexport const paginationDefaultForm: PaginationPropForm = 'default';\n\nexport const paginationSizes = ['xs', 's', 'm', 'l'] as const;\nexport type PaginationPropSize = typeof paginationSizes[number];\nexport const paginationDefaultSize: PaginationPropSize = 'm';\n\nexport const paginationTypes = ['default', 'input'] as const;\nexport type PaginationPropType = typeof paginationTypes[number];\nexport const paginationDefaultType: PaginationPropType = 'default';\n\nexport const paginationPositions = ['left', 'center', 'right'] as const;\nexport type PaginationPropPosition = typeof paginationPositions[number];\nexport const paginationDefaultPosition: PaginationPropPosition = 'center';\n\nconst getDefaultLabel = (totalPages: number): string => `из ${totalPages}`;\n\nexport const cnPagination = cnDeprecated('Pagination');\n\ntype HotKey = {\n label: string;\n values: string[];\n};\n\nexport type HotKeys = {\n nextPage: HotKey;\n prevPage: HotKey;\n};\n\ntype Props = {\n currentPage: number;\n totalPages: number;\n onChange: (pageNumber: number) => void;\n getLabel?: (totalPages: number) => string;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n type?: PaginationPropType;\n hotkeys?: HotKeys;\n containerEventListener?: HTMLElement | Window;\n className?: string;\n} & (\n | {\n minified?: true;\n position?: never;\n }\n | {\n minified?: false;\n position?: PaginationPropPosition;\n }\n);\n\ntype Pagination = (\n props: PropsWithHTMLAttributesAndRef<Props, HTMLDivElement>,\n) => React.ReactElement | null;\n\nexport const Pagination: Pagination = React.forwardRef((props, ref) => {\n const {\n currentPage = 0,\n totalPages = 0,\n onChange,\n getLabel = getDefaultLabel,\n form = paginationDefaultForm,\n size = paginationDefaultSize,\n type = paginationDefaultType,\n position = paginationDefaultPosition,\n minified = false,\n hotkeys = {\n nextPage: {\n label: 'Alt →',\n values: ['Alt', 'ArrowRight'],\n },\n prevPage: {\n label: '← Alt',\n values: ['Alt', 'ArrowLeft'],\n },\n },\n containerEventListener = window,\n className,\n ...otherProps\n } = props;\n\n const currPage = currentPage + 1;\n const { prevPage, nextPage, isStartDots, isEndDots, pages, isEmpty } =\n getPaginationInfo(currPage, totalPages);\n const [keys, setKeys] = React.useState<string[]>([]);\n\n const changePage = (page: number | null) => {\n if (page && page !== currPage && onChange) {\n onChange(page - 1);\n }\n };\n\n const handleClick = (page: number | null) => (e: React.MouseEvent) => {\n e.preventDefault();\n changePage(page);\n };\n\n const handleChange: TextFieldPropOnChange = (value) => {\n const pageNumber = Number(value);\n\n if (pageNumber > totalPages || Number.isNaN(pageNumber)) return;\n\n if (onChange) {\n onChange(pageNumber - 1);\n }\n };\n\n const keyUpListener: EventListener = (event) => {\n const { key } = event as KeyboardEvent;\n\n setKeys((prevState) => prevState.filter((hotKey) => hotKey !== key));\n };\n\n const keyDownListener: EventListener = (event) => {\n const { key } = event as KeyboardEvent;\n\n if (\n hotkeys.nextPage.values.includes(key) ||\n hotkeys.prevPage.values.includes(key)\n ) {\n const newKeys = [...keys, key];\n if (hotkeys.nextPage.values.every((hotKey) => newKeys.includes(hotKey))) {\n changePage(nextPage);\n } else if (\n hotkeys.prevPage.values.every((hotKey) => newKeys.includes(hotKey))\n ) {\n changePage(prevPage);\n }\n setKeys(newKeys);\n }\n };\n\n React.useEffect(() => {\n containerEventListener.addEventListener('keydown', keyDownListener);\n containerEventListener.addEventListener('keyup', keyUpListener);\n return () => {\n containerEventListener.removeEventListener('keydown', keyDownListener);\n containerEventListener.removeEventListener('keyup', keyUpListener);\n };\n });\n\n const itemWidth = `var(--control-height-${size})`;\n\n if (!totalPages) return null;\n\n return (\n (!isEmpty && (\n <nav\n className={cnPagination(\n {\n form,\n size,\n position: minified ? paginationDefaultPosition : position,\n },\n [className],\n )}\n ref={ref}\n {...otherProps}\n >\n {(currPage > 1 || minified) && (\n <div className={cnPagination('PrevPage')}>\n <Button\n type=\"button\"\n className={cnPagination('ItemLeft', {\n minified,\n show: currPage > 1,\n })}\n label=\"Назад\"\n iconLeft={IconBackward}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(prevPage)}\n />\n {!minified && (\n <Text\n className={cnPagination('TipLeft')}\n size=\"xs\"\n view=\"ghost\"\n lineHeight=\"m\"\n >\n {hotkeys.prevPage.label}\n </Text>\n )}\n </div>\n )}\n {type === paginationDefaultType ? (\n <div className={cnPagination('Pages')}>\n {isStartDots && (\n <Button\n type=\"button\"\n className={cnPagination('Item', { isActive: currPage === 1 })}\n style={{ width: itemWidth }}\n label=\"1\"\n title=\"1\"\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(1)}\n />\n )}\n {isStartDots && (\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('More')}\n style={{ width: itemWidth }}\n lineHeight=\"m\"\n >\n ...\n </Text>\n )}\n {pages.map((page) => (\n <Button\n type=\"button\"\n key={page}\n className={cnPagination('Item', {\n isActive: currPage === page,\n })}\n style={{ width: itemWidth }}\n label={page}\n title={`${page}`}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(page)}\n />\n ))}\n {isEndDots && (\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('More')}\n style={{ width: itemWidth }}\n lineHeight=\"m\"\n >\n ...\n </Text>\n )}\n {isEndDots && (\n <Button\n type=\"button\"\n className={cnPagination('Item', {\n isActive: currPage === totalPages,\n })}\n style={{ width: itemWidth }}\n label={totalPages}\n title={`${totalPages}`}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(totalPages)}\n />\n )}\n </div>\n ) : (\n <div className={cnPagination('Pages')}>\n <TextField\n className={cnPagination('Input')}\n form={form}\n size={size}\n value={currPage.toString()}\n onChange={handleChange}\n />\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('Total')}\n lineHeight=\"m\"\n >\n {getLabel(totalPages)}\n </Text>\n </div>\n )}\n {(currPage < totalPages || minified) && (\n <div className={cnPagination('NextPage')}>\n <Button\n type=\"button\"\n className={cnPagination('ItemRight', {\n minified,\n show: currPage < totalPages,\n })}\n label=\"Вперёд\"\n iconRight={IconForward}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(nextPage)}\n />\n {!minified && (\n <Text\n className={cnPagination('TipRight')}\n size=\"xs\"\n view=\"ghost\"\n lineHeight=\"m\"\n >\n {hotkeys.nextPage.label}\n </Text>\n )}\n </div>\n )}\n </nav>\n )) ||\n null\n );\n});\n"],"mappings":"0XAAA,yBAEA,OAASA,YAAT,KAA6B,4BAA7B,CACA,OAASC,WAAT,KAA4B,2BAA5B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,YAAT,uBAEA,OAASC,MAAT,wBACA,OAASC,IAAT,oBACA,OAASC,SAAT,8BACA,OAASC,iBAAT,iBAEA,MAAO,IAAMC,gBAAe,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,SAAlD,CAEP,MAAO,IAAMC,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,GAAlD,CAEP,MAAO,IAAMC,gBAAe,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,SAAlD,CAEP,MAAO,IAAMC,oBAAmB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAA5B,CAEP,MAAO,IAAMC,0BAAiD,CAAG,QAA1D,CAEP,GAAMC,gBAAe,CAAG,SAACC,CAAD,+BAAsCA,CAAtC,EAAxB,CAEA,MAAO,IAAMC,aAAY,CAAGf,YAAY,CAAC,YAAD,CAAjC,CAsCP,MAAO,IAAMgB,WAAsB,CAAGjB,KAAK,CAACkB,UAAN,CAAiB,SAACC,CAAD,CAAQC,CAAR,CAAgB,OAwBjED,CAxBiE,CAEnEE,WAFmE,CAEnEA,CAFmE,YAErD,CAFqD,KAwBjEF,CAxBiE,CAGnEJ,UAHmE,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AGvB,CAAX,EAAyBa,CAA1B,GACC,2BAAK,SAAS,CAAEZ,YAAY,CAAC,UAAD,CAA5B,EACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,SAAS,CAAEA,YAAY,CAAC,WAAD,CAAc,CACnCY,QAAQ,CAARA,CADmC,CAEnCqC,IAAI,CAAE3B,CAAQ,CAAGvB,CAFkB,CAAd,CAFzB,CAME,KAAK,CAAC,sCANR,CAOE,SAAS,CAAEhB,WAPb,CAQE,IAAI,CAAC,OARP,CASE,IAAI,CAAEyB,CATR,CAUE,IAAI,CAAEC,CAVR,CAWE,OAAO,CAAEuB,CAAW,CAAClB,CAAD,CAXtB,EADF,CAcG,CAACF,CAAD,EACC,oBAAC,IAAD,EACE,SAAS,CAAEZ,YAAY,CAAC,UAAD,CADzB,CAEE,IAAI,CAAC,IAFP,CAGE,IAAI,CAAC,OAHP,CAIE,UAAU,CAAC,GAJb,EAMGa,CAAO,CAACC,QAAR,CAAiBC,KANpB,CAfJ,CAhIJ,CADF,EA6JA,IAxPmE,CAwF7C,IAkKzB,CA1PqC,CAA/B"}
1
+ {"version":3,"file":"PaginationDeprecated.js","names":["IconBackward","IconForward","React","cnDeprecated","Button","Text","TextField","getPaginationInfo","paginationForms","paginationDefaultForm","paginationSizes","paginationDefaultSize","paginationTypes","paginationDefaultType","paginationPositions","paginationDefaultPosition","getDefaultLabel","totalPages","cnPagination","Pagination","forwardRef","props","ref","currentPage","onChange","getLabel","form","size","type","position","minified","hotkeys","nextPage","label","values","prevPage","containerEventListener","window","className","otherProps","currPage","isStartDots","isEndDots","pages","isEmpty","useState","keys","setKeys","changePage","page","handleClick","e","preventDefault","keyUpListener","event","key","prevState","filter","hotKey","keyDownListener","includes","newKeys","every","useEffect","addEventListener","removeEventListener","itemWidth","show","isActive","width","map","toString","handleChange","value","pageNumber","Number","isNaN"],"sources":["../../../../../src/components/PaginationDeprecated/PaginationDeprecated.tsx"],"sourcesContent":["import './Pagination.css';\n\nimport { IconBackward } from '@consta/icons/IconBackward';\nimport { IconForward } from '@consta/icons/IconForward';\nimport React from 'react';\n\nimport { cnDeprecated } from '../../utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';\nimport { Button } from '../Button/Button';\nimport { Text } from '../Text/Text';\nimport { TextField, TextFieldPropOnChange } from '../TextField/TextField';\nimport { getPaginationInfo } from './helpers';\n\nexport const paginationForms = ['default', 'round', 'brick'] as const;\nexport type PaginationPropForm = typeof paginationForms[number];\nexport const paginationDefaultForm: PaginationPropForm = 'default';\n\nexport const paginationSizes = ['xs', 's', 'm', 'l'] as const;\nexport type PaginationPropSize = typeof paginationSizes[number];\nexport const paginationDefaultSize: PaginationPropSize = 'm';\n\nexport const paginationTypes = ['default', 'input'] as const;\nexport type PaginationPropType = typeof paginationTypes[number];\nexport const paginationDefaultType: PaginationPropType = 'default';\n\nexport const paginationPositions = ['left', 'center', 'right'] as const;\nexport type PaginationPropPosition = typeof paginationPositions[number];\nexport const paginationDefaultPosition: PaginationPropPosition = 'center';\n\nconst getDefaultLabel = (totalPages: number): string => `из ${totalPages}`;\n\nexport const cnPagination = cnDeprecated('Pagination');\n\ntype HotKey = {\n label: string;\n values: string[];\n};\n\nexport type HotKeys = {\n nextPage: HotKey;\n prevPage: HotKey;\n};\n\ntype Props = {\n currentPage: number;\n totalPages: number;\n onChange: (pageNumber: number) => void;\n getLabel?: (totalPages: number) => string;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n type?: PaginationPropType;\n hotkeys?: HotKeys;\n containerEventListener?: HTMLElement | Window;\n className?: string;\n} & (\n | {\n minified?: true;\n position?: never;\n }\n | {\n minified?: false;\n position?: PaginationPropPosition;\n }\n);\n\ntype Pagination = (\n props: PropsWithHTMLAttributesAndRef<Props, HTMLDivElement>,\n) => React.ReactNode | null;\n\nexport const Pagination: Pagination = React.forwardRef((props, ref) => {\n const {\n currentPage = 0,\n totalPages = 0,\n onChange,\n getLabel = getDefaultLabel,\n form = paginationDefaultForm,\n size = paginationDefaultSize,\n type = paginationDefaultType,\n position = paginationDefaultPosition,\n minified = false,\n hotkeys = {\n nextPage: {\n label: 'Alt →',\n values: ['Alt', 'ArrowRight'],\n },\n prevPage: {\n label: '← Alt',\n values: ['Alt', 'ArrowLeft'],\n },\n },\n containerEventListener = window,\n className,\n ...otherProps\n } = props;\n\n const currPage = currentPage + 1;\n const { prevPage, nextPage, isStartDots, isEndDots, pages, isEmpty } =\n getPaginationInfo(currPage, totalPages);\n const [keys, setKeys] = React.useState<string[]>([]);\n\n const changePage = (page: number | null) => {\n if (page && page !== currPage && onChange) {\n onChange(page - 1);\n }\n };\n\n const handleClick = (page: number | null) => (e: React.MouseEvent) => {\n e.preventDefault();\n changePage(page);\n };\n\n const handleChange: TextFieldPropOnChange = (value) => {\n const pageNumber = Number(value);\n\n if (pageNumber > totalPages || Number.isNaN(pageNumber)) return;\n\n if (onChange) {\n onChange(pageNumber - 1);\n }\n };\n\n const keyUpListener: EventListener = (event) => {\n const { key } = event as KeyboardEvent;\n\n setKeys((prevState) => prevState.filter((hotKey) => hotKey !== key));\n };\n\n const keyDownListener: EventListener = (event) => {\n const { key } = event as KeyboardEvent;\n\n if (\n hotkeys.nextPage.values.includes(key) ||\n hotkeys.prevPage.values.includes(key)\n ) {\n const newKeys = [...keys, key];\n if (hotkeys.nextPage.values.every((hotKey) => newKeys.includes(hotKey))) {\n changePage(nextPage);\n } else if (\n hotkeys.prevPage.values.every((hotKey) => newKeys.includes(hotKey))\n ) {\n changePage(prevPage);\n }\n setKeys(newKeys);\n }\n };\n\n React.useEffect(() => {\n containerEventListener.addEventListener('keydown', keyDownListener);\n containerEventListener.addEventListener('keyup', keyUpListener);\n return () => {\n containerEventListener.removeEventListener('keydown', keyDownListener);\n containerEventListener.removeEventListener('keyup', keyUpListener);\n };\n });\n\n const itemWidth = `var(--control-height-${size})`;\n\n if (!totalPages) return null;\n\n return (\n (!isEmpty && (\n <nav\n className={cnPagination(\n {\n form,\n size,\n position: minified ? paginationDefaultPosition : position,\n },\n [className],\n )}\n ref={ref}\n {...otherProps}\n >\n {(currPage > 1 || minified) && (\n <div className={cnPagination('PrevPage')}>\n <Button\n type=\"button\"\n className={cnPagination('ItemLeft', {\n minified,\n show: currPage > 1,\n })}\n label=\"Назад\"\n iconLeft={IconBackward}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(prevPage)}\n />\n {!minified && (\n <Text\n className={cnPagination('TipLeft')}\n size=\"xs\"\n view=\"ghost\"\n lineHeight=\"m\"\n >\n {hotkeys.prevPage.label}\n </Text>\n )}\n </div>\n )}\n {type === paginationDefaultType ? (\n <div className={cnPagination('Pages')}>\n {isStartDots && (\n <Button\n type=\"button\"\n className={cnPagination('Item', { isActive: currPage === 1 })}\n style={{ width: itemWidth }}\n label=\"1\"\n title=\"1\"\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(1)}\n />\n )}\n {isStartDots && (\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('More')}\n style={{ width: itemWidth }}\n lineHeight=\"m\"\n >\n ...\n </Text>\n )}\n {pages.map((page) => (\n <Button\n type=\"button\"\n key={page}\n className={cnPagination('Item', {\n isActive: currPage === page,\n })}\n style={{ width: itemWidth }}\n label={page}\n title={`${page}`}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(page)}\n />\n ))}\n {isEndDots && (\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('More')}\n style={{ width: itemWidth }}\n lineHeight=\"m\"\n >\n ...\n </Text>\n )}\n {isEndDots && (\n <Button\n type=\"button\"\n className={cnPagination('Item', {\n isActive: currPage === totalPages,\n })}\n style={{ width: itemWidth }}\n label={totalPages}\n title={`${totalPages}`}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(totalPages)}\n />\n )}\n </div>\n ) : (\n <div className={cnPagination('Pages')}>\n <TextField\n className={cnPagination('Input')}\n form={form}\n size={size}\n value={currPage.toString()}\n onChange={handleChange}\n />\n <Text\n size={size}\n view=\"linkMinor\"\n className={cnPagination('Total')}\n lineHeight=\"m\"\n >\n {getLabel(totalPages)}\n </Text>\n </div>\n )}\n {(currPage < totalPages || minified) && (\n <div className={cnPagination('NextPage')}>\n <Button\n type=\"button\"\n className={cnPagination('ItemRight', {\n minified,\n show: currPage < totalPages,\n })}\n label=\"Вперёд\"\n iconRight={IconForward}\n view=\"ghost\"\n form={form}\n size={size}\n onClick={handleClick(nextPage)}\n />\n {!minified && (\n <Text\n className={cnPagination('TipRight')}\n size=\"xs\"\n view=\"ghost\"\n lineHeight=\"m\"\n >\n {hotkeys.nextPage.label}\n </Text>\n )}\n </div>\n )}\n </nav>\n )) ||\n null\n );\n});\n"],"mappings":"0XAAA,yBAEA,OAASA,YAAT,KAA6B,4BAA7B,CACA,OAASC,WAAT,KAA4B,2BAA5B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,YAAT,uBAEA,OAASC,MAAT,wBACA,OAASC,IAAT,oBACA,OAASC,SAAT,8BACA,OAASC,iBAAT,iBAEA,MAAO,IAAMC,gBAAe,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,SAAlD,CAEP,MAAO,IAAMC,gBAAe,CAAG,CAAC,IAAD,CAAO,GAAP,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,GAAlD,CAEP,MAAO,IAAMC,gBAAe,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAxB,CAEP,MAAO,IAAMC,sBAAyC,CAAG,SAAlD,CAEP,MAAO,IAAMC,oBAAmB,CAAG,CAAC,MAAD,CAAS,QAAT,CAAmB,OAAnB,CAA5B,CAEP,MAAO,IAAMC,0BAAiD,CAAG,QAA1D,CAEP,GAAMC,gBAAe,CAAG,SAACC,CAAD,+BAAsCA,CAAtC,EAAxB,CAEA,MAAO,IAAMC,aAAY,CAAGf,YAAY,C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S,EADF,CAQE,oBAAC,IAAD,EACE,IAAI,CAAE/C,CADR,CAEE,IAAI,CAAC,WAFP,CAGE,SAAS,CAAET,YAAY,CAAC,OAAD,CAHzB,CAIE,UAAU,CAAC,GAJb,EAMGO,CAAQ,CAACR,CAAD,CANX,CARF,CA7GJ,CA+HG,CAACuB,CAAQ,CAAGvB,CAAX,EAAyBa,CAA1B,GACC,2BAAK,SAAS,CAAEZ,YAAY,CAAC,UAAD,CAA5B,EACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,SAAS,CAAEA,YAAY,CAAC,WAAD,CAAc,CACnCY,QAAQ,CAARA,CADmC,CAEnCqC,IAAI,CAAE3B,CAAQ,CAAGvB,CAFkB,CAAd,CAFzB,CAME,KAAK,CAAC,sCANR,CAOE,SAAS,CAAEhB,WAPb,CAQE,IAAI,CAAC,OARP,CASE,IAAI,CAAEyB,CATR,CAUE,IAAI,CAAEC,CAVR,CAWE,OAAO,CAAEuB,CAAW,CAAClB,CAAD,CAXtB,EADF,CAcG,CAACF,CAAD,EACC,oBAAC,IAAD,EACE,SAAS,CAAEZ,YAAY,CAAC,UAAD,CADzB,CAEE,IAAI,CAAC,IAFP,CAGE,IAAI,CAAC,OAHP,CAIE,UAAU,CAAC,GAJb,EAMGa,CAAO,CAACC,QAAR,CAAiBC,KANpB,CAfJ,CAhIJ,CADF,EA6JA,IAxPmE,CAwF7C,IAkKzB,CA1PqC,CAA/B"}
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { PictureProps } from './types';
3
- export declare const Picture: React.ForwardRefExoticComponent<Pick<PictureProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "alt" | "src" | "getImageSettings" | "subscribeToRef"> & React.RefAttributes<HTMLImageElement>>;
3
+ export declare const Picture: React.ForwardRefExoticComponent<Omit<PictureProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
@@ -40,5 +40,5 @@ export type PopoverProps = PropsWithJsxAttributes<{
40
40
  container?: Element;
41
41
  } & PositioningProps>;
42
42
  export type Props = PopoverProps;
43
- export declare const Popover: React.ForwardRefExoticComponent<Pick<PopoverProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "position" | "direction" | "container" | "arrowOffset" | "offset" | "possibleDirections" | "spareDirection" | "isInteractive" | "onClickOutside" | "onSetDirection" | "viewportRef" | "anchorRef" | "equalAnchorWidth"> & React.RefAttributes<HTMLDivElement>>;
43
+ export declare const Popover: React.ForwardRefExoticComponent<Omit<PopoverProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
44
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.js","names":["React","forwardRef","useEffect","useLayoutEffect","useMemo","PortalWithTheme","usePortalContext","useTheme","useClickOutside","useComponentSize","useForkRef","cn","isRenderProp","isNumber","isString","getComputedPositionAndDirection","getPointPosition","getRenderPosition","usePopoverReposition","directionsStartCenter","directionsStartEdge","popoverPropOffset","directions","getOffset","ref","propOffset","current","cssVar","getComputedStyle","getPropertyValue","test","slice","length","fontSize","parseFloat","document","documentElement","rem","em","ContextConsumer","onClickOutside","children","ignoreClicksInsideRefs","refs","isActive","handler","cnPopover","Popover","props","componentRef","direction","passedDirection","offset","arrowOffset","possibleDirections","isInteractive","spareDirection","style","className","passedPosition","position","anchorRef","equalAnchorWidth","onSetDirection","viewportRef","container","window","body","otherProps","viewportElement","useRef","theme","useState","anchorClientRect","setAnchorClientRect","width","height","anchorSize","previousDirectionRef","bannedDirections","setBannedDirections","resetBannedDirections","state","updateAnchorClientRect","getBoundingClientRect","contentSize","viewportSize","clientWidth","clientHeight","x","left","y","top","scrollAnchorRef","onRequestReposition","includes","renderPosition","notVisible"],"sources":["../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import './Popover.css';\n\nimport React, { forwardRef, useEffect, useLayoutEffect, useMemo } from 'react';\n\nimport {\n PortalWithTheme,\n usePortalContext,\n} from '##/components/PortalWithTheme';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { ClickOutsideHandler, useClickOutside } from '##/hooks/useClickOutside';\nimport { useComponentSize } from '##/hooks/useComponentSize';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { cn } from '##/utils/bem';\nimport { isRenderProp } from '##/utils/isRenderProp';\nimport { isNumber, isString } from '##/utils/type-guards';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nimport {\n getComputedPositionAndDirection,\n getPointPosition,\n getRenderPosition,\n} from './helpers';\nimport { usePopoverReposition } from './usePopoverReposition';\n\n/**\n * Стороны упорядочены по приоритету:\n * Используется первая сторона, в которую смог вписаться поповер.\n */\nexport const directionsStartCenter = [\n 'downCenter',\n 'upCenter',\n\n 'downRight',\n 'downLeft',\n 'upRight',\n 'upLeft',\n\n 'leftUp',\n 'leftCenter',\n 'leftDown',\n\n 'rightUp',\n 'rightCenter',\n 'rightDown',\n] as const;\n\nexport const directionsStartEdge = [\n 'downStartLeft',\n 'upStartLeft',\n\n 'downStartRight',\n 'upStartRight',\n\n 'leftStartUp',\n 'leftStartDown',\n\n 'rightStartUp',\n 'rightStartDown',\n] as const;\n\nexport const popoverPropOffset = [\n '3xs',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type PopoverPropOffset = typeof popoverPropOffset[number] | number;\n\nexport const directions = [...directionsStartCenter, ...directionsStartEdge];\n\nexport type Direction = typeof directions[number];\n\nexport type Position = { x: number; y: number } | undefined;\n\nexport type PositioningProps =\n | {\n anchorRef: React.RefObject<HTMLElement>;\n equalAnchorWidth?: boolean;\n position?: never;\n }\n | {\n anchorRef?: never;\n equalAnchorWidth?: never;\n position: Position;\n };\n\ntype ChildrenRenderProp = (direction: Direction) => React.ReactNode;\n\nexport type PopoverProps = PropsWithJsxAttributes<\n {\n direction?: Direction;\n spareDirection?: Direction;\n offset?: PopoverPropOffset;\n arrowOffset?: number;\n possibleDirections?: readonly Direction[];\n isInteractive?: boolean;\n children: React.ReactNode | ChildrenRenderProp;\n onClickOutside?: ClickOutsideHandler;\n onSetDirection?: (direction: Direction) => void;\n viewportRef?: React.RefObject<HTMLElement>;\n container?: Element;\n } & PositioningProps\n>;\n\nexport type Props = PopoverProps; // удалить при мажоре\n\nconst getOffset = (\n ref: React.RefObject<HTMLDivElement>,\n propOffset: PopoverPropOffset,\n) => {\n if (isNumber(propOffset)) {\n return propOffset;\n }\n\n if (isString(propOffset) && ref.current) {\n const cssVar = getComputedStyle(ref.current).getPropertyValue(\n `--space-${propOffset}`,\n );\n\n if (cssVar && /px$/.test(cssVar)) {\n return Number(cssVar.slice(0, cssVar.length - 2));\n }\n\n if (cssVar && /rem$/.test(cssVar)) {\n const fontSize = parseFloat(\n getComputedStyle(document.documentElement).fontSize,\n );\n const rem = Number(cssVar.slice(0, cssVar.length - 3));\n\n return fontSize * rem;\n }\n\n if (cssVar && /em$/.test(cssVar)) {\n const fontSize = parseFloat(getComputedStyle(ref.current).fontSize);\n const em = Number(cssVar.slice(0, cssVar.length - 2));\n\n return fontSize * em;\n }\n\n return 0;\n }\n\n return 0;\n};\n\n/**\n * Подписчик на PortalWithThemeProvider\n * получает рефы всех вложенных порталов во всплывающем окне\n * для дальнейшего исключения их из useClickOutside\n */\nconst ContextConsumer: React.FC<{\n onClickOutside?: (event: MouseEvent) => void;\n ignoreClicksInsideRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n children: React.ReactNode;\n}> = ({ onClickOutside, children, ignoreClicksInsideRefs }) => {\n const { refs } = usePortalContext();\n\n useClickOutside({\n isActive: !!onClickOutside,\n ignoreClicksInsideRefs: [\n ...(ignoreClicksInsideRefs || []),\n ...(refs || []),\n ],\n handler: onClickOutside,\n });\n\n return children as React.ReactElement;\n};\n\nconst cnPopover = cn('Popover');\n\nexport const Popover = forwardRef<HTMLDivElement, PopoverProps>(\n (props, componentRef) => {\n const {\n children,\n direction: passedDirection = 'upCenter',\n offset: propOffset = 0,\n arrowOffset,\n possibleDirections = directions,\n isInteractive = true,\n onClickOutside,\n spareDirection = 'downStartLeft',\n style,\n className,\n position: passedPosition,\n anchorRef,\n equalAnchorWidth,\n onSetDirection,\n viewportRef,\n container = window.document.body,\n ...otherProps\n } = props;\n\n const viewportElement = viewportRef?.current || document.documentElement;\n\n const ref = React.useRef<HTMLDivElement>(null);\n const { theme } = useTheme();\n\n const [anchorClientRect, setAnchorClientRect] = React.useState<\n DOMRect | undefined\n >();\n const { width, height } = useComponentSize(ref);\n const anchorSize = useComponentSize(anchorRef || { current: null });\n const previousDirectionRef = React.useRef<Direction | null>(null);\n const [bannedDirections, setBannedDirections] = React.useState<\n readonly Direction[]\n >([]);\n\n const resetBannedDirections = () => {\n setBannedDirections((state) => (state.length ? [] : state));\n previousDirectionRef.current = null;\n };\n\n const updateAnchorClientRect = () =>\n setAnchorClientRect(anchorRef?.current?.getBoundingClientRect());\n\n const offset = useMemo(\n () => getOffset(ref, propOffset),\n [propOffset, Boolean(ref.current)],\n );\n\n const { position, direction } = getComputedPositionAndDirection({\n contentSize: { width, height },\n viewportSize: {\n // Размер вьюпорта без скроллбаров\n width: viewportElement.clientWidth,\n height: viewportElement.clientHeight,\n },\n arrowOffset,\n offset,\n direction: passedDirection,\n possibleDirections,\n bannedDirections,\n position: getPointPosition(\n viewportElement,\n anchorClientRect\n ? { x: anchorClientRect.left, y: anchorClientRect.top }\n : passedPosition,\n !!viewportRef?.current,\n ),\n anchorSize,\n spareDirection,\n });\n\n useEffect(() => onSetDirection?.(direction), [direction]);\n\n useEffect(updateAnchorClientRect, [anchorSize]);\n\n usePopoverReposition({\n isActive: true,\n scrollAnchorRef: anchorRef || { current: null },\n onRequestReposition: () => {\n resetBannedDirections();\n updateAnchorClientRect();\n },\n });\n\n /**\n * Может возникнуть ситуация, когда перерасчет поповера всегда будет выдавать 2 направления\n * и бесконечно зацикливать себя. Для избежания таких кейсов мы запоминаем стороны,\n * которые не подошли, чтобы не возвращаться к ним и предотвратить бесконечный ререндер.\n * См. PopoverBannedPositionsStory\n */\n\n useLayoutEffect(() => {\n if (previousDirectionRef.current !== direction) {\n if (\n previousDirectionRef.current &&\n !bannedDirections.includes(previousDirectionRef.current) &&\n !bannedDirections.includes(direction) &&\n direction !== spareDirection\n ) {\n setBannedDirections((state) =>\n previousDirectionRef.current\n ? [...state, previousDirectionRef.current]\n : state,\n );\n }\n previousDirectionRef.current = direction;\n }\n }, [direction]);\n\n // Сбрасываем при любом изменении пропсов, чтобы заново начать перебор направлений\n // Главное не сбрасывать при изменении размеров поповера, т.к. именно оно может вызвать бесконечный перебор\n\n useLayoutEffect(resetBannedDirections, [props]);\n\n const renderPosition = getRenderPosition(\n viewportElement,\n position,\n !!viewportRef?.current,\n width,\n height,\n );\n\n const notVisible = !renderPosition || !height || !width;\n\n return (\n <PortalWithTheme\n {...otherProps}\n preset={theme}\n className={cnPopover({ direction, notVisible }, [className])}\n container={container}\n ref={useForkRef([ref, componentRef])}\n style={{\n ...style,\n ...(notVisible\n ? {}\n : {\n ['--popover-left' as string]: `${renderPosition.x}px`,\n ['--popover-top' as string]: `${renderPosition.y}px`,\n [`--popover-width` as string]: equalAnchorWidth\n ? `${anchorSize.width}px`\n : undefined,\n [`--popover-pointer-events` as string]: isInteractive\n ? undefined\n : 'none',\n [`--popover-visibility` as string]: position\n ? undefined\n : 'hidden',\n }),\n }}\n >\n <ContextConsumer\n onClickOutside={onClickOutside}\n ignoreClicksInsideRefs={[ref, anchorRef || { current: null }]}\n >\n {isRenderProp(children) ? children(direction) : children}\n </ContextConsumer>\n </PortalWithTheme>\n );\n },\n);\n"],"mappings":"knCAAA,sBAEA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,SAA5B,CAAuCC,eAAvC,CAAwDC,OAAxD,KAAuE,OAAvE,CAEA,OACEC,eADF,CAEEC,gBAFF,0BAIA,OAASC,QAAT,sBACA,OAA8BC,eAA9B,mCACA,OAASC,gBAAT,oCACA,OAASC,UAAT,8BACA,OAASC,EAAT,uBACA,OAASC,YAAT,gCACA,OAASC,QAAT,CAAmBC,QAAnB,+BAGA,OACEC,+BADF,CAEEC,gBAFF,CAGEC,iBAHF,iBAKA,OAASC,oBAAT,8BAMA,MAAO,IAAMC,sBAAqB,CAAG,CACnC,YADmC,CAEnC,UAFmC,CAInC,WAJmC,CAKnC,UALmC,CAMnC,SANmC,CAOnC,QAPmC,CASnC,QATmC,CAUnC,YAVmC,CAWnC,UAXmC,CAanC,SAbmC,CAcnC,aAdmC,CAenC,WAfmC,CAA9B,CAkBP,MAAO,IAAMC,oBAAmB,CAAG,CACjC,eADiC,CAEjC,aAFiC,CAIjC,gBAJiC,CAKjC,cALiC,CAOjC,aAPiC,CAQjC,eARiC,CAUjC,cAViC,CAWjC,gBAXiC,CAA5B,CAcP,MAAO,IAAMC,kBAAiB,CAAG,CAC/B,KAD+B,CAE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CAAc,CAACL,CAJvC,4CAKuB7B,CAAgB,WACxCe,CAAU,CAACF,KAD6B,aALvC,+CAQgC,wBAEpC,MAVI,2CAW4Bf,CAAQ,QAExC,QAbI,IAFX,CANP,GAyBE,oBAAC,eAAD,EACE,cAAc,CAAEpB,CADlB,CAEE,sBAAsB,CAAE,CAAChB,CAAD,CAAMqC,CAAS,EAAI,CAAEnC,OAAO,CAAE,IAAX,CAAnB,CAF1B,EAIGd,YAAY,CAAC6B,CAAD,CAAZ,CAAyBA,CAAQ,CAACS,CAAD,CAAjC,CAA+CT,CAJlD,CAzBF,CAiCH,CAhK8B,CAA1B"}
1
+ {"version":3,"file":"Popover.js","names":["React","forwardRef","useEffect","useLayoutEffect","useMemo","PortalWithTheme","usePortalContext","useTheme","useClickOutside","useComponentSize","useForkRef","cn","isRenderProp","isNumber","isString","getComputedPositionAndDirection","getPointPosition","getRenderPosition","usePopoverReposition","directionsStartCenter","directionsStartEdge","popoverPropOffset","directions","getOffset","ref","propOffset","current","cssVar","getComputedStyle","getPropertyValue","test","slice","length","fontSize","parseFloat","document","documentElement","rem","em","ContextConsumer","onClickOutside","children","ignoreClicksInsideRefs","refs","isActive","handler","cnPopover","Popover","props","componentRef","direction","passedDirection","offset","arrowOffset","possibleDirections","isInteractive","spareDirection","style","className","passedPosition","position","anchorRef","equalAnchorWidth","onSetDirection","viewportRef","container","window","body","otherProps","viewportElement","useRef","theme","useState","anchorClientRect","setAnchorClientRect","width","height","anchorSize","previousDirectionRef","bannedDirections","setBannedDirections","resetBannedDirections","state","updateAnchorClientRect","getBoundingClientRect","contentSize","viewportSize","clientWidth","clientHeight","x","left","y","top","scrollAnchorRef","onRequestReposition","includes","renderPosition","notVisible"],"sources":["../../../../../src/components/Popover/Popover.tsx"],"sourcesContent":["import './Popover.css';\n\nimport React, { forwardRef, useEffect, useLayoutEffect, useMemo } from 'react';\n\nimport {\n PortalWithTheme,\n usePortalContext,\n} from '##/components/PortalWithTheme';\nimport { useTheme } from '##/components/Theme/Theme';\nimport { ClickOutsideHandler, useClickOutside } from '##/hooks/useClickOutside';\nimport { useComponentSize } from '##/hooks/useComponentSize';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { cn } from '##/utils/bem';\nimport { isRenderProp } from '##/utils/isRenderProp';\nimport { isNumber, isString } from '##/utils/type-guards';\nimport { PropsWithJsxAttributes } from '##/utils/types/PropsWithJsxAttributes';\n\nimport {\n getComputedPositionAndDirection,\n getPointPosition,\n getRenderPosition,\n} from './helpers';\nimport { usePopoverReposition } from './usePopoverReposition';\n\n/**\n * Стороны упорядочены по приоритету:\n * Используется первая сторона, в которую смог вписаться поповер.\n */\nexport const directionsStartCenter = [\n 'downCenter',\n 'upCenter',\n\n 'downRight',\n 'downLeft',\n 'upRight',\n 'upLeft',\n\n 'leftUp',\n 'leftCenter',\n 'leftDown',\n\n 'rightUp',\n 'rightCenter',\n 'rightDown',\n] as const;\n\nexport const directionsStartEdge = [\n 'downStartLeft',\n 'upStartLeft',\n\n 'downStartRight',\n 'upStartRight',\n\n 'leftStartUp',\n 'leftStartDown',\n\n 'rightStartUp',\n 'rightStartDown',\n] as const;\n\nexport const popoverPropOffset = [\n '3xs',\n '2xs',\n 'xs',\n 's',\n 'm',\n 'l',\n 'xl',\n '2xl',\n '3xl',\n '4xl',\n '5xl',\n '6xl',\n] as const;\nexport type PopoverPropOffset = typeof popoverPropOffset[number] | number;\n\nexport const directions = [...directionsStartCenter, ...directionsStartEdge];\n\nexport type Direction = typeof directions[number];\n\nexport type Position = { x: number; y: number } | undefined;\n\nexport type PositioningProps =\n | {\n anchorRef: React.RefObject<HTMLElement>;\n equalAnchorWidth?: boolean;\n position?: never;\n }\n | {\n anchorRef?: never;\n equalAnchorWidth?: never;\n position: Position;\n };\n\ntype ChildrenRenderProp = (direction: Direction) => React.ReactNode;\n\nexport type PopoverProps = PropsWithJsxAttributes<\n {\n direction?: Direction;\n spareDirection?: Direction;\n offset?: PopoverPropOffset;\n arrowOffset?: number;\n possibleDirections?: readonly Direction[];\n isInteractive?: boolean;\n children: React.ReactNode | ChildrenRenderProp;\n onClickOutside?: ClickOutsideHandler;\n onSetDirection?: (direction: Direction) => void;\n viewportRef?: React.RefObject<HTMLElement>;\n container?: Element;\n } & PositioningProps\n>;\n\nexport type Props = PopoverProps; // удалить при мажоре\n\nconst getOffset = (\n ref: React.RefObject<HTMLDivElement>,\n propOffset: PopoverPropOffset,\n) => {\n if (isNumber(propOffset)) {\n return propOffset;\n }\n\n if (isString(propOffset) && ref.current) {\n const cssVar = getComputedStyle(ref.current).getPropertyValue(\n `--space-${propOffset}`,\n );\n\n if (cssVar && /px$/.test(cssVar)) {\n return Number(cssVar.slice(0, cssVar.length - 2));\n }\n\n if (cssVar && /rem$/.test(cssVar)) {\n const fontSize = parseFloat(\n getComputedStyle(document.documentElement).fontSize,\n );\n const rem = Number(cssVar.slice(0, cssVar.length - 3));\n\n return fontSize * rem;\n }\n\n if (cssVar && /em$/.test(cssVar)) {\n const fontSize = parseFloat(getComputedStyle(ref.current).fontSize);\n const em = Number(cssVar.slice(0, cssVar.length - 2));\n\n return fontSize * em;\n }\n\n return 0;\n }\n\n return 0;\n};\n\n/**\n * Подписчик на PortalWithThemeProvider\n * получает рефы всех вложенных порталов во всплывающем окне\n * для дальнейшего исключения их из useClickOutside\n */\nconst ContextConsumer: React.FC<{\n onClickOutside?: (event: MouseEvent) => void;\n ignoreClicksInsideRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;\n children: React.ReactNode;\n}> = ({ onClickOutside, children, ignoreClicksInsideRefs }) => {\n const { refs } = usePortalContext();\n\n useClickOutside({\n isActive: !!onClickOutside,\n ignoreClicksInsideRefs: [\n ...(ignoreClicksInsideRefs || []),\n ...(refs || []),\n ],\n handler: onClickOutside,\n });\n\n return children as React.ReactNode;\n};\n\nconst cnPopover = cn('Popover');\n\nexport const Popover = forwardRef<HTMLDivElement, PopoverProps>(\n (props, componentRef) => {\n const {\n children,\n direction: passedDirection = 'upCenter',\n offset: propOffset = 0,\n arrowOffset,\n possibleDirections = directions,\n isInteractive = true,\n onClickOutside,\n spareDirection = 'downStartLeft',\n style,\n className,\n position: passedPosition,\n anchorRef,\n equalAnchorWidth,\n onSetDirection,\n viewportRef,\n container = window.document.body,\n ...otherProps\n } = props;\n\n const viewportElement = viewportRef?.current || document.documentElement;\n\n const ref = React.useRef<HTMLDivElement>(null);\n const { theme } = useTheme();\n\n const [anchorClientRect, setAnchorClientRect] = React.useState<\n DOMRect | undefined\n >();\n const { width, height } = useComponentSize(ref);\n const anchorSize = useComponentSize(anchorRef || { current: null });\n const previousDirectionRef = React.useRef<Direction | null>(null);\n const [bannedDirections, setBannedDirections] = React.useState<\n readonly Direction[]\n >([]);\n\n const resetBannedDirections = () => {\n setBannedDirections((state) => (state.length ? [] : state));\n previousDirectionRef.current = null;\n };\n\n const updateAnchorClientRect = () =>\n setAnchorClientRect(anchorRef?.current?.getBoundingClientRect());\n\n const offset = useMemo(\n () => getOffset(ref, propOffset),\n [propOffset, Boolean(ref.current)],\n );\n\n const { position, direction } = getComputedPositionAndDirection({\n contentSize: { width, height },\n viewportSize: {\n // Размер вьюпорта без скроллбаров\n width: viewportElement.clientWidth,\n height: viewportElement.clientHeight,\n },\n arrowOffset,\n offset,\n direction: passedDirection,\n possibleDirections,\n bannedDirections,\n position: getPointPosition(\n viewportElement,\n anchorClientRect\n ? { x: anchorClientRect.left, y: anchorClientRect.top }\n : passedPosition,\n !!viewportRef?.current,\n ),\n anchorSize,\n spareDirection,\n });\n\n useEffect(() => onSetDirection?.(direction), [direction]);\n\n useEffect(updateAnchorClientRect, [anchorSize]);\n\n usePopoverReposition({\n isActive: true,\n scrollAnchorRef: anchorRef || { current: null },\n onRequestReposition: () => {\n resetBannedDirections();\n updateAnchorClientRect();\n },\n });\n\n /**\n * Может возникнуть ситуация, когда перерасчет поповера всегда будет выдавать 2 направления\n * и бесконечно зацикливать себя. Для избежания таких кейсов мы запоминаем стороны,\n * которые не подошли, чтобы не возвращаться к ним и предотвратить бесконечный ререндер.\n * См. PopoverBannedPositionsStory\n */\n\n useLayoutEffect(() => {\n if (previousDirectionRef.current !== direction) {\n if (\n previousDirectionRef.current &&\n !bannedDirections.includes(previousDirectionRef.current) &&\n !bannedDirections.includes(direction) &&\n direction !== spareDirection\n ) {\n setBannedDirections((state) =>\n previousDirectionRef.current\n ? [...state, previousDirectionRef.current]\n : state,\n );\n }\n previousDirectionRef.current = direction;\n }\n }, [direction]);\n\n // Сбрасываем при любом изменении пропсов, чтобы заново начать перебор направлений\n // Главное не сбрасывать при изменении размеров поповера, т.к. именно оно может вызвать бесконечный перебор\n\n useLayoutEffect(resetBannedDirections, [props]);\n\n const renderPosition = getRenderPosition(\n viewportElement,\n position,\n !!viewportRef?.current,\n width,\n height,\n );\n\n const notVisible = !renderPosition || !height || !width;\n\n return (\n <PortalWithTheme\n {...otherProps}\n preset={theme}\n className={cnPopover({ direction, notVisible }, [className])}\n container={container}\n ref={useForkRef([ref, componentRef])}\n style={{\n ...style,\n ...(notVisible\n ? {}\n : {\n ['--popover-left' as string]: `${renderPosition.x}px`,\n ['--popover-top' as string]: `${renderPosition.y}px`,\n [`--popover-width` as string]: equalAnchorWidth\n ? `${anchorSize.width}px`\n : undefined,\n [`--popover-pointer-events` as string]: isInteractive\n ? undefined\n : 'none',\n [`--popover-visibility` as string]: position\n ? undefined\n : 'hidden',\n }),\n }}\n >\n <ContextConsumer\n onClickOutside={onClickOutside}\n ignoreClicksInsideRefs={[ref, anchorRef || { current: null }]}\n >\n {isRenderProp(children) ? children(direction) : children}\n </ContextConsumer>\n </PortalWithTheme>\n );\n },\n);\n"],"mappings":"knCAAA,sBAEA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,SAA5B,CAAuCC,eAAvC,CAAwDC,OAAxD,KAAuE,OAAvE,CAEA,OACEC,eADF,CAEEC,gBAFF,0BAIA,OAASC,QAAT,sBACA,OAA8BC,eAA9B,mCACA,OAASC,gBAAT,oCACA,OAASC,UAAT,8BAC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