@consta/uikit 5.13.0 → 5.15.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 (403) hide show
  1. package/FieldComponents/index.d.ts +1 -0
  2. package/FieldComponents/index.js +1 -0
  3. package/TextFieldCanary/index.d.ts +1 -0
  4. package/TextFieldCanary/index.js +1 -0
  5. package/__internal__/src/components/AutoComplete/helpers.d.ts +1 -1
  6. package/__internal__/src/components/AutoComplete/types.d.ts +1 -1
  7. package/__internal__/src/components/AutoComplete/types.js.map +1 -1
  8. package/__internal__/src/components/AutoComplete/useAutoComplete.d.ts +1 -1
  9. package/__internal__/src/components/AutoComplete/useAutoComplete.js +1 -1
  10. package/__internal__/src/components/AutoComplete/useAutoComplete.js.map +1 -1
  11. package/__internal__/src/components/AutoCompleteCanary/helpers.d.ts +1 -1
  12. package/__internal__/src/components/AutoCompleteCanary/types.d.ts +1 -1
  13. package/__internal__/src/components/AutoCompleteCanary/types.js.map +1 -1
  14. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.d.ts +1 -1
  15. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.js +1 -1
  16. package/__internal__/src/components/AutoCompleteCanary/useAutoComplete.js.map +1 -1
  17. package/__internal__/src/components/AvatarGroup/AvatarGroup.js.map +1 -1
  18. package/__internal__/src/components/Badge/Badge.css +1 -1
  19. package/__internal__/src/components/Badge/Badge.d.ts +2 -31
  20. package/__internal__/src/components/Badge/Badge.js +1 -1
  21. package/__internal__/src/components/Badge/Badge.js.map +1 -1
  22. package/__internal__/src/components/Badge/cn.d.ts +1 -0
  23. package/__internal__/src/components/Badge/cn.js +2 -0
  24. package/__internal__/src/components/Badge/cn.js.map +1 -0
  25. package/__internal__/src/components/Badge/guardStatus.d.ts +2 -0
  26. package/__internal__/src/components/Badge/guardStatus.js +2 -0
  27. package/__internal__/src/components/Badge/guardStatus.js.map +1 -0
  28. package/__internal__/src/components/Badge/index.d.ts +2 -0
  29. package/__internal__/src/components/Badge/index.js +1 -1
  30. package/__internal__/src/components/Badge/index.js.map +1 -1
  31. package/__internal__/src/components/Badge/maps.d.ts +9 -0
  32. package/__internal__/src/components/Badge/maps.js +2 -0
  33. package/__internal__/src/components/Badge/maps.js.map +1 -0
  34. package/__internal__/src/components/Badge/types.d.ts +31 -0
  35. package/__internal__/src/components/Badge/types.js +2 -0
  36. package/__internal__/src/components/Badge/types.js.map +1 -0
  37. package/__internal__/src/components/BadgeGroup/BadgeGroup.js +1 -1
  38. package/__internal__/src/components/BadgeGroup/BadgeGroup.js.map +1 -1
  39. package/__internal__/src/components/BadgeGroup/types.d.ts +4 -1
  40. package/__internal__/src/components/BadgeGroup/types.js.map +1 -1
  41. package/__internal__/src/components/BookmarkTabs/BookmarkTabs.js.map +1 -1
  42. package/__internal__/src/components/Breadcrumbs/BreadcrumbsItem/BreadcrumbsItem.css +1 -1
  43. package/__internal__/src/components/Checkbox/Checkbox.css +1 -1
  44. package/__internal__/src/components/CheckboxDeprecated/Checkbox.css +2 -2
  45. package/__internal__/src/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  46. package/__internal__/src/components/Chips/types.d.ts +8 -2
  47. package/__internal__/src/components/Chips/types.js.map +1 -1
  48. package/__internal__/src/components/Collapse/types.d.ts +1 -1
  49. package/__internal__/src/components/Collapse/types.js.map +1 -1
  50. package/__internal__/src/components/Combobox/Combobox.js +1 -1
  51. package/__internal__/src/components/Combobox/Combobox.js.map +1 -1
  52. package/__internal__/src/components/Combobox/helpers.d.ts +2 -2
  53. package/__internal__/src/components/Combobox/helpers.js.map +1 -1
  54. package/__internal__/src/components/ComboboxDeprecated/ComboboxDeprecated.js +1 -1
  55. package/__internal__/src/components/ComboboxDeprecated/ComboboxDeprecated.js.map +1 -1
  56. package/__internal__/src/components/ContextMenu/ContextMenuLevel/ContextMenuLevel.js +1 -1
  57. package/__internal__/src/components/ContextMenu/ContextMenuLevel/ContextMenuLevel.js.map +1 -1
  58. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.js +1 -1
  59. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.js.map +1 -1
  60. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.css +1 -1
  61. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.js +1 -1
  62. package/__internal__/src/components/ContextMenu/ContextMenuWrapper/ContextMenuWrapper.js.map +1 -1
  63. package/__internal__/src/components/DatePicker/DatePickerDropdown/DatePickerDropdown.css +1 -1
  64. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
  65. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
  66. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
  67. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  68. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
  69. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
  70. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js +1 -1
  71. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js.map +1 -1
  72. package/__internal__/src/components/DateTime/DateTime10Years/DateTime10Years.css +1 -1
  73. package/__internal__/src/components/DateTime/DateTimeCell/DateTimeCell.css +1 -1
  74. package/__internal__/src/components/DateTime/DateTimeMonth/DateTimeMonth.css +1 -1
  75. package/__internal__/src/components/DateTime/DateTimeTimeColumn/DateTimeTimeColumn.css +1 -1
  76. package/__internal__/src/components/DateTime/DateTimeTimeColumn/DateTimeTimeColumn.js +1 -1
  77. package/__internal__/src/components/DateTime/DateTimeTimeColumn/DateTimeTimeColumn.js.map +1 -1
  78. package/__internal__/src/components/DateTime/DateTimeTimeColumn/useScrollToElement/useScrollToElement.js.map +1 -1
  79. package/__internal__/src/components/DateTime/DateTimeTypeTime/DateTimeTypeTime.css +1 -1
  80. package/__internal__/src/components/DateTime/DateTimeTypeTime/DateTimeTypeTime.js.map +1 -1
  81. package/__internal__/src/components/DateTime/DateTimeYear/DateTimeYear.css +1 -1
  82. package/__internal__/src/components/DateTime/helpers/getSliderValueRange.js +1 -1
  83. package/__internal__/src/components/DateTime/helpers/getSliderValueRange.js.map +1 -1
  84. package/__internal__/src/components/DragNDropField/DragNDropField.js +1 -1
  85. package/__internal__/src/components/DragNDropField/DragNDropField.js.map +1 -1
  86. package/__internal__/src/components/DragNDropField/formatAccept.js.map +1 -1
  87. package/__internal__/src/components/DragNDropField/locale.d.ts +1 -1
  88. package/__internal__/src/components/DragNDropField/locale.js +1 -1
  89. package/__internal__/src/components/DragNDropField/locale.js.map +1 -1
  90. package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldCanary.js +1 -1
  91. package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldCanary.js.map +1 -1
  92. package/__internal__/src/components/DragNDropFieldCanary/renderChildren.d.ts +3 -0
  93. package/__internal__/src/components/DragNDropFieldCanary/renderChildren.js +2 -0
  94. package/__internal__/src/components/DragNDropFieldCanary/renderChildren.js.map +1 -0
  95. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/FieldArrayValueInlineControl.js +1 -1
  96. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/FieldArrayValueInlineControl.js.map +1 -1
  97. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.d.ts +2 -1
  98. package/__internal__/src/components/FieldComponents/FieldArrayValueInlineControl/types.js.map +1 -1
  99. package/__internal__/src/components/FieldComponents/FieldComponents.d.ts +15 -0
  100. package/__internal__/src/components/FieldComponents/FieldComponents.js +2 -0
  101. package/__internal__/src/components/FieldComponents/FieldComponents.js.map +1 -0
  102. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.css +1 -1
  103. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js +1 -1
  104. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.js.map +1 -1
  105. package/__internal__/src/components/FieldComponents/FieldControlLayout/helpers.js.map +1 -1
  106. package/__internal__/src/components/FieldComponents/FieldWrapper/FieldWrapper.js +1 -1
  107. package/__internal__/src/components/FieldComponents/FieldWrapper/FieldWrapper.js.map +1 -1
  108. package/__internal__/src/components/FieldComponents/index.d.ts +1 -15
  109. package/__internal__/src/components/FieldComponents/index.js +1 -1
  110. package/__internal__/src/components/FieldComponents/index.js.map +1 -1
  111. package/__internal__/src/components/Grid/helpers.js.map +1 -1
  112. package/__internal__/src/components/Informer/Informer.css +1 -1
  113. package/__internal__/src/components/Informer/Informer.d.ts +1 -1
  114. package/__internal__/src/components/Informer/Informer.js +1 -1
  115. package/__internal__/src/components/Informer/Informer.js.map +1 -1
  116. package/__internal__/src/components/Layout/useFixed.js +1 -1
  117. package/__internal__/src/components/Layout/useFixed.js.map +1 -1
  118. package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.js +1 -1
  119. package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.js.map +1 -1
  120. package/__internal__/src/components/ListCanary/ListBox/ListBox.js +1 -1
  121. package/__internal__/src/components/ListCanary/ListBox/ListBox.js.map +1 -1
  122. package/__internal__/src/components/ListCanary/ListBox/index.d.ts +1 -1
  123. package/__internal__/src/components/ListCanary/ListBox/index.js +1 -1
  124. package/__internal__/src/components/ListCanary/ListBox/index.js.map +1 -1
  125. package/__internal__/src/components/ListCanary/ListBox/{mapVerticalSpase.d.ts → mapVerticalSpace.d.ts} +1 -1
  126. package/__internal__/src/components/ListCanary/ListBox/mapVerticalSpace.js +2 -0
  127. package/__internal__/src/components/ListCanary/ListBox/mapVerticalSpace.js.map +1 -0
  128. package/__internal__/src/components/ListCanary/ListCanary.js +1 -1
  129. package/__internal__/src/components/ListCanary/ListCanary.js.map +1 -1
  130. package/__internal__/src/components/ListCanary/ListDivider/ListDivider.js +1 -1
  131. package/__internal__/src/components/ListCanary/ListDivider/ListDivider.js.map +1 -1
  132. package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.js +1 -1
  133. package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.js.map +1 -1
  134. package/__internal__/src/components/ListCanary/ListItem/ListItem.js +1 -1
  135. package/__internal__/src/components/ListCanary/ListItem/ListItem.js.map +1 -1
  136. package/__internal__/src/components/ListCanary/ListLoader/ListLoader.js +1 -1
  137. package/__internal__/src/components/ListCanary/ListLoader/ListLoader.js.map +1 -1
  138. package/__internal__/src/components/ListCanary/helper.d.ts +3 -3
  139. package/__internal__/src/components/ListCanary/maps.d.ts +4 -4
  140. package/__internal__/src/components/ListCanary/maps.js +1 -1
  141. package/__internal__/src/components/ListCanary/maps.js.map +1 -1
  142. package/__internal__/src/components/ListCanary/renderHeader.d.ts +1 -1
  143. package/__internal__/src/components/ListCanary/renderHeader.js.map +1 -1
  144. package/__internal__/src/components/ListCanary/types.d.ts +3 -3
  145. package/__internal__/src/components/ListCanary/types.js.map +1 -1
  146. package/__internal__/src/components/Pagination/Pagination.js.map +1 -1
  147. package/__internal__/src/components/Pagination/PaginationList/PaginationList.css +1 -1
  148. package/__internal__/src/components/Pagination/PaginationList/PaginationList.js +1 -1
  149. package/__internal__/src/components/Pagination/PaginationList/PaginationList.js.map +1 -1
  150. package/__internal__/src/components/Pagination/helpers.js.map +1 -1
  151. package/__internal__/src/components/Pagination/usePaginationItems.js.map +1 -1
  152. package/__internal__/src/components/Popover/Popover.d.ts +2 -1
  153. package/__internal__/src/components/Popover/Popover.js +1 -1
  154. package/__internal__/src/components/Popover/Popover.js.map +1 -1
  155. package/__internal__/src/components/Popover/helpers.d.ts +1 -1
  156. package/__internal__/src/components/Popover/helpers.js +1 -1
  157. package/__internal__/src/components/Popover/helpers.js.map +1 -1
  158. package/__internal__/src/components/Popover/usePopoverReposition.d.ts +2 -2
  159. package/__internal__/src/components/Popover/usePopoverReposition.js.map +1 -1
  160. package/__internal__/src/components/PortalWithTheme/PortalWithTheme.js.map +1 -1
  161. package/__internal__/src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.d.ts +4 -4
  162. package/__internal__/src/components/PortalWithTheme/PortalWithThemeContext/PortalWithThemeContext.js.map +1 -1
  163. package/__internal__/src/components/ProgressLine/helpers.js.map +1 -1
  164. package/__internal__/src/components/ProgressLine/types.d.ts +2 -2
  165. package/__internal__/src/components/ProgressLine/types.js.map +1 -1
  166. package/__internal__/src/components/ProgressStepBar/helpers.d.ts +3 -3
  167. package/__internal__/src/components/ProgressStepBar/helpers.js.map +1 -1
  168. package/__internal__/src/components/Select/helpers.d.ts +2 -2
  169. package/__internal__/src/components/Select/helpers.js.map +1 -1
  170. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.d.ts +3 -3
  171. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js +1 -1
  172. package/__internal__/src/components/SelectComponents/SelectDropdown/SelectDropdown.js.map +1 -1
  173. package/__internal__/src/components/SelectComponents/helpers.d.ts +2 -2
  174. package/__internal__/src/components/SelectComponents/helpers.js +1 -1
  175. package/__internal__/src/components/SelectComponents/helpers.js.map +1 -1
  176. package/__internal__/src/components/SelectComponents/useSelect/useSelect.d.ts +1 -1
  177. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js +1 -1
  178. package/__internal__/src/components/SelectComponents/useSelect/useSelect.js.map +1 -1
  179. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.d.ts +2 -2
  180. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js +1 -1
  181. package/__internal__/src/components/SelectComponentsDeprecated/SelectDropdown/SelectDropdown.js.map +1 -1
  182. package/__internal__/src/components/SelectComponentsDeprecated/helpers.d.ts +2 -2
  183. package/__internal__/src/components/SelectComponentsDeprecated/helpers.js +1 -1
  184. package/__internal__/src/components/SelectComponentsDeprecated/helpers.js.map +1 -1
  185. package/__internal__/src/components/Slider/Slider.js +1 -1
  186. package/__internal__/src/components/Slider/Slider.js.map +1 -1
  187. package/__internal__/src/components/Slider/helper.d.ts +6 -6
  188. package/__internal__/src/components/Slider/helper.js +1 -1
  189. package/__internal__/src/components/Slider/helper.js.map +1 -1
  190. package/__internal__/src/components/Slider/useSlider/helper.d.ts +2 -2
  191. package/__internal__/src/components/Slider/useSlider/helper.js +1 -1
  192. package/__internal__/src/components/Slider/useSlider/helper.js.map +1 -1
  193. package/__internal__/src/components/Slider/useSlider/useSlider.js +1 -1
  194. package/__internal__/src/components/Slider/useSlider/useSlider.js.map +1 -1
  195. package/__internal__/src/components/Slider/useSliderStationing.js.map +1 -1
  196. package/__internal__/src/components/SnackBar/SnackBar.js +1 -1
  197. package/__internal__/src/components/SnackBar/SnackBar.js.map +1 -1
  198. package/__internal__/src/components/SnackBar/SnackBarActionButton/SnackBarActionButton.js +1 -1
  199. package/__internal__/src/components/SnackBar/SnackBarActionButton/SnackBarActionButton.js.map +1 -1
  200. package/__internal__/src/components/SnackBar/SnackBarActionButton/index.d.ts +1 -0
  201. package/__internal__/src/components/SnackBar/SnackBarActionButton/index.js +2 -0
  202. package/__internal__/src/components/SnackBar/SnackBarActionButton/index.js.map +1 -0
  203. package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.css +1 -1
  204. package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.d.ts +0 -1
  205. package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.js +1 -1
  206. package/__internal__/src/components/SnackBar/SnackBarItem/SnackBarItem.js.map +1 -1
  207. package/__internal__/src/components/SnackBar/SnackBarItem/index.d.ts +1 -0
  208. package/__internal__/src/components/SnackBar/SnackBarItem/index.js +2 -0
  209. package/__internal__/src/components/SnackBar/SnackBarItem/index.js.map +1 -0
  210. package/__internal__/src/components/SnackBar/SnackBarLine/SnackBarLine.js.map +1 -1
  211. package/__internal__/src/components/SnackBar/SnackBarLine/index.d.ts +1 -0
  212. package/__internal__/src/components/SnackBar/SnackBarLine/index.js +2 -0
  213. package/__internal__/src/components/SnackBar/SnackBarLine/index.js.map +1 -0
  214. package/__internal__/src/components/SnackBar/SnackBarProgress/SnackBarProgress.css +1 -0
  215. package/__internal__/src/components/SnackBar/SnackBarProgress/SnackBarProgress.d.ts +4 -0
  216. package/__internal__/src/components/SnackBar/SnackBarProgress/SnackBarProgress.js +2 -0
  217. package/__internal__/src/components/SnackBar/SnackBarProgress/SnackBarProgress.js.map +1 -0
  218. package/__internal__/src/components/SnackBar/SnackBarProgress/index.d.ts +1 -0
  219. package/__internal__/src/components/SnackBar/SnackBarProgress/index.js +2 -0
  220. package/__internal__/src/components/SnackBar/SnackBarProgress/index.js.map +1 -0
  221. package/__internal__/src/components/SnackBar/SnackBarTimer/SnackBarTimer.js +1 -1
  222. package/__internal__/src/components/SnackBar/SnackBarTimer/SnackBarTimer.js.map +1 -1
  223. package/__internal__/src/components/SnackBar/SnackBarTimer/index.d.ts +1 -0
  224. package/__internal__/src/components/SnackBar/SnackBarTimer/index.js +2 -0
  225. package/__internal__/src/components/SnackBar/SnackBarTimer/index.js.map +1 -0
  226. package/__internal__/src/components/SnackBar/helper.d.ts +4 -1
  227. package/__internal__/src/components/SnackBar/helper.js +1 -1
  228. package/__internal__/src/components/SnackBar/helper.js.map +1 -1
  229. package/__internal__/src/components/SnackBar/types.d.ts +15 -0
  230. package/__internal__/src/components/SnackBar/types.js +1 -1
  231. package/__internal__/src/components/SnackBar/types.js.map +1 -1
  232. package/__internal__/src/components/Spoiler/types.d.ts +4 -4
  233. package/__internal__/src/components/Spoiler/types.js +1 -1
  234. package/__internal__/src/components/Spoiler/types.js.map +1 -1
  235. package/__internal__/src/components/Steps/Steps.d.ts +2 -2
  236. package/__internal__/src/components/Steps/Steps.js.map +1 -1
  237. package/__internal__/src/components/Steps/StepsStep/StepsStep.js +1 -1
  238. package/__internal__/src/components/Steps/StepsStep/StepsStep.js.map +1 -1
  239. package/__internal__/src/components/Steps/types.d.ts +1 -1
  240. package/__internal__/src/components/Steps/types.js.map +1 -1
  241. package/__internal__/src/components/Table/Header/TableHeader.js +1 -1
  242. package/__internal__/src/components/Table/Header/TableHeader.js.map +1 -1
  243. package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
  244. package/__internal__/src/components/Table/Table.css +1 -1
  245. package/__internal__/src/components/Table/Table.js +1 -1
  246. package/__internal__/src/components/Table/Table.js.map +1 -1
  247. package/__internal__/src/components/Table/__mock__/data.mock.d.ts +1 -1
  248. package/__internal__/src/components/Table/__mock__/data.mock.js +1 -1
  249. package/__internal__/src/components/Table/__mock__/data.mock.js.map +1 -1
  250. package/__internal__/src/components/Table/helpers.d.ts +2 -2
  251. package/__internal__/src/components/Table/helpers.js +1 -1
  252. package/__internal__/src/components/Table/helpers.js.map +1 -1
  253. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js +1 -1
  254. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js.map +1 -1
  255. package/__internal__/src/components/TagBase/TagBase.css +1 -1
  256. package/__internal__/src/components/TextField/TextField.js +1 -1
  257. package/__internal__/src/components/TextField/TextField.js.map +1 -1
  258. package/__internal__/src/components/TextField/helpers.d.ts +1 -1
  259. package/__internal__/src/components/TextField/helpers.js.map +1 -1
  260. package/__internal__/src/components/TextFieldCanary/{TextField.js → TextFieldCanary.js} +1 -1
  261. package/__internal__/src/components/TextFieldCanary/TextFieldCanary.js.map +1 -0
  262. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js +1 -1
  263. package/__internal__/src/components/TextFieldCanary/TextFieldTypeNumber/TextFieldTypeNumber.js.map +1 -1
  264. package/__internal__/src/components/TextFieldCanary/TextFieldTypePassword/TextFieldTypePassword.js +1 -1
  265. package/__internal__/src/components/TextFieldCanary/TextFieldTypePassword/TextFieldTypePassword.js.map +1 -1
  266. package/__internal__/src/components/TextFieldCanary/TextFieldTypeText/TextFieldTypeText.js +1 -1
  267. package/__internal__/src/components/TextFieldCanary/TextFieldTypeText/TextFieldTypeText.js.map +1 -1
  268. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.css +3 -3
  269. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.js +1 -1
  270. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArea/TextFieldTypeTextArea.js.map +1 -1
  271. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.css +1 -1
  272. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js +1 -1
  273. package/__internal__/src/components/TextFieldCanary/TextFieldTypeTextArray/TextFieldTypeTextArray.js.map +1 -1
  274. package/__internal__/src/components/TextFieldCanary/index.d.ts +1 -1
  275. package/__internal__/src/components/TextFieldCanary/index.js +1 -1
  276. package/__internal__/src/components/TextFieldCanary/index.js.map +1 -1
  277. package/__internal__/src/components/TextFieldCanary/types.d.ts +1 -0
  278. package/__internal__/src/components/TextFieldCanary/types.js.map +1 -1
  279. package/__internal__/src/components/UserSelect/UserSelect.js +1 -1
  280. package/__internal__/src/components/UserSelect/UserSelect.js.map +1 -1
  281. package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.js +1 -1
  282. package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.js.map +1 -1
  283. package/__internal__/src/components/UserSelect/helpers.d.ts +2 -2
  284. package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
  285. package/__internal__/src/components/UserSelectDeprecated/UserSelectDeprecated.js +1 -1
  286. package/__internal__/src/components/UserSelectDeprecated/UserSelectDeprecated.js.map +1 -1
  287. package/__internal__/src/components/UserSelectDeprecated/UserSelectItem/UserSelectItem.js +1 -1
  288. package/__internal__/src/components/UserSelectDeprecated/UserSelectItem/UserSelectItem.js.map +1 -1
  289. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  290. package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/addPrefix.js.map +1 -1
  291. package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/getLastPoint.js.map +1 -1
  292. package/__internal__/src/hooks/useBreakpointsDeprecated/index.d.ts +3 -0
  293. package/__internal__/src/hooks/useBreakpointsDeprecated/index.js +2 -0
  294. package/__internal__/src/hooks/useBreakpointsDeprecated/index.js.map +1 -0
  295. package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/mapping.js.map +1 -1
  296. package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/types.js.map +1 -1
  297. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +2 -0
  298. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.js +2 -0
  299. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.js.map +1 -0
  300. package/__internal__/src/hooks/useBreakpointsDepricated/index.d.ts +0 -2
  301. package/__internal__/src/hooks/useBreakpointsDepricated/index.js +1 -1
  302. package/__internal__/src/hooks/useBreakpointsDepricated/index.js.map +1 -1
  303. package/__internal__/src/hooks/useBreakpointsDepricated/useBreakpointsDepricated.d.ts +1 -2
  304. package/__internal__/src/hooks/useBreakpointsDepricated/useBreakpointsDepricated.js +1 -1
  305. package/__internal__/src/hooks/useBreakpointsDepricated/useBreakpointsDepricated.js.map +1 -1
  306. package/__internal__/src/hooks/useChoiceGroup/useChoiceGroup.js.map +1 -1
  307. package/__internal__/src/hooks/useClickOutside/useClickOutside.js.map +1 -1
  308. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/index.d.ts +2 -0
  309. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/index.js +2 -0
  310. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/index.js.map +1 -0
  311. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/useComponentBreakpointsDeprecated.d.ts +2 -0
  312. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/useComponentBreakpointsDeprecated.js +2 -0
  313. package/__internal__/src/hooks/useComponentBreakpointsDeprecated/useComponentBreakpointsDeprecated.js.map +1 -0
  314. package/__internal__/src/hooks/useComponentBreakpointsDepricated/index.d.ts +0 -1
  315. package/__internal__/src/hooks/useComponentBreakpointsDepricated/index.js +1 -1
  316. package/__internal__/src/hooks/useComponentBreakpointsDepricated/index.js.map +1 -1
  317. package/__internal__/src/hooks/useComponentBreakpointsDepricated/useComponentBreakpointsDepricated.d.ts +1 -2
  318. package/__internal__/src/hooks/useComponentBreakpointsDepricated/useComponentBreakpointsDepricated.js +1 -1
  319. package/__internal__/src/hooks/useComponentBreakpointsDepricated/useComponentBreakpointsDepricated.js.map +1 -1
  320. package/__internal__/src/hooks/useHideElementsInLineDeprecated/index.d.ts +1 -0
  321. package/__internal__/src/hooks/useHideElementsInLineDeprecated/index.js +2 -0
  322. package/__internal__/src/hooks/useHideElementsInLineDeprecated/index.js.map +1 -0
  323. package/__internal__/src/hooks/useHideElementsInLineDeprecated/useHideElementsInLineDeprecated.d.ts +10 -0
  324. package/__internal__/src/hooks/useHideElementsInLineDeprecated/useHideElementsInLineDeprecated.js +2 -0
  325. package/__internal__/src/hooks/useHideElementsInLineDeprecated/useHideElementsInLineDeprecated.js.map +1 -0
  326. package/__internal__/src/hooks/useHideElementsInLineDepricated/index.js.map +1 -1
  327. package/__internal__/src/hooks/useHideElementsInLineDepricated/useHideElementsInLineDepricated.d.ts +1 -10
  328. package/__internal__/src/hooks/useHideElementsInLineDepricated/useHideElementsInLineDepricated.js +1 -1
  329. package/__internal__/src/hooks/useHideElementsInLineDepricated/useHideElementsInLineDepricated.js.map +1 -1
  330. package/__internal__/src/hooks/useKeysDeprecated/index.d.ts +1 -0
  331. package/__internal__/src/hooks/useKeysDeprecated/index.js +2 -0
  332. package/__internal__/src/hooks/useKeysDeprecated/index.js.map +1 -0
  333. package/__internal__/src/hooks/useKeysDeprecated/useKeysDeprecated.d.ts +18 -0
  334. package/__internal__/src/hooks/useKeysDeprecated/useKeysDeprecated.js +2 -0
  335. package/__internal__/src/hooks/useKeysDeprecated/useKeysDeprecated.js.map +1 -0
  336. package/__internal__/src/hooks/useKeysDepricated/index.js.map +1 -1
  337. package/__internal__/src/hooks/useKeysDepricated/useKeysDepricated.d.ts +1 -18
  338. package/__internal__/src/hooks/useKeysDepricated/useKeysDepricated.js +1 -1
  339. package/__internal__/src/hooks/useKeysDepricated/useKeysDepricated.js.map +1 -1
  340. package/__internal__/src/hooks/useResizableContent/helpers.d.ts +1 -1
  341. package/__internal__/src/hooks/useResizableContent/helpers.js +1 -1
  342. package/__internal__/src/hooks/useResizableContent/helpers.js.map +1 -1
  343. package/__internal__/src/hooks/useResizableContent/useResizableContent.js +1 -1
  344. package/__internal__/src/hooks/useResizableContent/useResizableContent.js.map +1 -1
  345. package/__internal__/src/hooks/useSelect/useSelect.d.ts +1 -1
  346. package/__internal__/src/hooks/useSelect/useSelect.js +1 -1
  347. package/__internal__/src/hooks/useSelect/useSelect.js.map +1 -1
  348. package/__internal__/src/hooks/useVirtualScroll/helpers.js +2 -0
  349. package/__internal__/src/hooks/useVirtualScroll/helpers.js.map +1 -0
  350. package/__internal__/src/hooks/useVirtualScroll/useVirtualScroll.d.ts +1 -1
  351. package/__internal__/src/hooks/useVirtualScroll/useVirtualScroll.js +1 -1
  352. package/__internal__/src/hooks/useVirtualScroll/useVirtualScroll.js.map +1 -1
  353. package/__internal__/src/mixs/MixPopoverAnimate/MixPopoverAnimate.css +1 -1
  354. package/__internal__/src/uiKit/components/ThemePreview/ThemePreview.js +1 -1
  355. package/__internal__/src/uiKit/components/ThemePreview/ThemePreview.js.map +1 -1
  356. package/__internal__/src/uiKit/components/ThemePreview/helpers.d.ts +4 -4
  357. package/__internal__/src/uiKit/components/ThemePreview/helpers.js +1 -1
  358. package/__internal__/src/uiKit/components/ThemePreview/helpers.js.map +1 -1
  359. package/__internal__/src/utils/date/index.d.ts +1 -1
  360. package/__internal__/src/utils/date/index.js +1 -1
  361. package/__internal__/src/utils/date/index.js.map +1 -1
  362. package/__internal__/src/utils/date/isDisableDate.js +1 -1
  363. package/__internal__/src/utils/date/isDisableDate.js.map +1 -1
  364. package/__internal__/src/utils/date/{isInMinMaxDade.js → isInMinMaxDate.js} +1 -1
  365. package/__internal__/src/utils/date/{isInMinMaxDade.js.map → isInMinMaxDate.js.map} +1 -1
  366. package/__internal__/src/utils/getGroups.d.ts +3 -3
  367. package/__internal__/src/utils/getGroups.js +1 -1
  368. package/__internal__/src/utils/getGroups.js.map +1 -1
  369. package/__internal__/src/utils/types/AutoComplete.js.map +1 -1
  370. package/__internal__/src/utils/types/KeyCode.d.ts +3 -3
  371. package/__internal__/src/utils/types/KeyCode.js.map +1 -1
  372. package/package.json +1 -1
  373. package/useBreakpointsDeprecated/index.d.ts +1 -0
  374. package/useBreakpointsDeprecated/index.js +1 -0
  375. package/useComponentBreakpointsDeprecated/index.d.ts +1 -0
  376. package/useComponentBreakpointsDeprecated/index.js +1 -0
  377. package/useHideElementsInLineDeprecated/index.d.ts +1 -0
  378. package/useHideElementsInLineDeprecated/index.js +1 -0
  379. package/useKeysDeprecated/index.d.ts +1 -0
  380. package/useKeysDeprecated/index.js +1 -0
  381. package/__internal__/src/components/DragNDropFieldCanary/renderCildren.d.ts +0 -3
  382. package/__internal__/src/components/DragNDropFieldCanary/renderCildren.js +0 -2
  383. package/__internal__/src/components/DragNDropFieldCanary/renderCildren.js.map +0 -1
  384. package/__internal__/src/components/ListCanary/ListBox/mapVerticalSpase.js +0 -2
  385. package/__internal__/src/components/ListCanary/ListBox/mapVerticalSpase.js.map +0 -1
  386. package/__internal__/src/components/TextFieldCanary/TextField.js.map +0 -1
  387. package/__internal__/src/hooks/useVirtualScroll/hellpers.js +0 -2
  388. package/__internal__/src/hooks/useVirtualScroll/hellpers.js.map +0 -1
  389. package/__internal__/src/uiKit/components/StoryBookExample/StoryBookExample.css +0 -1
  390. package/__internal__/src/uiKit/components/StoryBookExample/StoryBookExample.d.ts +0 -6
  391. package/__internal__/src/uiKit/components/StoryBookExample/StoryBookExample.js +0 -2
  392. package/__internal__/src/uiKit/components/StoryBookExample/StoryBookExample.js.map +0 -1
  393. /package/__internal__/src/components/TextFieldCanary/{TextField.d.ts → TextFieldCanary.d.ts} +0 -0
  394. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/addPrefix.d.ts +0 -0
  395. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/addPrefix.js +0 -0
  396. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/getLastPoint.d.ts +0 -0
  397. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/getLastPoint.js +0 -0
  398. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/mapping.d.ts +0 -0
  399. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/mapping.js +0 -0
  400. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/types.d.ts +0 -0
  401. /package/__internal__/src/hooks/{useBreakpointsDepricated → useBreakpointsDeprecated}/types.js +0 -0
  402. /package/__internal__/src/hooks/useVirtualScroll/{hellpers.d.ts → helpers.d.ts} +0 -0
  403. /package/__internal__/src/utils/date/{isInMinMaxDade.d.ts → isInMinMaxDate.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"useFixed.js","names":["useCallback","useEffect","useState","verticalAlign","verticalAlignDefault","horizontalAlign","horizontalAlignDefault","getHTMLElement","element","HTMLElement","Window","current","getStationingElement","offsetTop","offsetHeight","offsetLeft","offsetWidth","clientHeight","clientWidth","scrollTop","scrollHeight","innerHeight","innerWidth","scrollY","Math","max","document","body","isElementScrollible","container","anchor","isVerticalFixation","startScroll","positioningElement","layoutStationing","scrollContainerStationing","anchorStationing","stationingData","top","left","width","height","maxWidth","maxHeight","position","scrollContainerPosition","bottom","right","window","scrollX","useFixed","layoutRef","scrollContainer","anchorRef","stationing","setStationing","result","setResult","setTimeout","parentElement","parentContainer","parentStationing","positioning","addEventListener","resizing","removeEventListener"],"sources":["../../../../../src/components/Layout/useFixed.ts"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\n\nexport type UseFixedData = {\n top?: number;\n left?: number;\n width?: number;\n height?: number;\n maxWidth?: number;\n maxHeight?: number;\n position?: 'unset' | 'fixed';\n};\n\nconst verticalAlign = ['top', 'bottom'] as const;\ntype VerticalAlign = typeof verticalAlign[number];\nconst verticalAlignDefault: VerticalAlign = verticalAlign[0];\n\nconst horizontalAlign = ['left', 'right'] as const;\ntype HorizontalAlign = typeof horizontalAlign[number];\nconst horizontalAlignDefault: HorizontalAlign = horizontalAlign[0];\n\ntype UseFixed = (\n layoutRef?: React.RefObject<HTMLElement> | null,\n scrollContainer?: React.RefObject<HTMLElement> | null | HTMLElement | Window,\n anchorRef?: React.RefObject<HTMLElement> | null,\n verticalAlign?: VerticalAlign,\n horizontalAlign?: HorizontalAlign,\n) => UseFixedData;\n\nexport type ElementStationing = {\n offsetTop: number;\n offsetHeight: number;\n offsetLeft: number;\n offsetWidth: number;\n clientHeight: number;\n clientWidth: number;\n scrollTop: number;\n scrollHeight: number;\n};\n\ntype GetHTMLFunction = (\n element: React.RefObject<HTMLElement> | HTMLElement | Window,\n) => HTMLElement | Window | null;\n\ntype PositioningElement = (\n startScroll?: number,\n layoutStationing?: ElementStationing,\n scrollContainerStationing?: ElementStationing,\n anchorStationing?: ElementStationing,\n verticalAlign?: VerticalAlign,\n horizontalAlign?: HorizontalAlign,\n) => UseFixedData;\n\nconst getHTMLElement: GetHTMLFunction = (element) => {\n if (element && !(element instanceof HTMLElement || element instanceof Window))\n return element?.current;\n return element;\n};\n\nconst getStationingElement = (\n element?: HTMLElement | null | Window,\n): ElementStationing | undefined => {\n if (element instanceof HTMLElement)\n return {\n offsetTop: element.offsetTop,\n offsetHeight: element.offsetHeight,\n offsetLeft: element.offsetLeft,\n offsetWidth: element.offsetWidth,\n clientHeight: element.clientHeight,\n clientWidth: element.clientWidth,\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n };\n if (element instanceof Window) {\n return {\n offsetTop: 0,\n offsetHeight: element.innerHeight,\n offsetLeft: 0,\n offsetWidth: element.innerWidth,\n clientHeight: element.innerHeight,\n clientWidth: element.innerWidth,\n scrollTop: element.scrollY,\n scrollHeight: Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n ),\n };\n }\n return undefined;\n};\n\nconst isElementScrollible = (\n element: ElementStationing,\n container: ElementStationing,\n anchor: ElementStationing | undefined,\n isVerticalFixation: boolean,\n startScroll: number,\n): boolean | undefined => {\n if (isVerticalFixation)\n return (\n container.scrollTop >= startScroll &&\n container.scrollTop <=\n container.scrollHeight - container.offsetHeight + element.offsetHeight\n );\n return anchor\n ? container.scrollTop + anchor.offsetHeight >= startScroll &&\n container.scrollTop <=\n container.scrollHeight - container.offsetHeight + element.offsetHeight\n : container.scrollTop + container.offsetHeight <=\n startScroll + element.offsetHeight &&\n container.scrollTop <= container.scrollHeight - container.offsetHeight;\n};\n\nexport const positioningElement: PositioningElement = (\n startScroll,\n layoutStationing,\n scrollContainerStationing,\n anchorStationing,\n verticalAlign,\n horizontalAlign,\n) => {\n const stationingData: UseFixedData = {\n top: 0,\n left: 0,\n width: layoutStationing?.offsetWidth,\n height: layoutStationing?.offsetHeight,\n maxWidth: scrollContainerStationing?.clientWidth,\n maxHeight: scrollContainerStationing?.clientHeight,\n position: 'unset',\n };\n if (\n layoutStationing &&\n scrollContainerStationing &&\n typeof startScroll !== 'undefined'\n ) {\n const scrollContainerPosition = {\n top: scrollContainerStationing.offsetTop,\n bottom:\n scrollContainerStationing.offsetTop +\n scrollContainerStationing.clientHeight,\n left: scrollContainerStationing.offsetLeft,\n right:\n scrollContainerStationing.offsetLeft +\n scrollContainerStationing.clientWidth,\n width: scrollContainerStationing.clientWidth,\n height: scrollContainerStationing.clientHeight,\n };\n stationingData.width = layoutStationing.offsetWidth;\n stationingData.height = layoutStationing.offsetHeight;\n stationingData.maxWidth = scrollContainerPosition.width;\n stationingData.maxHeight = scrollContainerPosition.height;\n if (\n isElementScrollible(\n layoutStationing,\n scrollContainerStationing,\n anchorStationing,\n verticalAlign === 'top',\n startScroll,\n )\n ) {\n stationingData.position = 'fixed';\n if (verticalAlign === 'top')\n stationingData.top = anchorStationing\n ? anchorStationing.offsetTop\n : scrollContainerPosition.top;\n else\n stationingData.top = anchorStationing\n ? anchorStationing.offsetTop + anchorStationing.offsetHeight\n : scrollContainerPosition.bottom - layoutStationing.offsetHeight;\n if (horizontalAlign === 'left')\n stationingData.left = anchorStationing\n ? anchorStationing.offsetLeft\n : -window.scrollX + scrollContainerPosition.left;\n else\n stationingData.left = anchorStationing\n ? anchorStationing.offsetLeft +\n anchorStationing.offsetWidth -\n layoutStationing.offsetWidth\n : -window.scrollX +\n scrollContainerPosition.right -\n layoutStationing.offsetWidth;\n } else stationingData.position = 'unset';\n }\n return stationingData;\n};\n\nexport const useFixed: UseFixed = (\n layoutRef,\n scrollContainer,\n anchorRef,\n verticalAlign = verticalAlignDefault,\n horizontalAlign = horizontalAlignDefault,\n) => {\n const [stationing, setStationing] = useState<UseFixedData>({});\n const [result, setResult] = useState<UseFixedData>({});\n\n useEffect(() => {\n let startScroll = 0;\n setTimeout(\n () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n const parentStationing = getStationingElement(parentContainer);\n if (parentStationing) {\n startScroll =\n layoutRef.current.offsetTop - parentStationing.offsetTop >= 0\n ? layoutRef.current.offsetTop - parentStationing.offsetTop\n : 0;\n }\n positioning(startScroll);\n document.addEventListener('resize', resizing);\n if (typeof parentContainer?.addEventListener === 'function') {\n parentContainer?.addEventListener('resize', resizing);\n parentContainer?.addEventListener('scroll', () =>\n positioning(startScroll),\n );\n }\n }\n },\n typeof scrollContainer !== 'undefined' ? 0 : 500,\n );\n return () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n document.removeEventListener('resize', resizing);\n if (typeof parentContainer?.removeEventListener === 'function') {\n parentContainer?.removeEventListener('resize', resizing);\n parentContainer?.removeEventListener('scroll', () =>\n positioning(startScroll),\n );\n }\n }\n };\n }, [verticalAlign, horizontalAlign, layoutRef, scrollContainer, anchorRef]);\n\n useEffect(() => {\n setResult({ ...stationing });\n }, [\n stationing.top,\n stationing.left,\n stationing.position,\n stationing.width,\n stationing.height,\n stationing.maxHeight,\n stationing.maxWidth,\n ]);\n\n const resizing = () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n const parentStationing = getStationingElement(parentContainer);\n setStationing({\n ...stationing,\n width: layoutRef.current.offsetWidth,\n height: layoutRef.current.offsetHeight,\n maxWidth: parentStationing?.clientWidth,\n maxHeight: parentStationing?.clientHeight,\n });\n }\n };\n\n const positioning = useCallback(\n (startScroll: number) => {\n if (\n layoutRef &&\n layoutRef.current &&\n layoutRef.current.parentElement &&\n typeof startScroll === 'number'\n ) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n if (scrollContainer) {\n const stationingData = positioningElement(\n startScroll,\n getStationingElement(layoutRef.current),\n getStationingElement(parentContainer),\n getStationingElement(anchorRef?.current),\n verticalAlign,\n horizontalAlign,\n );\n setStationing({ ...stationingData });\n }\n }\n },\n [stationing],\n );\n\n return result;\n};\n"],"mappings":"suBAAA,OAAgBA,WAAhB,CAA6BC,SAA7B,CAAwCC,QAAxC,KAAwD,OAA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AAOE,EACR,CA7GM"}
1
+ {"version":3,"file":"useFixed.js","names":["useCallback","useEffect","useState","verticalAlign","verticalAlignDefault","horizontalAlign","horizontalAlignDefault","getHTMLElement","element","HTMLElement","Window","current","getStationingElement","offsetTop","offsetHeight","offsetLeft","offsetWidth","clientHeight","clientWidth","scrollTop","scrollHeight","innerHeight","innerWidth","scrollY","Math","max","document","body","isElementScrollable","container","anchor","isVerticalFixation","startScroll","positioningElement","layoutStationing","scrollContainerStationing","anchorStationing","stationingData","top","left","width","height","maxWidth","maxHeight","position","scrollContainerPosition","bottom","right","window","scrollX","useFixed","layoutRef","scrollContainer","anchorRef","stationing","setStationing","result","setResult","setTimeout","parentElement","parentContainer","parentStationing","positioning","addEventListener","resizing","removeEventListener"],"sources":["../../../../../src/components/Layout/useFixed.ts"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\n\nexport type UseFixedData = {\n top?: number;\n left?: number;\n width?: number;\n height?: number;\n maxWidth?: number;\n maxHeight?: number;\n position?: 'unset' | 'fixed';\n};\n\nconst verticalAlign = ['top', 'bottom'] as const;\ntype VerticalAlign = typeof verticalAlign[number];\nconst verticalAlignDefault: VerticalAlign = verticalAlign[0];\n\nconst horizontalAlign = ['left', 'right'] as const;\ntype HorizontalAlign = typeof horizontalAlign[number];\nconst horizontalAlignDefault: HorizontalAlign = horizontalAlign[0];\n\ntype UseFixed = (\n layoutRef?: React.RefObject<HTMLElement> | null,\n scrollContainer?: React.RefObject<HTMLElement> | null | HTMLElement | Window,\n anchorRef?: React.RefObject<HTMLElement> | null,\n verticalAlign?: VerticalAlign,\n horizontalAlign?: HorizontalAlign,\n) => UseFixedData;\n\nexport type ElementStationing = {\n offsetTop: number;\n offsetHeight: number;\n offsetLeft: number;\n offsetWidth: number;\n clientHeight: number;\n clientWidth: number;\n scrollTop: number;\n scrollHeight: number;\n};\n\ntype GetHTMLFunction = (\n element: React.RefObject<HTMLElement> | HTMLElement | Window,\n) => HTMLElement | Window | null;\n\ntype PositioningElement = (\n startScroll?: number,\n layoutStationing?: ElementStationing,\n scrollContainerStationing?: ElementStationing,\n anchorStationing?: ElementStationing,\n verticalAlign?: VerticalAlign,\n horizontalAlign?: HorizontalAlign,\n) => UseFixedData;\n\nconst getHTMLElement: GetHTMLFunction = (element) => {\n if (element && !(element instanceof HTMLElement || element instanceof Window))\n return element?.current;\n return element;\n};\n\nconst getStationingElement = (\n element?: HTMLElement | null | Window,\n): ElementStationing | undefined => {\n if (element instanceof HTMLElement)\n return {\n offsetTop: element.offsetTop,\n offsetHeight: element.offsetHeight,\n offsetLeft: element.offsetLeft,\n offsetWidth: element.offsetWidth,\n clientHeight: element.clientHeight,\n clientWidth: element.clientWidth,\n scrollTop: element.scrollTop,\n scrollHeight: element.scrollHeight,\n };\n if (element instanceof Window) {\n return {\n offsetTop: 0,\n offsetHeight: element.innerHeight,\n offsetLeft: 0,\n offsetWidth: element.innerWidth,\n clientHeight: element.innerHeight,\n clientWidth: element.innerWidth,\n scrollTop: element.scrollY,\n scrollHeight: Math.max(\n document.body.scrollHeight,\n document.body.offsetHeight,\n ),\n };\n }\n return undefined;\n};\n\nconst isElementScrollable = (\n element: ElementStationing,\n container: ElementStationing,\n anchor: ElementStationing | undefined,\n isVerticalFixation: boolean,\n startScroll: number,\n): boolean | undefined => {\n if (isVerticalFixation)\n return (\n container.scrollTop >= startScroll &&\n container.scrollTop <=\n container.scrollHeight - container.offsetHeight + element.offsetHeight\n );\n return anchor\n ? container.scrollTop + anchor.offsetHeight >= startScroll &&\n container.scrollTop <=\n container.scrollHeight - container.offsetHeight + element.offsetHeight\n : container.scrollTop + container.offsetHeight <=\n startScroll + element.offsetHeight &&\n container.scrollTop <= container.scrollHeight - container.offsetHeight;\n};\n\nexport const positioningElement: PositioningElement = (\n startScroll,\n layoutStationing,\n scrollContainerStationing,\n anchorStationing,\n verticalAlign,\n horizontalAlign,\n) => {\n const stationingData: UseFixedData = {\n top: 0,\n left: 0,\n width: layoutStationing?.offsetWidth,\n height: layoutStationing?.offsetHeight,\n maxWidth: scrollContainerStationing?.clientWidth,\n maxHeight: scrollContainerStationing?.clientHeight,\n position: 'unset',\n };\n if (\n layoutStationing &&\n scrollContainerStationing &&\n typeof startScroll !== 'undefined'\n ) {\n const scrollContainerPosition = {\n top: scrollContainerStationing.offsetTop,\n bottom:\n scrollContainerStationing.offsetTop +\n scrollContainerStationing.clientHeight,\n left: scrollContainerStationing.offsetLeft,\n right:\n scrollContainerStationing.offsetLeft +\n scrollContainerStationing.clientWidth,\n width: scrollContainerStationing.clientWidth,\n height: scrollContainerStationing.clientHeight,\n };\n stationingData.width = layoutStationing.offsetWidth;\n stationingData.height = layoutStationing.offsetHeight;\n stationingData.maxWidth = scrollContainerPosition.width;\n stationingData.maxHeight = scrollContainerPosition.height;\n if (\n isElementScrollable(\n layoutStationing,\n scrollContainerStationing,\n anchorStationing,\n verticalAlign === 'top',\n startScroll,\n )\n ) {\n stationingData.position = 'fixed';\n if (verticalAlign === 'top')\n stationingData.top = anchorStationing\n ? anchorStationing.offsetTop\n : scrollContainerPosition.top;\n else\n stationingData.top = anchorStationing\n ? anchorStationing.offsetTop + anchorStationing.offsetHeight\n : scrollContainerPosition.bottom - layoutStationing.offsetHeight;\n if (horizontalAlign === 'left')\n stationingData.left = anchorStationing\n ? anchorStationing.offsetLeft\n : -window.scrollX + scrollContainerPosition.left;\n else\n stationingData.left = anchorStationing\n ? anchorStationing.offsetLeft +\n anchorStationing.offsetWidth -\n layoutStationing.offsetWidth\n : -window.scrollX +\n scrollContainerPosition.right -\n layoutStationing.offsetWidth;\n } else stationingData.position = 'unset';\n }\n return stationingData;\n};\n\nexport const useFixed: UseFixed = (\n layoutRef,\n scrollContainer,\n anchorRef,\n verticalAlign = verticalAlignDefault,\n horizontalAlign = horizontalAlignDefault,\n) => {\n const [stationing, setStationing] = useState<UseFixedData>({});\n const [result, setResult] = useState<UseFixedData>({});\n\n useEffect(() => {\n let startScroll = 0;\n setTimeout(\n () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n const parentStationing = getStationingElement(parentContainer);\n if (parentStationing) {\n startScroll =\n layoutRef.current.offsetTop - parentStationing.offsetTop >= 0\n ? layoutRef.current.offsetTop - parentStationing.offsetTop\n : 0;\n }\n positioning(startScroll);\n document.addEventListener('resize', resizing);\n if (typeof parentContainer?.addEventListener === 'function') {\n parentContainer?.addEventListener('resize', resizing);\n parentContainer?.addEventListener('scroll', () =>\n positioning(startScroll),\n );\n }\n }\n },\n typeof scrollContainer !== 'undefined' ? 0 : 500,\n );\n return () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n document.removeEventListener('resize', resizing);\n if (typeof parentContainer?.removeEventListener === 'function') {\n parentContainer?.removeEventListener('resize', resizing);\n parentContainer?.removeEventListener('scroll', () =>\n positioning(startScroll),\n );\n }\n }\n };\n }, [verticalAlign, horizontalAlign, layoutRef, scrollContainer, anchorRef]);\n\n useEffect(() => {\n setResult({ ...stationing });\n }, [\n stationing.top,\n stationing.left,\n stationing.position,\n stationing.width,\n stationing.height,\n stationing.maxHeight,\n stationing.maxWidth,\n ]);\n\n const resizing = () => {\n if (layoutRef && layoutRef.current && layoutRef.current.parentElement) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n const parentStationing = getStationingElement(parentContainer);\n setStationing({\n ...stationing,\n width: layoutRef.current.offsetWidth,\n height: layoutRef.current.offsetHeight,\n maxWidth: parentStationing?.clientWidth,\n maxHeight: parentStationing?.clientHeight,\n });\n }\n };\n\n const positioning = useCallback(\n (startScroll: number) => {\n if (\n layoutRef &&\n layoutRef.current &&\n layoutRef.current.parentElement &&\n typeof startScroll === 'number'\n ) {\n const parentContainer = scrollContainer\n ? getHTMLElement(scrollContainer)\n : layoutRef.current.parentElement;\n if (scrollContainer) {\n const stationingData = positioningElement(\n startScroll,\n getStationingElement(layoutRef.current),\n getStationingElement(parentContainer),\n getStationingElement(anchorRef?.current),\n verticalAlign,\n horizontalAlign,\n );\n setStationing({ ...stationingData });\n }\n }\n },\n [stationing],\n );\n\n return result;\n};\n"],"mappings":"suBAAA,OAAgBA,WAAhB,CAA6BC,SAA7B,CAAwCC,QAAxC,KAAwD,OAAxD,C,GAYMC,cAAa,CAAG,CAAC,KAAD,CAAQ,QAAR,C,CAEhBC,oBAAmC,CAAGD,aAAa,CAAC,CAAD,C,CAEnDE,eAAe,CAAG,CAAC,MAAD,CAAS,OAAT,C,CAElBC,sBAAuC,CAAGD,eAAe,CAAC,CAAD,C,CAkCzDE,cAA+B,CAAG,SAACC,CAAD,CAAa,OAC/CA,EAAO,EAAI,EAAEA,CAAO,WAAYC,YAAnB,EAAkCD,CAAO,WAAYE,OAAvD,CADoC,QAE1CF,CAF0C,WAE1CA,CAF0C,QAE1CA,CAAO,CAAEG,OAFiC,CAG5CH,CACR,C,CAEKI,oBAAoB,CAAG,SAC3BJ,CAD2B,CAEO,OAC9BA,EAAO,WAAYC,YADW,CAEzB,CACLI,SAAS,CAAEL,CAAO,CAACK,SADd,CAELC,YAAY,CAAEN,CAAO,CAACM,YAFjB,CAGLC,UAAU,CAAEP,CAAO,CAACO,UAHf,CAILC,WAAW,CAAER,CAAO,CAACQ,WAJhB,CAKLC,YAAY,CAAET,CAAO,CAACS,YALjB,CAMLC,WAAW,CAAEV,CAAO,CAACU,WANhB,CAOLC,SAAS,CAAEX,CAAO,CAACW,SAPd,CAQLC,YAAY,CAAEZ,CAAO,CAACY,YARjB,CAFyB,CAY9BZ,CAAO,WAAYE,OAZW,CAazB,CACLG,SAAS,CAAE,CADN,CAELC,YAAY,CAAEN,CAAO,CAACa,WAFjB,CAGLN,UAAU,CAAE,CAHP,CAILC,WAAW,CAAER,CAAO,CAACc,UAJhB,CAKLL,YAAY,CAAET,CAAO,CAACa,WALjB,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CAFmB,CAGvCC,oBAAoB,CAACgD,CAAD,CAHmB,CAIvChD,oBAAoB,QAACyC,CAAD,WAACA,CAAD,QAACA,CAAS,CAAE1C,OAAZ,CAJmB,CAKvCR,CALuC,CAMvCE,CANuC,CAAzC,CAQAkD,CAAa,kBAAMlB,CAAN,EACd,CACF,CACF,CAvB4B,CAwB7B,CAACiB,CAAD,CAxB6B,CA3E5B,CAsGH,MAAOE,EACR,CA7GM"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","innerOffset","underLine"];import{IconAdd}from"@consta/icons/IconAdd";import React,{forwardRef}from"react";import{ListDivider,ListItem}from"..";import{mapGroupVerticalSpaseBottom,mapHorisontalSpase,mapHorisontalSpaseIncreased}from"../maps";import{defaultListPropSize}from"../types";export var ListAddItem=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=a.underLine,g=_objectWithoutProperties(a,_excluded),h="increased"===e?mapHorisontalSpaseIncreased[d]:mapHorisontalSpase[d];return React.createElement(React.Fragment,null,React.createElement(ListItem,Object.assign({},g,{size:d,ref:b,leftIcon:IconAdd,space:{pH:h,pV:mapGroupVerticalSpaseBottom[d]}})),f&&React.createElement(ListDivider,{size:d,space:{mH:h}}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","innerOffset","underLine"];import{IconAdd}from"@consta/icons/IconAdd";import React,{forwardRef}from"react";import{ListDivider,ListItem}from"..";import{mapGroupVerticalSpaceBottom,mapHorizontalSpace,mapHorizontalSpaceIncreased}from"../maps";import{defaultListPropSize}from"../types";export var ListAddItem=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=a.underLine,g=_objectWithoutProperties(a,_excluded),h="increased"===e?mapHorizontalSpaceIncreased[d]:mapHorizontalSpace[d];return React.createElement(React.Fragment,null,React.createElement(ListItem,Object.assign({},g,{size:d,ref:b,leftIcon:IconAdd,space:{pH:h,pV:mapGroupVerticalSpaceBottom[d]}})),f&&React.createElement(ListDivider,{size:d,space:{mH:h}}))});
2
2
  //# sourceMappingURL=ListAddItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListAddItem.js","names":["IconAdd","React","forwardRef","ListDivider","ListItem","mapGroupVerticalSpaseBottom","mapHorisontalSpase","mapHorisontalSpaseIncreased","defaultListPropSize","ListAddItem","props","ref","size","innerOffset","underLine","otherProps","horisontalSpase","pH","pV","mH"],"sources":["../../../../../../src/components/ListCanary/ListAddItem/ListAddItem.tsx"],"sourcesContent":["import { IconAdd } from '@consta/icons/IconAdd';\nimport React, { forwardRef } from 'react';\n\nimport { ListDivider, ListItem } from '..';\nimport {\n mapGroupVerticalSpaseBottom,\n mapHorisontalSpase,\n mapHorisontalSpaseIncreased,\n} from '../maps';\nimport { defaultListPropSize, ListAddItemProps } from '../types';\n\nexport const ListAddItem = forwardRef<HTMLDivElement, ListAddItemProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n innerOffset,\n underLine,\n ...otherProps\n } = props;\n\n const horisontalSpase =\n innerOffset === 'increased'\n ? mapHorisontalSpaseIncreased[size]\n : mapHorisontalSpase[size];\n\n return (\n <>\n <ListItem\n {...otherProps}\n size={size}\n ref={ref}\n leftIcon={IconAdd}\n space={{\n pH: horisontalSpase,\n pV: mapGroupVerticalSpaseBottom[size],\n }}\n />\n {underLine && (\n <ListDivider size={size} space={{ mH: horisontalSpase }} />\n )}\n </>\n );\n },\n);\n"],"mappings":"sIAAA,OAASA,OAAT,KAAwB,uBAAxB,CACA,MAAOC,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,WAAT,CAAsBC,QAAtB,KAAsC,IAAtC,CACA,OACEC,2BADF,CAEEC,kBAFF,CAGEC,2BAHF,eAKA,OAASC,mBAAT,gBAEA,MAAO,IAAMC,YAAW,CAAGP,UAAU,CACnC,SAACQ,CAAD,CAAQC,CAAR,CAAgB,OAMVD,CANU,CAEZE,IAFY,CAEZA,CAFY,YAELJ,mBAFK,GAGZK,CAHY,CAMVH,CANU,CAGZG,WAHY,CAIZC,CAJY,CAMVJ,CANU,CAIZI,SAJY,CAKTC,CALS,0BAMVL,CANU,YAQRM,CAAe,CACH,WAAhB,GAAAH,CAAW,CACPN,2BAA2B,CAACK,CAAD,CADpB,CAEPN,kBAAkB,CAACM,CAAD,CAXV,CAad,MACE,yCACE,oBAAC,QAAD,kBACMG,CADN,EAEE,IAAI,CAAEH,CAFR,CAGE,GAAG,CAAED,CAHP,CAIE,QAAQ,CAAEX,OAJZ,CAKE,KAAK,CAAE,CACLiB,EAAE,CAAED,CADC,CAELE,EAAE,CAAEb,2BAA2B,CAACO,CAAD,CAF1B,CALT,GADF,CAWGE,CAAS,EACR,oBAAC,WAAD,EAAa,IAAI,CAAEF,CAAnB,CAAyB,KAAK,CAAE,CAAEO,EAAE,CAAEH,CAAN,CAAhC,EAZJ,CAgBH,CA/BkC,CAA9B"}
1
+ {"version":3,"file":"ListAddItem.js","names":["IconAdd","React","forwardRef","ListDivider","ListItem","mapGroupVerticalSpaceBottom","mapHorizontalSpace","mapHorizontalSpaceIncreased","defaultListPropSize","ListAddItem","props","ref","size","innerOffset","underLine","otherProps","horizontalSpace","pH","pV","mH"],"sources":["../../../../../../src/components/ListCanary/ListAddItem/ListAddItem.tsx"],"sourcesContent":["import { IconAdd } from '@consta/icons/IconAdd';\nimport React, { forwardRef } from 'react';\n\nimport { ListDivider, ListItem } from '..';\nimport {\n mapGroupVerticalSpaceBottom,\n mapHorizontalSpace,\n mapHorizontalSpaceIncreased,\n} from '../maps';\nimport { defaultListPropSize, ListAddItemProps } from '../types';\n\nexport const ListAddItem = forwardRef<HTMLDivElement, ListAddItemProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n innerOffset,\n underLine,\n ...otherProps\n } = props;\n\n const horizontalSpace =\n innerOffset === 'increased'\n ? mapHorizontalSpaceIncreased[size]\n : mapHorizontalSpace[size];\n\n return (\n <>\n <ListItem\n {...otherProps}\n size={size}\n ref={ref}\n leftIcon={IconAdd}\n space={{\n pH: horizontalSpace,\n pV: mapGroupVerticalSpaceBottom[size],\n }}\n />\n {underLine && (\n <ListDivider size={size} space={{ mH: horizontalSpace }} />\n )}\n </>\n );\n },\n);\n"],"mappings":"sIAAA,OAASA,OAAT,KAAwB,uBAAxB,CACA,MAAOC,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,WAAT,CAAsBC,QAAtB,KAAsC,IAAtC,CACA,OACEC,2BADF,CAEEC,kBAFF,CAGEC,2BAHF,eAKA,OAASC,mBAAT,gBAEA,MAAO,IAAMC,YAAW,CAAGP,UAAU,CACnC,SAACQ,CAAD,CAAQC,CAAR,CAAgB,OAMVD,CANU,CAEZE,IAFY,CAEZA,CAFY,YAELJ,mBAFK,GAGZK,CAHY,CAMVH,CANU,CAGZG,WAHY,CAIZC,CAJY,CAMVJ,CANU,CAIZI,SAJY,CAKTC,CALS,0BAMVL,CANU,YAQRM,CAAe,CACH,WAAhB,GAAAH,CAAW,CACPN,2BAA2B,CAACK,CAAD,CADpB,CAEPN,kBAAkB,CAACM,CAAD,CAXV,CAad,MACE,yCACE,oBAAC,QAAD,kBACMG,CADN,EAEE,IAAI,CAAEH,CAFR,CAGE,GAAG,CAAED,CAHP,CAIE,QAAQ,CAAEX,OAJZ,CAKE,KAAK,CAAE,CACLiB,EAAE,CAAED,CADC,CAELE,EAAE,CAAEb,2BAA2B,CAACO,CAAD,CAF1B,CALT,GADF,CAWGE,CAAS,EACR,oBAAC,WAAD,EAAa,IAAI,CAAEF,CAAnB,CAAyB,KAAK,CAAE,CAAEO,EAAE,CAAEH,CAAN,CAAhC,EAZJ,CAgBH,CA/BkC,CAA9B"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","form","border","shadow","className"];import React,{forwardRef}from"react";import{cnMixScrollBar}from"../../../mixs/MixScrollBar";import{cnMixSpace}from"../../../mixs/MixSpace";import{defaultListPropSize}from"../types";import{cnListBox}from"./cnListBox";import{mapVerticalSpase}from"./mapVerticalSpase";export var ListBox=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.form,f=a.border,g=a.shadow,h=a.className,i=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},i,{ref:b,className:cnListBox({size:d,form:e,border:f,shadow:g},[cnMixSpace({pV:mapVerticalSpase[d]}),cnMixScrollBar(),h])}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","form","border","shadow","className"];import React,{forwardRef}from"react";import{cnMixScrollBar}from"../../../mixs/MixScrollBar";import{cnMixSpace}from"../../../mixs/MixSpace";import{defaultListPropSize}from"../types";import{cnListBox}from"./cnListBox";import{mapVerticalSpace}from"./mapVerticalSpace";export var ListBox=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.form,f=a.border,g=a.shadow,h=a.className,i=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},i,{ref:b,className:cnListBox({size:d,form:e,border:f,shadow:g},[cnMixSpace({pV:mapVerticalSpace[d]}),cnMixScrollBar(),h])}))});
2
2
  //# sourceMappingURL=ListBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListBox.js","names":["React","forwardRef","cnMixScrollBar","cnMixSpace","defaultListPropSize","cnListBox","mapVerticalSpase","ListBox","props","ref","size","form","border","shadow","className","otherProps","pV"],"sources":["../../../../../../src/components/ListCanary/ListBox/ListBox.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cnMixSpace } from '##/mixs/MixSpace';\n\nimport { defaultListPropSize, ListBoxProps } from '../types';\nimport { cnListBox } from './cnListBox';\nimport { mapVerticalSpase } from './mapVerticalSpase';\n\nexport const ListBox = forwardRef<HTMLDivElement, ListBoxProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n form,\n border,\n shadow,\n className,\n ...otherProps\n } = props;\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnListBox({ size, form, border, shadow }, [\n cnMixSpace({\n pV: mapVerticalSpase[size],\n }),\n cnMixScrollBar(),\n className,\n ])}\n />\n );\n },\n);\n"],"mappings":"iJAAA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,cAAT,kCACA,OAASC,UAAT,8BAEA,OAASC,mBAAT,gBACA,OAASC,SAAT,mBACA,OAASC,gBAAT,0BAEA,MAAO,IAAMC,QAAO,CAAGN,UAAU,CAC/B,SAACO,CAAD,CAAQC,CAAR,CAAgB,CACd,MAOID,CAPJ,CACEE,IADF,CACEA,CADF,YACSN,mBADT,GAEEO,CAFF,CAOIH,CAPJ,CAEEG,IAFF,CAGEC,CAHF,CAOIJ,CAPJ,CAGEI,MAHF,CAIEC,CAJF,CAOIL,CAPJ,CAIEK,MAJF,CAKEC,CALF,CAOIN,CAPJ,CAKEM,SALF,CAMKC,CANL,0BAOIP,CAPJ,YASA,MACE,4CACMO,CADN,EAEE,GAAG,CAAEN,CAFP,CAGE,SAAS,CAAEJ,SAAS,CAAC,CAAEK,IAAI,CAAJA,CAAF,CAAQC,IAAI,CAAJA,CAAR,CAAcC,MAAM,CAANA,CAAd,CAAsBC,MAAM,CAANA,CAAtB,CAAD,CAAiC,CACnDV,UAAU,CAAC,CACTa,EAAE,CAAEV,gBAAgB,CAACI,CAAD,CADX,CAAD,CADyC,CAInDR,cAAc,EAJqC,CAKnDY,CALmD,CAAjC,CAHtB,GAYH,CAxB8B,CAA1B"}
1
+ {"version":3,"file":"ListBox.js","names":["React","forwardRef","cnMixScrollBar","cnMixSpace","defaultListPropSize","cnListBox","mapVerticalSpace","ListBox","props","ref","size","form","border","shadow","className","otherProps","pV"],"sources":["../../../../../../src/components/ListCanary/ListBox/ListBox.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { cnMixScrollBar } from '##/mixs/MixScrollBar';\nimport { cnMixSpace } from '##/mixs/MixSpace';\n\nimport { defaultListPropSize, ListBoxProps } from '../types';\nimport { cnListBox } from './cnListBox';\nimport { mapVerticalSpace } from './mapVerticalSpace';\n\nexport const ListBox = forwardRef<HTMLDivElement, ListBoxProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n form,\n border,\n shadow,\n className,\n ...otherProps\n } = props;\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnListBox({ size, form, border, shadow }, [\n cnMixSpace({\n pV: mapVerticalSpace[size],\n }),\n cnMixScrollBar(),\n className,\n ])}\n />\n );\n },\n);\n"],"mappings":"iJAAA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,cAAT,kCACA,OAASC,UAAT,8BAEA,OAASC,mBAAT,gBACA,OAASC,SAAT,mBACA,OAASC,gBAAT,0BAEA,MAAO,IAAMC,QAAO,CAAGN,UAAU,CAC/B,SAACO,CAAD,CAAQC,CAAR,CAAgB,CACd,MAOID,CAPJ,CACEE,IADF,CACEA,CADF,YACSN,mBADT,GAEEO,CAFF,CAOIH,CAPJ,CAEEG,IAFF,CAGEC,CAHF,CAOIJ,CAPJ,CAGEI,MAHF,CAIEC,CAJF,CAOIL,CAPJ,CAIEK,MAJF,CAKEC,CALF,CAOIN,CAPJ,CAKEM,SALF,CAMKC,CANL,0BAOIP,CAPJ,YASA,MACE,4CACMO,CADN,EAEE,GAAG,CAAEN,CAFP,CAGE,SAAS,CAAEJ,SAAS,CAAC,CAAEK,IAAI,CAAJA,CAAF,CAAQC,IAAI,CAAJA,CAAR,CAAcC,MAAM,CAANA,CAAd,CAAsBC,MAAM,CAANA,CAAtB,CAAD,CAAiC,CACnDV,UAAU,CAAC,CACTa,EAAE,CAAEV,gBAAgB,CAACI,CAAD,CADX,CAAD,CADyC,CAInDR,cAAc,EAJqC,CAKnDY,CALmD,CAAjC,CAHtB,GAYH,CAxB8B,CAA1B"}
@@ -1,3 +1,3 @@
1
1
  export * from './ListBox';
2
2
  export * from './cnListBox';
3
- export * from './mapVerticalSpase';
3
+ export * from './mapVerticalSpace';
@@ -1,2 +1,2 @@
1
- export*from"./ListBox";export*from"./cnListBox";export*from"./mapVerticalSpase";
1
+ export*from"./ListBox";export*from"./cnListBox";export*from"./mapVerticalSpace";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/ListCanary/ListBox/index.ts"],"sourcesContent":["export * from './ListBox';\nexport * from './cnListBox';\nexport * from './mapVerticalSpase';\n"],"mappings":"AAAA,uBACA,yBACA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../../src/components/ListCanary/ListBox/index.ts"],"sourcesContent":["export * from './ListBox';\nexport * from './cnListBox';\nexport * from './mapVerticalSpace';\n"],"mappings":"AAAA,uBACA,yBACA"}
@@ -1,3 +1,3 @@
1
1
  import { Space } from "../../../mixs/MixSpace";
2
2
  import { ListPropSize } from '../types';
3
- export declare const mapVerticalSpase: Record<ListPropSize, Space>;
3
+ export declare const mapVerticalSpace: Record<ListPropSize, Space>;
@@ -0,0 +1,2 @@
1
+ export var mapVerticalSpace={xs:"2xs",s:"2xs",m:"xs",l:"xs"};
2
+ //# sourceMappingURL=mapVerticalSpace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapVerticalSpace.js","names":["mapVerticalSpace","xs","s","m","l"],"sources":["../../../../../../src/components/ListCanary/ListBox/mapVerticalSpace.ts"],"sourcesContent":["import { Space } from '##/mixs/MixSpace';\n\nimport { ListPropSize } from '../types';\n\nexport const mapVerticalSpace: Record<ListPropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 'xs',\n};\n"],"mappings":"AAIA,MAAO,IAAMA,iBAA6C,CAAG,CAC3DC,EAAE,CAAE,KADuD,CAE3DC,CAAC,CAAE,KAFwD,CAG3DC,CAAC,CAAE,IAHwD,CAI3DC,CAAC,CAAE,IAJwD,CAAtD"}
@@ -1,2 +1,2 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{useMemo}from"react";import{cn}from"../../utils/bem";import{getGroups}from"../../utils/getGroups";import{withDefaultGetters}from"./helper";import{ListItem}from"./ListItem";import{renderHeader}from"./renderHeader";import{defaultListPropInnerOffset,defaultListPropSize}from"./types";export var cnList=cn("List");export var List=function(a){var b=withDefaultGetters(a),c=b.items,d=b.onItemClick,e=b.groups,f=b.disabled,g=b.itemSpase,h=b.groupLabelSpase,i=b.dividerSpase,j=b.getItemLabel,k=b.getItemLeftIcon,l=b.getItemLeftSide,m=b.getItemRightIcon,n=b.getItemRightSide,o=b.getItemAs,p=b.getItemAttributes,q=b.getItemGroupKey,r=b.getItemDisabled,s=b.getItemActive,t=b.getItemChecked,u=b.getItemOnClick,v=b.getItemRef,w=b.getItemStatus,x=b.getItemAdditionalClassName,y=b.getGroupKey,z=b.getGroupLabel,A=b.getGroupRightSide,B=b.getGroupAdditionalClassName,C=b.renderItem,D=b.innerOffset,E=void 0===D?defaultListPropInnerOffset:D,F=b.size,G=void 0===F?defaultListPropSize:F,H=b.sortGroup,I=useMemo(function(){return getGroups(c,q,e,y,H)},[e,c]),J=function(a){var b,c,h=u(a),i=null!==(b=r(a))&&void 0!==b?b:f,q=!i&&(h||d)?function(b){null===h||void 0===h?void 0:h(b),null===d||void 0===d?void 0:d(a,{e:b,item:a})}:void 0,y=_objectSpread(_objectSpread({},null!==(c=null===p||void 0===p?void 0:p(a))&&void 0!==c?c:{}),{},{label:j(a),disabled:i,leftSide:l(a),leftIcon:k(a),rightSide:n(a),rightIcon:m(a),active:s(a),checked:t(a),status:w(a),as:null===o||void 0===o?void 0:o(a),size:G,onClick:q,innerOffset:E,ref:(null===v||void 0===v?void 0:v(a))||void 0,space:g,className:null===x||void 0===x?void 0:x(a)});return React.createElement(ListItem,y)};return React.createElement(React.Fragment,null,I.map(function(a,b){return React.createElement(React.Fragment,{key:a.key},renderHeader(a.group&&z(a.group),0===b,G,a.group&&A(a.group),h,i,B&&a.group&&B(a.group)),a.items.map(function(b,c){return React.createElement(React.Fragment,{key:"".concat(a.key,"-").concat(c)},(null!==C&&void 0!==C?C:J)(b))}))}))};
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{useMemo}from"react";import{cn}from"../../utils/bem";import{getGroups}from"../../utils/getGroups";import{withDefaultGetters}from"./helper";import{ListItem}from"./ListItem";import{renderHeader}from"./renderHeader";import{defaultListPropInnerOffset,defaultListPropSize}from"./types";export var cnList=cn("List");export var List=function(a){var b=withDefaultGetters(a),c=b.items,d=b.onItemClick,e=b.groups,f=b.disabled,g=b.itemSpace,h=b.groupLabelSpace,i=b.dividerSpace,j=b.getItemLabel,k=b.getItemLeftIcon,l=b.getItemLeftSide,m=b.getItemRightIcon,n=b.getItemRightSide,o=b.getItemAs,p=b.getItemAttributes,q=b.getItemGroupKey,r=b.getItemDisabled,s=b.getItemActive,t=b.getItemChecked,u=b.getItemOnClick,v=b.getItemRef,w=b.getItemStatus,x=b.getItemAdditionalClassName,y=b.getGroupKey,z=b.getGroupLabel,A=b.getGroupRightSide,B=b.getGroupAdditionalClassName,C=b.renderItem,D=b.innerOffset,E=void 0===D?defaultListPropInnerOffset:D,F=b.size,G=void 0===F?defaultListPropSize:F,H=b.sortGroup,I=useMemo(function(){return getGroups(c,q,e,y,H)},[e,c]),J=function(a){var b,c,h=u(a),i=null!==(b=r(a))&&void 0!==b?b:f,q=!i&&(h||d)?function(b){null===h||void 0===h?void 0:h(b),null===d||void 0===d?void 0:d(a,{e:b,item:a})}:void 0,y=_objectSpread(_objectSpread({},null!==(c=null===p||void 0===p?void 0:p(a))&&void 0!==c?c:{}),{},{label:j(a),disabled:i,leftSide:l(a),leftIcon:k(a),rightSide:n(a),rightIcon:m(a),active:s(a),checked:t(a),status:w(a),as:null===o||void 0===o?void 0:o(a),size:G,onClick:q,innerOffset:E,ref:(null===v||void 0===v?void 0:v(a))||void 0,space:g,className:null===x||void 0===x?void 0:x(a)});return React.createElement(ListItem,y)};return React.createElement(React.Fragment,null,I.map(function(a,b){return React.createElement(React.Fragment,{key:a.key},renderHeader(a.group&&z(a.group),0===b,G,a.group&&A(a.group),h,i,B&&a.group&&B(a.group)),a.items.map(function(b,c){return React.createElement(React.Fragment,{key:"".concat(a.key,"-").concat(c)},(null!==C&&void 0!==C?C:J)(b))}))}))};
2
2
  //# sourceMappingURL=ListCanary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListCanary.js","names":["React","useMemo","cn","getGroups","withDefaultGetters","ListItem","renderHeader","defaultListPropInnerOffset","defaultListPropSize","cnList","List","props","items","onItemClick","groupsProp","groups","disabledProp","disabled","itemSpase","groupLabelSpase","dividerSpase","getItemLabel","getItemLeftIcon","getItemLeftSide","getItemRightIcon","getItemRightSide","getItemAs","getItemAttributes","getItemGroupKey","getItemDisabled","getItemActive","getItemChecked","getItemOnClick","getItemRef","getItemStatus","getItemAdditionalClassName","getGroupKey","getGroupLabel","getGroupRightSide","getGroupAdditionalClassName","renderItem","innerOffset","size","sortGroup","renderItemDefault","item","onClick","handleClick","e","params","label","leftSide","leftIcon","rightSide","rightIcon","active","checked","status","as","ref","space","className","map","group","groupIndex","key","index"],"sources":["../../../../../src/components/ListCanary/ListCanary.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { cn } from '##/utils/bem';\nimport { getGroups } from '##/utils/getGroups';\n\nimport { withDefaultGetters } from './helper';\nimport { ListItem } from './ListItem';\nimport { renderHeader } from './renderHeader';\nimport {\n defaultListPropInnerOffset,\n defaultListPropSize,\n ListComponent,\n ListPropRenderItem,\n} from './types';\n\nexport const cnList = cn('List');\n\nexport const List: ListComponent = (props) => {\n const {\n items,\n onItemClick,\n groups: groupsProp,\n disabled: disabledProp,\n itemSpase,\n groupLabelSpase,\n dividerSpase,\n getItemLabel,\n getItemLeftIcon,\n getItemLeftSide,\n getItemRightIcon,\n getItemRightSide,\n getItemAs,\n getItemAttributes,\n getItemGroupKey,\n getItemDisabled,\n getItemActive,\n getItemChecked,\n getItemOnClick,\n getItemRef,\n getItemStatus,\n getItemAdditionalClassName,\n getGroupKey,\n getGroupLabel,\n getGroupRightSide,\n getGroupAdditionalClassName,\n renderItem,\n innerOffset = defaultListPropInnerOffset,\n size = defaultListPropSize,\n sortGroup,\n } = withDefaultGetters(props);\n\n const groups = useMemo(\n () => getGroups(items, getItemGroupKey, groupsProp, getGroupKey, sortGroup),\n [groupsProp, items],\n );\n\n type ITEM = typeof items[number];\n\n const renderItemDefault: ListPropRenderItem<ITEM> = (item) => {\n const onClick = getItemOnClick(item);\n const disabled = getItemDisabled(item) ?? disabledProp;\n\n const handleClick: React.MouseEventHandler<HTMLElement> | undefined =\n !disabled && (onClick || onItemClick)\n ? (e) => {\n onClick?.(e);\n onItemClick?.(item, { e, item });\n }\n : undefined;\n\n const params = {\n ...(getItemAttributes?.(item) ?? {}),\n label: getItemLabel(item),\n disabled,\n leftSide: getItemLeftSide(item),\n leftIcon: getItemLeftIcon(item),\n rightSide: getItemRightSide(item),\n rightIcon: getItemRightIcon(item),\n active: getItemActive(item),\n checked: getItemChecked(item),\n status: getItemStatus(item),\n as: getItemAs?.(item),\n size,\n onClick: handleClick,\n innerOffset,\n ref: (getItemRef?.(item) as React.RefObject<HTMLDivElement>) || undefined,\n space: itemSpase,\n className: getItemAdditionalClassName?.(item),\n };\n\n return <ListItem {...params} />;\n };\n\n return (\n <>\n {groups.map((group, groupIndex) => {\n return (\n <React.Fragment key={group.key}>\n {renderHeader(\n group.group && getGroupLabel(group.group),\n groupIndex === 0,\n size,\n group.group && getGroupRightSide(group.group),\n groupLabelSpase,\n dividerSpase,\n getGroupAdditionalClassName &&\n group.group &&\n getGroupAdditionalClassName(group.group),\n )}\n {group.items.map((item, index) => {\n return (\n <React.Fragment key={`${group.key}-${index}`}>\n {(renderItem ?? renderItemDefault)(item)}\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n"],"mappings":"qqBAAA,MAAOA,MAAP,EAAgBC,OAAhB,KAA+B,OAA/B,CAEA,OAASC,EAAT,uBACA,OAASC,SAAT,6BAEA,OAASC,kBAAT,gBACA,OAASC,QAAT,kBACA,OAASC,YAAT,sBACA,OACEC,0BADF,CAEEC,mBAFF,eAOA,MAAO,IAAMC,OAAM,CAAGP,EAAE,CAAC,MAAD,CAAjB,CAEP,MAAO,IAAMQ,KAAmB,CAAG,SAACC,CAAD,CAAW,OAgCxCP,kBAAkB,CAACO,CAAD,CAhCsB,CAE1CC,CAF0C,GAE1CA,KAF0C,CAG1CC,CAH0C,GAG1CA,WAH0C,CAIlCC,CAJkC,GAI1CC,MAJ0C,CAKhCC,CALgC,GAK1CC,QAL0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,MACE,yCACGlC,CAAM,CAAC+C,GAAP,CAAW,SAACC,CAAD,CAAQC,CAAR,CAAuB,CACjC,MACE,qBAAC,KAAD,CAAO,QAAP,EAAgB,GAAG,CAAED,CAAK,CAACE,GAA3B,EACG3D,YAAY,CACXyD,CAAK,CAACA,KAAN,EAAe1B,CAAa,CAAC0B,CAAK,CAACA,KAAP,CADjB,CAEI,CAAf,GAAAC,CAFW,CAGXtB,CAHW,CAIXqB,CAAK,CAACA,KAAN,EAAezB,CAAiB,CAACyB,CAAK,CAACA,KAAP,CAJrB,CAKX5C,CALW,CAMXC,CANW,CAOXmB,CAA2B,EACzBwB,CAAK,CAACA,KADR,EAEExB,CAA2B,CAACwB,CAAK,CAACA,KAAP,CATlB,CADf,CAYGA,CAAK,CAACnD,KAAN,CAAYkD,GAAZ,CAAgB,SAACjB,CAAD,CAAOqB,CAAP,CAAiB,CAChC,MACE,qBAAC,KAAD,CAAO,QAAP,EAAgB,GAAG,WAAKH,CAAK,CAACE,GAAX,aAAkBC,CAAlB,CAAnB,EACG,QAAC1B,CAAD,WAACA,CAAD,CAACA,CAAD,CAAeI,CAAf,EAAkCC,CAAlC,CADH,CAIH,CANA,CAZH,CAqBH,CAvBA,CADH,CA2BH,CAxGM"}
1
+ {"version":3,"file":"ListCanary.js","names":["React","useMemo","cn","getGroups","withDefaultGetters","ListItem","renderHeader","defaultListPropInnerOffset","defaultListPropSize","cnList","List","props","items","onItemClick","groupsProp","groups","disabledProp","disabled","itemSpace","groupLabelSpace","dividerSpace","getItemLabel","getItemLeftIcon","getItemLeftSide","getItemRightIcon","getItemRightSide","getItemAs","getItemAttributes","getItemGroupKey","getItemDisabled","getItemActive","getItemChecked","getItemOnClick","getItemRef","getItemStatus","getItemAdditionalClassName","getGroupKey","getGroupLabel","getGroupRightSide","getGroupAdditionalClassName","renderItem","innerOffset","size","sortGroup","renderItemDefault","item","onClick","handleClick","e","params","label","leftSide","leftIcon","rightSide","rightIcon","active","checked","status","as","ref","space","className","map","group","groupIndex","key","index"],"sources":["../../../../../src/components/ListCanary/ListCanary.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\n\nimport { cn } from '##/utils/bem';\nimport { getGroups } from '##/utils/getGroups';\n\nimport { withDefaultGetters } from './helper';\nimport { ListItem } from './ListItem';\nimport { renderHeader } from './renderHeader';\nimport {\n defaultListPropInnerOffset,\n defaultListPropSize,\n ListComponent,\n ListPropRenderItem,\n} from './types';\n\nexport const cnList = cn('List');\n\nexport const List: ListComponent = (props) => {\n const {\n items,\n onItemClick,\n groups: groupsProp,\n disabled: disabledProp,\n itemSpace,\n groupLabelSpace,\n dividerSpace,\n getItemLabel,\n getItemLeftIcon,\n getItemLeftSide,\n getItemRightIcon,\n getItemRightSide,\n getItemAs,\n getItemAttributes,\n getItemGroupKey,\n getItemDisabled,\n getItemActive,\n getItemChecked,\n getItemOnClick,\n getItemRef,\n getItemStatus,\n getItemAdditionalClassName,\n getGroupKey,\n getGroupLabel,\n getGroupRightSide,\n getGroupAdditionalClassName,\n renderItem,\n innerOffset = defaultListPropInnerOffset,\n size = defaultListPropSize,\n sortGroup,\n } = withDefaultGetters(props);\n\n const groups = useMemo(\n () => getGroups(items, getItemGroupKey, groupsProp, getGroupKey, sortGroup),\n [groupsProp, items],\n );\n\n type ITEM = typeof items[number];\n\n const renderItemDefault: ListPropRenderItem<ITEM> = (item) => {\n const onClick = getItemOnClick(item);\n const disabled = getItemDisabled(item) ?? disabledProp;\n\n const handleClick: React.MouseEventHandler<HTMLElement> | undefined =\n !disabled && (onClick || onItemClick)\n ? (e) => {\n onClick?.(e);\n onItemClick?.(item, { e, item });\n }\n : undefined;\n\n const params = {\n ...(getItemAttributes?.(item) ?? {}),\n label: getItemLabel(item),\n disabled,\n leftSide: getItemLeftSide(item),\n leftIcon: getItemLeftIcon(item),\n rightSide: getItemRightSide(item),\n rightIcon: getItemRightIcon(item),\n active: getItemActive(item),\n checked: getItemChecked(item),\n status: getItemStatus(item),\n as: getItemAs?.(item),\n size,\n onClick: handleClick,\n innerOffset,\n ref: (getItemRef?.(item) as React.RefObject<HTMLDivElement>) || undefined,\n space: itemSpace,\n className: getItemAdditionalClassName?.(item),\n };\n\n return <ListItem {...params} />;\n };\n\n return (\n <>\n {groups.map((group, groupIndex) => {\n return (\n <React.Fragment key={group.key}>\n {renderHeader(\n group.group && getGroupLabel(group.group),\n groupIndex === 0,\n size,\n group.group && getGroupRightSide(group.group),\n groupLabelSpace,\n dividerSpace,\n getGroupAdditionalClassName &&\n group.group &&\n getGroupAdditionalClassName(group.group),\n )}\n {group.items.map((item, index) => {\n return (\n <React.Fragment key={`${group.key}-${index}`}>\n {(renderItem ?? renderItemDefault)(item)}\n </React.Fragment>\n );\n })}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n"],"mappings":"qqBAAA,MAAOA,MAAP,EAAgBC,OAAhB,KAA+B,OAA/B,CAEA,OAASC,EAAT,uBACA,OAASC,SAAT,6BAEA,OAASC,kBAAT,gBACA,OAASC,QAAT,kBACA,OAASC,YAAT,sBACA,OACEC,0BADF,CAEEC,mBAFF,eAOA,MAAO,IAAMC,OAAM,CAAGP,EAAE,CAAC,MAAD,CAAjB,CAEP,MAAO,IAAMQ,KAAmB,CAAG,SAACC,CAAD,CAAW,OAgCxCP,kBAAkB,CAACO,CAAD,CAhCsB,CAE1CC,CAF0C,GAE1CA,KAF0C,CAG1CC,CAH0C,GAG1CA,WAH0C,CAIlCC,CAJkC,GAI1CC,MAJ0C,CAKhCC,CALgC,GAK1CC,QAL0C,CAM1CC,CAN0C,GAM1CA,SAN0C,CAO1CC,CAP0C,GAO1CA,eAP0C,CAQ1CC,CAR0C,GAQ1CA,YAR0C,CAS1CC,CAT0C,GAS1CA,YAT0C,CAU1CC,CAV0C,GAU1CA,eAV0C,CAW1CC,CAX0C,GAW1CA,eAX0C,CAY1CC,CAZ0C,GAY1CA,gBAZ0C,CAa1CC,CAb0C,GAa1CA,gBAb0C,CAc1CC,CAd0C,GAc1CA,SAd0C,CAe1C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N,EAAezB,CAAiB,CAACyB,CAAK,CAACA,KAAP,CAJrB,CAKX5C,CALW,CAMXC,CANW,CAOXmB,CAA2B,EACzBwB,CAAK,CAACA,KADR,EAEExB,CAA2B,CAACwB,CAAK,CAACA,KAAP,CATlB,CADf,CAYGA,CAAK,CAACnD,KAAN,CAAYkD,GAAZ,CAAgB,SAACjB,CAAD,CAAOqB,CAAP,CAAiB,CAChC,MACE,qBAAC,KAAD,CAAO,QAAP,EAAgB,GAAG,WAAKH,CAAK,CAACE,GAAX,aAAkBC,CAAlB,CAAnB,EACG,QAAC1B,CAAD,WAACA,CAAD,CAACA,CAAD,CAAeI,CAAf,EAAkCC,CAAlC,CADH,CAIH,CANA,CAZH,CAqBH,CAvBA,CADH,CA2BH,CAxGM"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","innerOffset","className","space"];import"./ListDivider.css";import React,{forwardRef}from"react";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{mapDividerVerticalSpace,mapHorisontalSpase,mapHorisontalSpaseIncreased}from"../maps";import{defaultListPropSize}from"../types";export var cnListDivider=cn("ListDivider");export var ListDivider=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=a.className,g=a.space,h=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},h,{ref:b,className:cnListDivider(null,[cnMixSpace(g||{mH:"increased"===e?mapHorisontalSpaseIncreased[d]:mapHorisontalSpase[d],mV:mapDividerVerticalSpace[d]}),f])}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","innerOffset","className","space"];import"./ListDivider.css";import React,{forwardRef}from"react";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{mapDividerVerticalSpace,mapHorizontalSpace,mapHorizontalSpaceIncreased}from"../maps";import{defaultListPropSize}from"../types";export var cnListDivider=cn("ListDivider");export var ListDivider=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=a.className,g=a.space,h=_objectWithoutProperties(a,_excluded);return React.createElement("div",Object.assign({},h,{ref:b,className:cnListDivider(null,[cnMixSpace(g||{mH:"increased"===e?mapHorizontalSpaceIncreased[d]:mapHorizontalSpace[d],mV:mapDividerVerticalSpace[d]}),f])}))});
2
2
  //# sourceMappingURL=ListDivider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListDivider.js","names":["React","forwardRef","cnMixSpace","cn","mapDividerVerticalSpace","mapHorisontalSpase","mapHorisontalSpaseIncreased","defaultListPropSize","cnListDivider","ListDivider","props","ref","size","innerOffset","className","space","otherProps","mH","mV"],"sources":["../../../../../../src/components/ListCanary/ListDivider/ListDivider.tsx"],"sourcesContent":["import './ListDivider.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport {\n mapDividerVerticalSpace,\n mapHorisontalSpase,\n mapHorisontalSpaseIncreased,\n} from '../maps';\nimport { defaultListPropSize, ListDividerProps } from '../types';\n\nexport const cnListDivider = cn('ListDivider');\n\nexport const ListDivider = forwardRef<HTMLDivElement, ListDividerProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n innerOffset,\n className,\n space,\n ...otherProps\n } = props;\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnListDivider(null, [\n cnMixSpace(\n space || {\n mH:\n innerOffset === 'increased'\n ? mapHorisontalSpaseIncreased[size]\n : mapHorisontalSpase[size],\n mV: mapDividerVerticalSpace[size],\n },\n ),\n className,\n ])}\n />\n );\n },\n);\n"],"mappings":"8IAAA,0BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OACEC,uBADF,CAEEC,kBAFF,CAGEC,2BAHF,eAKA,OAASC,mBAAT,gBAEA,MAAO,IAAMC,cAAa,CAAGL,EAAE,CAAC,aAAD,CAAxB,CAEP,MAAO,IAAMM,YAAW,CAAGR,UAAU,CACnC,SAACS,CAAD,CAAQC,CAAR,CAAgB,CACd,MAMID,CANJ,CACEE,IADF,CACEA,CADF,YACSL,mBADT,GAEEM,CAFF,CAMIH,CANJ,CAEEG,WAFF,CAGEC,CAHF,CAMIJ,CANJ,CAGEI,SAHF,CAIEC,CAJF,CAMIL,CANJ,CAIEK,KAJF,CAKKC,CALL,0BAMIN,CANJ,YAQA,MACE,4CACMM,CADN,EAEE,GAAG,CAAEL,CAFP,CAGE,SAAS,CAAEH,aAAa,CAAC,IAAD,CAAO,CAC7BN,UAAU,CACRa,CAAK,EAAI,CACPE,EAAE,CACgB,WAAhB,GAAAJ,CAAW,CACPP,2BAA2B,CAACM,CAAD,CADpB,CAEPP,kBAAkB,CAACO,CAAD,CAJjB,CAKPM,EAAE,CAAEd,uBAAuB,CAACQ,CAAD,CALpB,CADD,CADmB,CAU7BE,CAV6B,CAAP,CAH1B,GAiBH,CA5BkC,CAA9B"}
1
+ {"version":3,"file":"ListDivider.js","names":["React","forwardRef","cnMixSpace","cn","mapDividerVerticalSpace","mapHorizontalSpace","mapHorizontalSpaceIncreased","defaultListPropSize","cnListDivider","ListDivider","props","ref","size","innerOffset","className","space","otherProps","mH","mV"],"sources":["../../../../../../src/components/ListCanary/ListDivider/ListDivider.tsx"],"sourcesContent":["import './ListDivider.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport {\n mapDividerVerticalSpace,\n mapHorizontalSpace,\n mapHorizontalSpaceIncreased,\n} from '../maps';\nimport { defaultListPropSize, ListDividerProps } from '../types';\n\nexport const cnListDivider = cn('ListDivider');\n\nexport const ListDivider = forwardRef<HTMLDivElement, ListDividerProps>(\n (props, ref) => {\n const {\n size = defaultListPropSize,\n innerOffset,\n className,\n space,\n ...otherProps\n } = props;\n\n return (\n <div\n {...otherProps}\n ref={ref}\n className={cnListDivider(null, [\n cnMixSpace(\n space || {\n mH:\n innerOffset === 'increased'\n ? mapHorizontalSpaceIncreased[size]\n : mapHorizontalSpace[size],\n mV: mapDividerVerticalSpace[size],\n },\n ),\n className,\n ])}\n />\n );\n },\n);\n"],"mappings":"8IAAA,0BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OACEC,uBADF,CAEEC,kBAFF,CAGEC,2BAHF,eAKA,OAASC,mBAAT,gBAEA,MAAO,IAAMC,cAAa,CAAGL,EAAE,CAAC,aAAD,CAAxB,CAEP,MAAO,IAAMM,YAAW,CAAGR,UAAU,CACnC,SAACS,CAAD,CAAQC,CAAR,CAAgB,CACd,MAMID,CANJ,CACEE,IADF,CACEA,CADF,YACSL,mBADT,GAEEM,CAFF,CAMIH,CANJ,CAEEG,WAFF,CAGEC,CAHF,CAMIJ,CANJ,CAGEI,SAHF,CAIEC,CAJF,CAMIL,CANJ,CAIEK,KAJF,CAKKC,CALL,0BAMIN,CANJ,YAQA,MACE,4CACMM,CADN,EAEE,GAAG,CAAEL,CAFP,CAGE,SAAS,CAAEH,aAAa,CAAC,IAAD,CAAO,CAC7BN,UAAU,CACRa,CAAK,EAAI,CACPE,EAAE,CACgB,WAAhB,GAAAJ,CAAW,CACPP,2BAA2B,CAACM,CAAD,CADpB,CAEPP,kBAAkB,CAACO,CAAD,CAJjB,CAKPM,EAAE,CAAEd,uBAAuB,CAACQ,CAAD,CALpB,CADD,CADmB,CAU7BE,CAV6B,CAAP,CAH1B,GAiBH,CA5BkC,CAA9B"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["rightSide","size","label","innerOffset","className","space"];import"./ListGroupLabel.css";import React,{forwardRef}from"react";import{Text}from"../../Text";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{cnListItemGrid,renderSlot}from"../ListItemGrid";import{mapGroupVerticalSpaseBottom,mapGroupVerticalSpaseTop,mapHorisontalSpase,mapHorisontalSpaseIncreased}from"../maps";import{defaultListPropSize}from"../types";export var cnListGroupLabel=cn("ListGroupLabel");var mapFontSize={xs:"2xs",s:"2xs",m:"xs",l:"s"};export var ListGroupLabel=forwardRef(function(a,b){var c=a.rightSide,d=a.size,e=void 0===d?defaultListPropSize:d,f=a.label,g=a.innerOffset,h=a.className,i=a.space,j=_objectWithoutProperties(a,_excluded);return React.createElement(Text,Object.assign({},j,{ref:b,className:cnListGroupLabel(null,[cnListItemGrid(),cnMixSpace(i||{mH:"increased"===g?mapHorisontalSpaseIncreased[e]:mapHorisontalSpase[e],pT:mapGroupVerticalSpaseTop[e],pB:mapGroupVerticalSpaseBottom[e]}),h]),size:mapFontSize[e],view:"secondary",lineHeight:"xs",spacing:"xs",transform:"uppercase"}),c?React.createElement("span",{className:cnListItemGrid("Slot",{position:"center"})},f):f,renderSlot(c,"right",e,void 0))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["rightSide","size","label","innerOffset","className","space"];import"./ListGroupLabel.css";import React,{forwardRef}from"react";import{Text}from"../../Text";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{cnListItemGrid,renderSlot}from"../ListItemGrid";import{mapGroupVerticalSpaceBottom,mapGroupVerticalSpaceTop,mapHorizontalSpace,mapHorizontalSpaceIncreased}from"../maps";import{defaultListPropSize}from"../types";export var cnListGroupLabel=cn("ListGroupLabel");var mapFontSize={xs:"2xs",s:"2xs",m:"xs",l:"s"};export var ListGroupLabel=forwardRef(function(a,b){var c=a.rightSide,d=a.size,e=void 0===d?defaultListPropSize:d,f=a.label,g=a.innerOffset,h=a.className,i=a.space,j=_objectWithoutProperties(a,_excluded);return React.createElement(Text,Object.assign({},j,{ref:b,className:cnListGroupLabel(null,[cnListItemGrid(),cnMixSpace(i||{mH:"increased"===g?mapHorizontalSpaceIncreased[e]:mapHorizontalSpace[e],pT:mapGroupVerticalSpaceTop[e],pB:mapGroupVerticalSpaceBottom[e]}),h]),size:mapFontSize[e],view:"secondary",lineHeight:"xs",spacing:"xs",transform:"uppercase"}),c?React.createElement("span",{className:cnListItemGrid("Slot",{position:"center"})},f):f,renderSlot(c,"right",e,void 0))});
2
2
  //# sourceMappingURL=ListGroupLabel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListGroupLabel.js","names":["React","forwardRef","Text","cnMixSpace","cn","cnListItemGrid","renderSlot","mapGroupVerticalSpaseBottom","mapGroupVerticalSpaseTop","mapHorisontalSpase","mapHorisontalSpaseIncreased","defaultListPropSize","cnListGroupLabel","mapFontSize","xs","s","m","l","ListGroupLabel","props","ref","rightSide","size","label","innerOffset","className","space","otherProps","mH","pT","pB","position"],"sources":["../../../../../../src/components/ListCanary/ListGroupLabel/ListGroupLabel.tsx"],"sourcesContent":["import './ListGroupLabel.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Text, TextPropSize } from '##/components/Text';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport { cnListItemGrid, renderSlot } from '../ListItemGrid';\nimport {\n mapGroupVerticalSpaseBottom,\n mapGroupVerticalSpaseTop,\n mapHorisontalSpase,\n mapHorisontalSpaseIncreased,\n} from '../maps';\nimport {\n defaultListPropSize,\n ListGroupLabelProps,\n ListPropSize,\n} from '../types';\n\nexport const cnListGroupLabel = cn('ListGroupLabel');\n\nconst mapFontSize: Record<ListPropSize, TextPropSize> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 's',\n};\n\nexport const ListGroupLabel = forwardRef<HTMLDivElement, ListGroupLabelProps>(\n (props, ref) => {\n const {\n rightSide,\n size = defaultListPropSize,\n label,\n innerOffset,\n className,\n space,\n ...otherProps\n } = props;\n\n return (\n <Text\n {...otherProps}\n ref={ref}\n className={cnListGroupLabel(null, [\n cnListItemGrid(),\n cnMixSpace(\n space || {\n mH:\n innerOffset === 'increased'\n ? mapHorisontalSpaseIncreased[size]\n : mapHorisontalSpase[size],\n pT: mapGroupVerticalSpaseTop[size],\n pB: mapGroupVerticalSpaseBottom[size],\n },\n ),\n className,\n ])}\n size={mapFontSize[size]}\n view=\"secondary\"\n lineHeight=\"xs\"\n spacing=\"xs\"\n transform=\"uppercase\"\n >\n {!rightSide ? (\n label\n ) : (\n <span className={cnListItemGrid('Slot', { position: 'center' })}>\n {label}\n </span>\n )}\n {renderSlot(rightSide, 'right', size, undefined)}\n </Text>\n );\n },\n);\n"],"mappings":"kKAAA,6BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,IAAT,kBACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OAASC,cAAT,CAAyBC,UAAzB,uBACA,OACEC,2BADF,CAEEC,wBAFF,CAGEC,kBAHF,CAIEC,2BAJF,eAMA,OACEC,mBADF,gBAMA,MAAO,IAAMC,iBAAgB,CAAGR,EAAE,CAAC,gBAAD,CAA3B,CAEP,GAAMS,YAA+C,CAAG,CACtDC,EAAE,CAAE,KADkD,CAEtDC,CAAC,CAAE,KAFmD,CAGtDC,CAAC,CAAE,IAHmD,CAItDC,CAAC,CAAE,GAJmD,CAAxD,CAOA,MAAO,IAAMC,eAAc,CAAGjB,UAAU,CACtC,SAACkB,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAQIF,CARJ,CACEE,SADF,GAQIF,CARJ,CAEEG,IAFF,CAEEA,CAFF,YAESX,mBAFT,GAGEY,CAHF,CAQIJ,CARJ,CAGEI,KAHF,CAIEC,CAJF,CAQIL,CARJ,CAIEK,WAJF,CAKEC,CALF,CAQIN,CARJ,CAKEM,SALF,CAMEC,CANF,CAQIP,CARJ,CAMEO,KANF,CAOKC,CAPL,0BAQIR,CARJ,YAUA,MACE,qBAAC,IAAD,kBACMQ,CADN,EAEE,GAAG,CAAEP,CAFP,CAGE,SAAS,CAAER,gBAAgB,CAAC,IAAD,CAAO,CAChCP,cAAc,EADkB,CAEhCF,UAAU,CACRuB,CAAK,EAAI,CACPE,EAAE,CACgB,WAAhB,GAAAJ,CAAW,CACPd,2BAA2B,CAACY,CAAD,CADpB,CAEPb,kBAAkB,CAACa,CAAD,CAJjB,CAKPO,EAAE,CAAErB,wBAAwB,CAACc,CAAD,CALrB,CAMPQ,EAAE,CAAEvB,2BAA2B,CAACe,CAAD,CANxB,CADD,CAFsB,CAYhCG,CAZgC,CAAP,CAH7B,CAiBE,IAAI,CAAEZ,WAAW,CAACS,CAAD,CAjBnB,CAkBE,IAAI,CAAC,WAlBP,CAmBE,UAAU,CAAC,IAnBb,CAoBE,OAAO,CAAC,IApBV,CAqBE,SAAS,CAAC,WArBZ,GAuBID,CAAD,CAGC,4BAAM,SAAS,CAAEhB,cAAc,CAAC,MAAD,CAAS,CAAE0B,QAAQ,CAAE,QAAZ,CAAT,CAA/B,EACGR,CADH,CAHD,CACCA,CAxBJ,CA8BGjB,UAAU,CAACe,CAAD,CAAY,OAAZ,CAAqBC,CAArB,QA9Bb,CAiCH,CA9CqC,CAAjC"}
1
+ {"version":3,"file":"ListGroupLabel.js","names":["React","forwardRef","Text","cnMixSpace","cn","cnListItemGrid","renderSlot","mapGroupVerticalSpaceBottom","mapGroupVerticalSpaceTop","mapHorizontalSpace","mapHorizontalSpaceIncreased","defaultListPropSize","cnListGroupLabel","mapFontSize","xs","s","m","l","ListGroupLabel","props","ref","rightSide","size","label","innerOffset","className","space","otherProps","mH","pT","pB","position"],"sources":["../../../../../../src/components/ListCanary/ListGroupLabel/ListGroupLabel.tsx"],"sourcesContent":["import './ListGroupLabel.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Text, TextPropSize } from '##/components/Text';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport { cnListItemGrid, renderSlot } from '../ListItemGrid';\nimport {\n mapGroupVerticalSpaceBottom,\n mapGroupVerticalSpaceTop,\n mapHorizontalSpace,\n mapHorizontalSpaceIncreased,\n} from '../maps';\nimport {\n defaultListPropSize,\n ListGroupLabelProps,\n ListPropSize,\n} from '../types';\n\nexport const cnListGroupLabel = cn('ListGroupLabel');\n\nconst mapFontSize: Record<ListPropSize, TextPropSize> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 's',\n};\n\nexport const ListGroupLabel = forwardRef<HTMLDivElement, ListGroupLabelProps>(\n (props, ref) => {\n const {\n rightSide,\n size = defaultListPropSize,\n label,\n innerOffset,\n className,\n space,\n ...otherProps\n } = props;\n\n return (\n <Text\n {...otherProps}\n ref={ref}\n className={cnListGroupLabel(null, [\n cnListItemGrid(),\n cnMixSpace(\n space || {\n mH:\n innerOffset === 'increased'\n ? mapHorizontalSpaceIncreased[size]\n : mapHorizontalSpace[size],\n pT: mapGroupVerticalSpaceTop[size],\n pB: mapGroupVerticalSpaceBottom[size],\n },\n ),\n className,\n ])}\n size={mapFontSize[size]}\n view=\"secondary\"\n lineHeight=\"xs\"\n spacing=\"xs\"\n transform=\"uppercase\"\n >\n {!rightSide ? (\n label\n ) : (\n <span className={cnListItemGrid('Slot', { position: 'center' })}>\n {label}\n </span>\n )}\n {renderSlot(rightSide, 'right', size, undefined)}\n </Text>\n );\n },\n);\n"],"mappings":"kKAAA,6BAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,IAAT,kBACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OAASC,cAAT,CAAyBC,UAAzB,uBACA,OACEC,2BADF,CAEEC,wBAFF,CAGEC,kBAHF,CAIEC,2BAJF,eAMA,OACEC,mBADF,gBAMA,MAAO,IAAMC,iBAAgB,CAAGR,EAAE,CAAC,gBAAD,CAA3B,CAEP,GAAMS,YAA+C,CAAG,CACtDC,EAAE,CAAE,KADkD,CAEtDC,CAAC,CAAE,KAFmD,CAGtDC,CAAC,CAAE,IAHmD,CAItDC,CAAC,CAAE,GAJmD,CAAxD,CAOA,MAAO,IAAMC,eAAc,CAAGjB,UAAU,CACtC,SAACkB,CAAD,CAAQC,CAAR,CAAgB,CACd,GACEC,EADF,CAQIF,CARJ,CACEE,SADF,GAQIF,CARJ,CAEEG,IAFF,CAEEA,CAFF,YAESX,mBAFT,GAGEY,CAHF,CAQIJ,CARJ,CAGEI,KAHF,CAIEC,CAJF,CAQIL,CARJ,CAIEK,WAJF,CAKEC,CALF,CAQIN,CARJ,CAKEM,SALF,CAMEC,CANF,CAQIP,CARJ,CAMEO,KANF,CAOKC,CAPL,0BAQIR,CARJ,YAUA,MACE,qBAAC,IAAD,kBACMQ,CADN,EAEE,GAAG,CAAEP,CAFP,CAGE,SAAS,CAAER,gBAAgB,CAAC,IAAD,CAAO,CAChCP,cAAc,EADkB,CAEhCF,UAAU,CACRuB,CAAK,EAAI,CACPE,EAAE,CACgB,WAAhB,GAAAJ,CAAW,CACPd,2BAA2B,CAACY,CAAD,CADpB,CAEPb,kBAAkB,CAACa,CAAD,CAJjB,CAKPO,EAAE,CAAErB,wBAAwB,CAACc,CAAD,CALrB,CAMPQ,EAAE,CAAEvB,2BAA2B,CAACe,CAAD,CANxB,CADD,CAFsB,CAYhCG,CAZgC,CAAP,CAH7B,CAiBE,IAAI,CAAEZ,WAAW,CAACS,CAAD,CAjBnB,CAkBE,IAAI,CAAC,WAlBP,CAmBE,UAAU,CAAC,IAnBb,CAoBE,OAAO,CAAC,IApBV,CAqBE,SAAS,CAAC,WArBZ,GAuBID,CAAD,CAGC,4BAAM,SAAS,CAAEhB,cAAc,CAAC,MAAD,CAAS,CAAE0B,QAAQ,CAAE,QAAZ,CAAT,CAA/B,EACGR,CADH,CAHD,CACCA,CAxBJ,CA8BGjB,UAAU,CAACe,CAAD,CAAY,OAAZ,CAAqBC,CAArB,QA9Bb,CAiCH,CA9CqC,CAAjC"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","active","label","innerOffset","disabled","className","leftSide","rightSide","rightIcon","leftIcon","as","checked","onClick","status","space","iconSize"];import"./ListItem.css";import React,{forwardRef}from"react";import{cnText,textPropViewDefault}from"../../Text";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{cnListItemGrid,renderSlot}from"../ListItemGrid";import{mapHorisontalSpase,mapHorisontalSpaseIncreased,mapItemVerticalPadding}from"../maps";import{defaultListPropSize}from"../types";export var cnListItem=cn("ListItem");var ListItemRender=function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.active,f=a.label,g=a.innerOffset,h=a.disabled,i=a.className,j=a.leftSide,k=a.rightSide,l=a.rightIcon,m=a.leftIcon,n=a.as,o=void 0===n?"div":n,p=a.checked,q=a.onClick,r=a.status,s=void 0===r?textPropViewDefault:r,t=a.space,u=a.iconSize,v=_objectWithoutProperties(a,_excluded),w=q&&!h?q:void 0;return React.createElement(o,Object.assign({},v,{className:cnListItem({active:e,disabled:h,checked:p,interactive:!!w},[cnText({lineHeight:"xs",size:d,view:s}),cnMixSpace(t||{pH:"increased"===g?mapHorisontalSpaseIncreased[d]:mapHorisontalSpase[d],pV:mapItemVerticalPadding[d]}),cnListItemGrid(),i]),onClick:w,ref:b}),renderSlot(j,"left",d,m,u),l||k||j||m?f&&React.createElement("span",{className:cnListItemGrid("Slot",{position:"center"})},f):f,renderSlot(k,"right",d,l,u))};export var ListItem=forwardRef(ListItemRender);
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","active","label","innerOffset","disabled","className","leftSide","rightSide","rightIcon","leftIcon","as","checked","onClick","status","space","iconSize"];import"./ListItem.css";import React,{forwardRef}from"react";import{cnText,textPropViewDefault}from"../../Text";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{cnListItemGrid,renderSlot}from"../ListItemGrid";import{mapHorizontalSpace,mapHorizontalSpaceIncreased,mapItemVerticalPadding}from"../maps";import{defaultListPropSize}from"../types";export var cnListItem=cn("ListItem");var ListItemRender=function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.active,f=a.label,g=a.innerOffset,h=a.disabled,i=a.className,j=a.leftSide,k=a.rightSide,l=a.rightIcon,m=a.leftIcon,n=a.as,o=void 0===n?"div":n,p=a.checked,q=a.onClick,r=a.status,s=void 0===r?textPropViewDefault:r,t=a.space,u=a.iconSize,v=_objectWithoutProperties(a,_excluded),w=q&&!h?q:void 0;return React.createElement(o,Object.assign({},v,{className:cnListItem({active:e,disabled:h,checked:p,interactive:!!w},[cnText({lineHeight:"xs",size:d,view:s}),cnMixSpace(t||{pH:"increased"===g?mapHorizontalSpaceIncreased[d]:mapHorizontalSpace[d],pV:mapItemVerticalPadding[d]}),cnListItemGrid(),i]),onClick:w,ref:b}),renderSlot(j,"left",d,m,u),l||k||j||m?f&&React.createElement("span",{className:cnListItemGrid("Slot",{position:"center"})},f):f,renderSlot(k,"right",d,l,u))};export var ListItem=forwardRef(ListItemRender);
2
2
  //# sourceMappingURL=ListItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.js","names":["React","forwardRef","cnText","textPropViewDefault","cnMixSpace","cn","cnListItemGrid","renderSlot","mapHorisontalSpase","mapHorisontalSpaseIncreased","mapItemVerticalPadding","defaultListPropSize","cnListItem","ListItemRender","props","ref","size","active","label","innerOffset","disabled","className","leftSide","rightSide","rightIcon","leftIcon","as","Tag","checked","onClick","status","space","iconSize","otherProps","handleClick","interactive","lineHeight","view","pH","pV","position","ListItem"],"sources":["../../../../../../src/components/ListCanary/ListItem/ListItem.tsx"],"sourcesContent":["import './ListItem.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cnText, textPropViewDefault } from '##/components/Text';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport { cnListItemGrid, renderSlot } from '../ListItemGrid';\nimport {\n mapHorisontalSpase,\n mapHorisontalSpaseIncreased,\n mapItemVerticalPadding,\n} from '../maps';\nimport {\n defaultListPropSize,\n ListItemComponent,\n ListItemProps,\n} from '../types';\n\nexport const cnListItem = cn('ListItem');\n\nconst ListItemRender = (\n props: ListItemProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n size = defaultListPropSize,\n active,\n label,\n innerOffset,\n disabled,\n className,\n leftSide,\n rightSide,\n rightIcon,\n leftIcon,\n as: Tag = 'div',\n checked,\n onClick,\n status = textPropViewDefault,\n space,\n iconSize,\n ...otherProps\n } = props;\n\n const handleClick: React.MouseEventHandler<HTMLDivElement> | undefined =\n onClick && !disabled ? onClick : undefined;\n\n return (\n <Tag\n {...otherProps}\n className={cnListItem(\n { active, disabled, checked, interactive: !!handleClick },\n [\n cnText({\n lineHeight: 'xs',\n size,\n view: status,\n }),\n cnMixSpace(\n space || {\n pH:\n innerOffset === 'increased'\n ? mapHorisontalSpaseIncreased[size]\n : mapHorisontalSpase[size],\n pV: mapItemVerticalPadding[size],\n },\n ),\n cnListItemGrid(),\n className,\n ],\n )}\n onClick={handleClick}\n ref={ref}\n >\n {renderSlot(leftSide, 'left', size, leftIcon, iconSize)}\n {!rightIcon && !rightSide && !leftSide && !leftIcon\n ? label\n : label && (\n <span className={cnListItemGrid('Slot', { position: 'center' })}>\n {label}\n </span>\n )}\n {renderSlot(rightSide, 'right', size, rightIcon, iconSize)}\n </Tag>\n );\n};\n\nexport const ListItem = forwardRef(ListItemRender) as ListItemComponent;\n"],"mappings":"qQAAA,uBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,CAAiBC,mBAAjB,kBACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OAASC,cAAT,CAAyBC,UAAzB,uBACA,OACEC,kBADF,CAEEC,2BAFF,CAGEC,sBAHF,eAKA,OACEC,mBADF,gBAMA,MAAO,IAAMC,WAAU,CAAGP,EAAE,CAAC,UAAD,CAArB,CAEP,GAAMQ,eAAc,CAAG,SACrBC,CADqB,CAErBC,CAFqB,C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O,CAAD,CADpB,CAEPR,kBAAkB,CAACQ,CAAD,CAJjB,CAKPuB,EAAE,CAAE7B,sBAAsB,CAACM,CAAD,CALnB,CADD,CANZ,CAeEV,cAAc,EAfhB,CAgBEe,CAhBF,CAFmB,CAFvB,CAuBE,OAAO,CAAEa,CAvBX,CAwBE,GAAG,CAAEnB,CAxBP,GA0BGR,UAAU,CAACe,CAAD,CAAW,MAAX,CAAmBN,CAAnB,CAAyBS,CAAzB,CAAmCO,CAAnC,CA1Bb,CA2BIR,CAAD,EAAeD,CAAf,EAA6BD,CAA7B,EAA0CG,CAA1C,CAEGP,CAAK,EACH,4BAAM,SAAS,CAAEZ,cAAc,CAAC,MAAD,CAAS,CAAEkC,QAAQ,CAAE,QAAZ,CAAT,CAA/B,EACGtB,CADH,CAHL,CACGA,CA5BN,CAkCGX,UAAU,CAACgB,CAAD,CAAY,OAAZ,CAAqBP,CAArB,CAA2BQ,CAA3B,CAAsCQ,CAAtC,CAlCb,CAqCH,CAjED,CAmEA,MAAO,IAAMS,SAAQ,CAAGxC,UAAU,CAACY,cAAD,CAA3B"}
1
+ {"version":3,"file":"ListItem.js","names":["React","forwardRef","cnText","textPropViewDefault","cnMixSpace","cn","cnListItemGrid","renderSlot","mapHorizontalSpace","mapHorizontalSpaceIncreased","mapItemVerticalPadding","defaultListPropSize","cnListItem","ListItemRender","props","ref","size","active","label","innerOffset","disabled","className","leftSide","rightSide","rightIcon","leftIcon","as","Tag","checked","onClick","status","space","iconSize","otherProps","handleClick","interactive","lineHeight","view","pH","pV","position","ListItem"],"sources":["../../../../../../src/components/ListCanary/ListItem/ListItem.tsx"],"sourcesContent":["import './ListItem.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { cnText, textPropViewDefault } from '##/components/Text';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\n\nimport { cnListItemGrid, renderSlot } from '../ListItemGrid';\nimport {\n mapHorizontalSpace,\n mapHorizontalSpaceIncreased,\n mapItemVerticalPadding,\n} from '../maps';\nimport {\n defaultListPropSize,\n ListItemComponent,\n ListItemProps,\n} from '../types';\n\nexport const cnListItem = cn('ListItem');\n\nconst ListItemRender = (\n props: ListItemProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n size = defaultListPropSize,\n active,\n label,\n innerOffset,\n disabled,\n className,\n leftSide,\n rightSide,\n rightIcon,\n leftIcon,\n as: Tag = 'div',\n checked,\n onClick,\n status = textPropViewDefault,\n space,\n iconSize,\n ...otherProps\n } = props;\n\n const handleClick: React.MouseEventHandler<HTMLDivElement> | undefined =\n onClick && !disabled ? onClick : undefined;\n\n return (\n <Tag\n {...otherProps}\n className={cnListItem(\n { active, disabled, checked, interactive: !!handleClick },\n [\n cnText({\n lineHeight: 'xs',\n size,\n view: status,\n }),\n cnMixSpace(\n space || {\n pH:\n innerOffset === 'increased'\n ? mapHorizontalSpaceIncreased[size]\n : mapHorizontalSpace[size],\n pV: mapItemVerticalPadding[size],\n },\n ),\n cnListItemGrid(),\n className,\n ],\n )}\n onClick={handleClick}\n ref={ref}\n >\n {renderSlot(leftSide, 'left', size, leftIcon, iconSize)}\n {!rightIcon && !rightSide && !leftSide && !leftIcon\n ? label\n : label && (\n <span className={cnListItemGrid('Slot', { position: 'center' })}>\n {label}\n </span>\n )}\n {renderSlot(rightSide, 'right', size, rightIcon, iconSize)}\n </Tag>\n );\n};\n\nexport const ListItem = forwardRef(ListItemRender) as ListItemComponent;\n"],"mappings":"qQAAA,uBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,CAAiBC,mBAAjB,kBACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAEA,OAASC,cAAT,CAAyBC,UAAzB,uBACA,OACEC,kBADF,CAEEC,2BAFF,CAGEC,sBAHF,eAKA,OACEC,mBADF,gBAMA,MAAO,IAAMC,WAAU,CAAGP,EAAE,CAAC,UAAD,CAArB,CAEP,GAAMQ,eAAc,CAAG,SACrBC,C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W,CACPV,2BAA2B,CAACO,CAAD,CADpB,CAEPR,kBAAkB,CAACQ,CAAD,CAJjB,CAKPuB,EAAE,CAAE7B,sBAAsB,CAACM,CAAD,CALnB,CADD,CANZ,CAeEV,cAAc,EAfhB,CAgBEe,CAhBF,CAFmB,CAFvB,CAuBE,OAAO,CAAEa,CAvBX,CAwBE,GAAG,CAAEnB,CAxBP,GA0BGR,UAAU,CAACe,CAAD,CAAW,MAAX,CAAmBN,CAAnB,CAAyBS,CAAzB,CAAmCO,CAAnC,CA1Bb,CA2BIR,CAAD,EAAeD,CAAf,EAA6BD,CAA7B,EAA0CG,CAA1C,CAEGP,CAAK,EACH,4BAAM,SAAS,CAAEZ,cAAc,CAAC,MAAD,CAAS,CAAEkC,QAAQ,CAAE,QAAZ,CAAT,CAA/B,EACGtB,CADH,CAHL,CACGA,CA5BN,CAkCGX,UAAU,CAACgB,CAAD,CAAY,OAAZ,CAAqBP,CAArB,CAA2BQ,CAA3B,CAAsCQ,CAAtC,CAlCb,CAqCH,CAjED,CAmEA,MAAO,IAAMS,SAAQ,CAAGxC,UAAU,CAACY,cAAD,CAA3B"}
@@ -1,2 +1,2 @@
1
- import"./ListLoader.css";import React,{forwardRef}from"react";import{Loader}from"../../LoaderDeprecated";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{mapHorisontalSpase,mapHorisontalSpaseIncreased}from"../maps";import{defaultListPropInnerOffset,defaultListPropSize}from"../types";var cnListLoader=cn("ListLoader");export var ListLoader=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=void 0===e?defaultListPropInnerOffset:e,g=a.className;return React.createElement("div",{ref:b,className:cnListLoader({size:d},[cnMixSpace({pH:"increased"===f?mapHorisontalSpaseIncreased[d]:mapHorisontalSpase[d]}),g])},React.createElement("div",{className:cnListLoader("Container")},React.createElement(Loader,{size:"s",className:cnListLoader("Loader")})))});
1
+ import"./ListLoader.css";import React,{forwardRef}from"react";import{Loader}from"../../LoaderDeprecated";import{cnMixSpace}from"../../../mixs/MixSpace";import{cn}from"../../../utils/bem";import{mapHorizontalSpace,mapHorizontalSpaceIncreased}from"../maps";import{defaultListPropInnerOffset,defaultListPropSize}from"../types";var cnListLoader=cn("ListLoader");export var ListLoader=forwardRef(function(a,b){var c=a.size,d=void 0===c?defaultListPropSize:c,e=a.innerOffset,f=void 0===e?defaultListPropInnerOffset:e,g=a.className;return React.createElement("div",{ref:b,className:cnListLoader({size:d},[cnMixSpace({pH:"increased"===f?mapHorizontalSpaceIncreased[d]:mapHorizontalSpace[d]}),g])},React.createElement("div",{className:cnListLoader("Container")},React.createElement(Loader,{size:"s",className:cnListLoader("Loader")})))});
2
2
  //# sourceMappingURL=ListLoader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListLoader.js","names":["React","forwardRef","Loader","cnMixSpace","cn","mapHorisontalSpase","mapHorisontalSpaseIncreased","defaultListPropInnerOffset","defaultListPropSize","cnListLoader","ListLoader","ref","size","innerOffset","className","pH"],"sources":["../../../../../../src/components/ListCanary/ListLoader/ListLoader.tsx"],"sourcesContent":["import './ListLoader.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Loader } from '##/components/LoaderDeprecated';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nimport { mapHorisontalSpase, mapHorisontalSpaseIncreased } from '../maps';\nimport {\n defaultListPropInnerOffset,\n defaultListPropSize,\n ListPropInnerOffset,\n ListPropSize,\n} from '../types';\n\nconst cnListLoader = cn('ListLoader');\n\ntype Props = PropsWithHTMLAttributesAndRef<\n { size?: ListPropSize; innerOffset?: ListPropInnerOffset },\n HTMLDivElement\n>;\n\nexport const ListLoader = forwardRef<HTMLDivElement, Props>(\n (\n {\n size = defaultListPropSize,\n innerOffset = defaultListPropInnerOffset,\n className,\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cnListLoader({ size }, [\n cnMixSpace({\n pH:\n innerOffset === 'increased'\n ? mapHorisontalSpaseIncreased[size]\n : mapHorisontalSpase[size],\n }),\n className,\n ])}\n >\n <div className={cnListLoader('Container')}>\n <Loader size=\"s\" className={cnListLoader('Loader')} />\n </div>\n </div>\n );\n },\n);\n"],"mappings":"AAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,8BACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAGA,OAASC,kBAAT,CAA6BC,2BAA7B,eACA,OACEC,0BADF,CAEEC,mBAFF,gBAOA,GAAMC,aAAY,CAAGL,EAAE,CAAC,YAAD,CAAvB,CAOA,MAAO,IAAMM,WAAU,CAAGT,UAAU,CAClC,WAMEU,CANF,CAOK,SALDC,IAKC,CALDA,CAKC,YALMJ,mBAKN,OAJDK,WAIC,CAJDA,CAIC,YAJaN,0BAIb,GAHDO,CAGC,GAHDA,SAGC,CACH,MACE,4BACE,GAAG,CAAEH,CADP,CAEE,SAAS,CAAEF,YAAY,CAAC,CAAEG,IAAI,CAAJA,CAAF,CAAD,CAAW,CAChCT,UAAU,CAAC,CACTY,EAAE,CACgB,WAAhB,GAAAF,CAAW,CACPP,2BAA2B,CAACM,CAAD,CADpB,CAEPP,kBAAkB,CAACO,CAAD,CAJf,CAAD,CADsB,CAOhCE,CAPgC,CAAX,CAFzB,EAYE,2BAAK,SAAS,CAAEL,YAAY,CAAC,WAAD,CAA5B,EACE,oBAAC,MAAD,EAAQ,IAAI,CAAC,GAAb,CAAiB,SAAS,CAAEA,YAAY,CAAC,QAAD,CAAxC,EADF,CAZF,CAiBH,CA3BiC,CAA7B"}
1
+ {"version":3,"file":"ListLoader.js","names":["React","forwardRef","Loader","cnMixSpace","cn","mapHorizontalSpace","mapHorizontalSpaceIncreased","defaultListPropInnerOffset","defaultListPropSize","cnListLoader","ListLoader","ref","size","innerOffset","className","pH"],"sources":["../../../../../../src/components/ListCanary/ListLoader/ListLoader.tsx"],"sourcesContent":["import './ListLoader.css';\n\nimport React, { forwardRef } from 'react';\n\nimport { Loader } from '##/components/LoaderDeprecated';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributesAndRef } from '##/utils/types/PropsWithHTMLAttributes';\n\nimport { mapHorizontalSpace, mapHorizontalSpaceIncreased } from '../maps';\nimport {\n defaultListPropInnerOffset,\n defaultListPropSize,\n ListPropInnerOffset,\n ListPropSize,\n} from '../types';\n\nconst cnListLoader = cn('ListLoader');\n\ntype Props = PropsWithHTMLAttributesAndRef<\n { size?: ListPropSize; innerOffset?: ListPropInnerOffset },\n HTMLDivElement\n>;\n\nexport const ListLoader = forwardRef<HTMLDivElement, Props>(\n (\n {\n size = defaultListPropSize,\n innerOffset = defaultListPropInnerOffset,\n className,\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n className={cnListLoader({ size }, [\n cnMixSpace({\n pH:\n innerOffset === 'increased'\n ? mapHorizontalSpaceIncreased[size]\n : mapHorizontalSpace[size],\n }),\n className,\n ])}\n >\n <div className={cnListLoader('Container')}>\n <Loader size=\"s\" className={cnListLoader('Loader')} />\n </div>\n </div>\n );\n },\n);\n"],"mappings":"AAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,KAAkC,OAAlC,CAEA,OAASC,MAAT,8BACA,OAASC,UAAT,8BACA,OAASC,EAAT,0BAGA,OAASC,kBAAT,CAA6BC,2BAA7B,eACA,OACEC,0BADF,CAEEC,mBAFF,gBAOA,GAAMC,aAAY,CAAGL,EAAE,CAAC,YAAD,CAAvB,CAOA,MAAO,IAAMM,WAAU,CAAGT,UAAU,CAClC,WAMEU,CANF,CAOK,SALDC,IAKC,CALDA,CAKC,YALMJ,mBAKN,OAJDK,WAIC,CAJDA,CAIC,YAJaN,0BAIb,GAHDO,CAGC,GAHDA,SAGC,CACH,MACE,4BACE,GAAG,CAAEH,CADP,CAEE,SAAS,CAAEF,YAAY,CAAC,CAAEG,IAAI,CAAJA,CAAF,CAAD,CAAW,CAChCT,UAAU,CAAC,CACTY,EAAE,CACgB,WAAhB,GAAAF,CAAW,CACPP,2BAA2B,CAACM,CAAD,CADpB,CAEPP,kBAAkB,CAACO,CAAD,CAJf,CAAD,CADsB,CAOhCE,CAPgC,CAAX,CAFzB,EAYE,2BAAK,SAAS,CAAEL,YAAY,CAAC,WAAD,CAA5B,EACE,oBAAC,MAAD,EAAQ,IAAI,CAAC,GAAb,CAAiB,SAAS,CAAEA,YAAY,CAAC,QAAD,CAAxC,EADF,CAZF,CAiBH,CA3BiC,CAA7B"}
@@ -4,9 +4,9 @@ export declare function withDefaultGetters<ITEM = DefaultListItem, GROUP = Defau
4
4
  size?: "s" | "m" | "xs" | "l" | undefined;
5
5
  items: ITEM[];
6
6
  innerOffset?: "normal" | "increased" | undefined;
7
- itemSpase?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
8
- groupLabelSpase?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
9
- dividerSpase?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
7
+ itemSpace?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
8
+ groupLabelSpace?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
9
+ dividerSpace?: import("../../mixs/MixSpace").MixSpaceProps | undefined;
10
10
  onItemClick?: import("./types").ListPropOnItemClick<ITEM> | undefined;
11
11
  getItemLabel?: ListPropGetItemLabel<ITEM> | undefined;
12
12
  getItemDisabled?: ListPropGetItemDisabled<ITEM> | undefined;
@@ -1,10 +1,10 @@
1
1
  import { IconPropSize } from '@consta/icons/Icon';
2
2
  import { Space } from "../../mixs/MixSpace";
3
3
  import { ListPropSize } from './types';
4
- export declare const mapHorisontalSpase: Record<ListPropSize, Space>;
5
- export declare const mapHorisontalSpaseIncreased: Record<ListPropSize, Space>;
6
- export declare const mapGroupVerticalSpaseTop: Record<ListPropSize, Space>;
7
- export declare const mapGroupVerticalSpaseBottom: Record<ListPropSize, Space>;
4
+ export declare const mapHorizontalSpace: Record<ListPropSize, Space>;
5
+ export declare const mapHorizontalSpaceIncreased: Record<ListPropSize, Space>;
6
+ export declare const mapGroupVerticalSpaceTop: Record<ListPropSize, Space>;
7
+ export declare const mapGroupVerticalSpaceBottom: Record<ListPropSize, Space>;
8
8
  export declare const mapItemVerticalPadding: Record<ListPropSize, Space>;
9
9
  export declare const mapIconSize: Record<ListPropSize, IconPropSize>;
10
10
  export declare const mapDividerVerticalSpace: Record<ListPropSize, Space>;
@@ -1,2 +1,2 @@
1
- export var mapHorisontalSpase={xs:"xs",s:"xs",m:"s",l:"s"};export var mapHorisontalSpaseIncreased={xs:"s",s:"s",m:"m",l:"l"};export var mapGroupVerticalSpaseTop={xs:"s",s:"m",m:"m",l:"l"};export var mapGroupVerticalSpaseBottom={xs:"2xs",s:"2xs",m:"xs",l:"s"};export var mapItemVerticalPadding={xs:"2xs",s:"2xs",m:"xs",l:"xs"};export var mapIconSize={xs:"xs",s:"xs",m:"s",l:"s"};export var mapDividerVerticalSpace={l:"m",m:"s",s:"xs",xs:"2xs"};
1
+ export var mapHorizontalSpace={xs:"xs",s:"xs",m:"s",l:"s"};export var mapHorizontalSpaceIncreased={xs:"s",s:"s",m:"m",l:"l"};export var mapGroupVerticalSpaceTop={xs:"s",s:"m",m:"m",l:"l"};export var mapGroupVerticalSpaceBottom={xs:"2xs",s:"2xs",m:"xs",l:"s"};export var mapItemVerticalPadding={xs:"2xs",s:"2xs",m:"xs",l:"xs"};export var mapIconSize={xs:"xs",s:"xs",m:"s",l:"s"};export var mapDividerVerticalSpace={l:"m",m:"s",s:"xs",xs:"2xs"};
2
2
  //# sourceMappingURL=maps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"maps.js","names":["mapHorisontalSpase","xs","s","m","l","mapHorisontalSpaseIncreased","mapGroupVerticalSpaseTop","mapGroupVerticalSpaseBottom","mapItemVerticalPadding","mapIconSize","mapDividerVerticalSpace"],"sources":["../../../../../src/components/ListCanary/maps.ts"],"sourcesContent":["import { IconPropSize } from '@consta/icons/Icon';\n\nimport { Space } from '##/mixs/MixSpace';\n\nimport { ListPropSize } from './types';\n\nexport const mapHorisontalSpase: Record<ListPropSize, Space> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const mapHorisontalSpaseIncreased: Record<ListPropSize, Space> = {\n xs: 's',\n s: 's',\n m: 'm',\n l: 'l',\n};\n\nexport const mapGroupVerticalSpaseTop: Record<ListPropSize, Space> = {\n xs: 's',\n s: 'm',\n m: 'm',\n l: 'l',\n};\n\nexport const mapGroupVerticalSpaseBottom: Record<ListPropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 's',\n};\n\nexport const mapItemVerticalPadding: Record<ListPropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 'xs',\n};\n\nexport const mapIconSize: Record<ListPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const mapDividerVerticalSpace: Record<ListPropSize, Space> = {\n l: 'm',\n m: 's',\n s: 'xs',\n xs: '2xs',\n};\n"],"mappings":"AAMA,MAAO,IAAMA,mBAA+C,CAAG,CAC7DC,EAAE,CAAE,IADyD,CAE7DC,CAAC,CAAE,IAF0D,CAG7DC,CAAC,CAAE,GAH0D,CAI7DC,CAAC,CAAE,GAJ0D,CAAxD,CAOP,MAAO,IAAMC,4BAAwD,CAAG,CACtEJ,EAAE,CAAE,GADkE,CAEtEC,CAAC,CAAE,GAFmE,CAGtEC,CAAC,CAAE,GAHmE,CAItEC,CAAC,CAAE,GAJmE,CAAjE,CAOP,MAAO,IAAME,yBAAqD,CAAG,CACnEL,EAAE,CAAE,GAD+D,CAEnEC,CAAC,CAAE,GAFgE,CAGnEC,CAAC,CAAE,GAHgE,CAInEC,CAAC,CAAE,GAJgE,CAA9D,CAOP,MAAO,IAAMG,4BAAwD,CAAG,CACtEN,EAAE,CAAE,KADkE,CAEtEC,CAAC,CAAE,KAFmE,CAGtEC,CAAC,CAAE,IAHmE,CAItEC,CAAC,CAAE,GAJmE,CAAjE,CAOP,MAAO,IAAMI,uBAAmD,CAAG,CACjEP,EAAE,CAAE,KAD6D,CAEjEC,CAAC,CAAE,KAF8D,CAGjEC,CAAC,CAAE,IAH8D,CAIjEC,CAAC,CAAE,IAJ8D,CAA5D,CAOP,MAAO,IAAMK,YAA+C,CAAG,CAC7DR,EAAE,CAAE,IADyD,CAE7DC,CAAC,CAAE,IAF0D,CAG7DC,CAAC,CAAE,GAH0D,CAI7DC,CAAC,CAAE,GAJ0D,CAAxD,CAOP,MAAO,IAAMM,wBAAoD,CAAG,CAClEN,CAAC,CAAE,GAD+D,CAElED,CAAC,CAAE,GAF+D,CAGlED,CAAC,CAAE,IAH+D,CAIlED,EAAE,CAAE,KAJ8D,CAA7D"}
1
+ {"version":3,"file":"maps.js","names":["mapHorizontalSpace","xs","s","m","l","mapHorizontalSpaceIncreased","mapGroupVerticalSpaceTop","mapGroupVerticalSpaceBottom","mapItemVerticalPadding","mapIconSize","mapDividerVerticalSpace"],"sources":["../../../../../src/components/ListCanary/maps.ts"],"sourcesContent":["import { IconPropSize } from '@consta/icons/Icon';\n\nimport { Space } from '##/mixs/MixSpace';\n\nimport { ListPropSize } from './types';\n\nexport const mapHorizontalSpace: Record<ListPropSize, Space> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const mapHorizontalSpaceIncreased: Record<ListPropSize, Space> = {\n xs: 's',\n s: 's',\n m: 'm',\n l: 'l',\n};\n\nexport const mapGroupVerticalSpaceTop: Record<ListPropSize, Space> = {\n xs: 's',\n s: 'm',\n m: 'm',\n l: 'l',\n};\n\nexport const mapGroupVerticalSpaceBottom: Record<ListPropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 's',\n};\n\nexport const mapItemVerticalPadding: Record<ListPropSize, Space> = {\n xs: '2xs',\n s: '2xs',\n m: 'xs',\n l: 'xs',\n};\n\nexport const mapIconSize: Record<ListPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const mapDividerVerticalSpace: Record<ListPropSize, Space> = {\n l: 'm',\n m: 's',\n s: 'xs',\n xs: '2xs',\n};\n"],"mappings":"AAMA,MAAO,IAAMA,mBAA+C,CAAG,CAC7DC,EAAE,CAAE,IADyD,CAE7DC,CAAC,CAAE,IAF0D,CAG7DC,CAAC,CAAE,GAH0D,CAI7DC,CAAC,CAAE,GAJ0D,CAAxD,CAOP,MAAO,IAAMC,4BAAwD,CAAG,CACtEJ,EAAE,CAAE,GADkE,CAEtEC,CAAC,CAAE,GAFmE,CAGtEC,CAAC,CAAE,GAHmE,CAItEC,CAAC,CAAE,GAJmE,CAAjE,CAOP,MAAO,IAAME,yBAAqD,CAAG,CACnEL,EAAE,CAAE,GAD+D,CAEnEC,CAAC,CAAE,GAFgE,CAGnEC,CAAC,CAAE,GAHgE,CAInEC,CAAC,CAAE,GAJgE,CAA9D,CAOP,MAAO,IAAMG,4BAAwD,CAAG,CACtEN,EAAE,CAAE,KADkE,CAEtEC,CAAC,CAAE,KAFmE,CAGtEC,CAAC,CAAE,IAHmE,CAItEC,CAAC,CAAE,GAJmE,CAAjE,CAOP,MAAO,IAAMI,uBAAmD,CAAG,CACjEP,EAAE,CAAE,KAD6D,CAEjEC,CAAC,CAAE,KAF8D,CAGjEC,CAAC,CAAE,IAH8D,CAIjEC,CAAC,CAAE,IAJ8D,CAA5D,CAOP,MAAO,IAAMK,YAA+C,CAAG,CAC7DR,EAAE,CAAE,IADyD,CAE7DC,CAAC,CAAE,IAF0D,CAG7DC,CAAC,CAAE,GAH0D,CAI7DC,CAAC,CAAE,GAJ0D,CAAxD,CAOP,MAAO,IAAMM,wBAAoD,CAAG,CAClEN,CAAC,CAAE,GAD+D,CAElED,CAAC,CAAE,GAF+D,CAGlED,CAAC,CAAE,IAH+D,CAIlED,EAAE,CAAE,KAJ8D,CAA7D"}
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { MixSpaceProps } from "../../mixs/MixSpace";
3
3
  import { ListPropSize } from './types';
4
- export declare const renderHeader: (label: string | undefined, first: boolean, size: ListPropSize, rightSide: React.ReactNode, labelSpace: MixSpaceProps | undefined, dividerSpase: MixSpaceProps | undefined, className: string | undefined) => React.ReactNode | null;
4
+ export declare const renderHeader: (label: string | undefined, first: boolean, size: ListPropSize, rightSide: React.ReactNode, labelSpace: MixSpaceProps | undefined, dividerSpace: MixSpaceProps | undefined, className: string | undefined) => React.ReactNode | null;
@@ -1 +1 @@
1
- {"version":3,"file":"renderHeader.js","names":["React","ListDivider","ListGroupLabel","renderHeader","label","first","size","rightSide","labelSpace","dividerSpase","className"],"sources":["../../../../../src/components/ListCanary/renderHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport { MixSpaceProps } from '##/mixs/MixSpace';\n\nimport { ListDivider } from './ListDivider';\nimport { ListGroupLabel } from './ListGroupLabel';\nimport { ListPropSize } from './types';\n\nexport const renderHeader = (\n label: string | undefined,\n first: boolean,\n size: ListPropSize,\n rightSide: React.ReactNode,\n labelSpace: MixSpaceProps | undefined,\n dividerSpase: MixSpaceProps | undefined,\n className: string | undefined,\n): React.ReactNode | null => {\n if (label) {\n return (\n <ListGroupLabel\n size={size}\n label={label}\n rightSide={rightSide}\n space={labelSpace}\n className={className}\n />\n );\n }\n\n if (!label && !first) {\n return (\n <ListDivider size={size} space={dividerSpase} className={className} />\n );\n }\n\n return null;\n};\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAIA,OAASC,WAAT,qBACA,OAASC,cAAT,wBAGA,MAAO,IAAMC,aAAY,CAAG,SAC1BC,CAD0B,CAE1BC,CAF0B,CAG1BC,CAH0B,CAI1BC,CAJ0B,CAK1BC,CAL0B,CAM1BC,CAN0B,CAO1BC,CAP0B,CAQC,OACvBN,EADuB,CAGvB,oBAAC,cAAD,EACE,IAAI,CAAEE,CADR,CAEE,KAAK,CAAEF,CAFT,CAGE,SAAS,CAAEG,CAHb,CAIE,KAAK,CAAEC,CAJT,CAKE,SAAS,CAAEE,CALb,EAHuB,CAatBN,CAAD,EAAWC,CAbY,CAmBpB,IAnBoB,CAevB,oBAAC,WAAD,EAAa,IAAI,CAAEC,CAAnB,CAAyB,KAAK,CAAEG,CAAhC,CAA8C,SAAS,CAAEC,CAAzD,EAKL,CA5BM"}
1
+ {"version":3,"file":"renderHeader.js","names":["React","ListDivider","ListGroupLabel","renderHeader","label","first","size","rightSide","labelSpace","dividerSpace","className"],"sources":["../../../../../src/components/ListCanary/renderHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport { MixSpaceProps } from '##/mixs/MixSpace';\n\nimport { ListDivider } from './ListDivider';\nimport { ListGroupLabel } from './ListGroupLabel';\nimport { ListPropSize } from './types';\n\nexport const renderHeader = (\n label: string | undefined,\n first: boolean,\n size: ListPropSize,\n rightSide: React.ReactNode,\n labelSpace: MixSpaceProps | undefined,\n dividerSpace: MixSpaceProps | undefined,\n className: string | undefined,\n): React.ReactNode | null => {\n if (label) {\n return (\n <ListGroupLabel\n size={size}\n label={label}\n rightSide={rightSide}\n space={labelSpace}\n className={className}\n />\n );\n }\n\n if (!label && !first) {\n return (\n <ListDivider size={size} space={dividerSpace} className={className} />\n );\n }\n\n return null;\n};\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAIA,OAASC,WAAT,qBACA,OAASC,cAAT,wBAGA,MAAO,IAAMC,aAAY,CAAG,SAC1BC,CAD0B,CAE1BC,CAF0B,CAG1BC,CAH0B,CAI1BC,CAJ0B,CAK1BC,CAL0B,CAM1BC,CAN0B,CAO1BC,CAP0B,CAQC,OACvBN,EADuB,CAGvB,oBAAC,cAAD,EACE,IAAI,CAAEE,CADR,CAEE,KAAK,CAAEF,CAFT,CAGE,SAAS,CAAEG,CAHb,CAIE,KAAK,CAAEC,CAJT,CAKE,SAAS,CAAEE,CALb,EAHuB,CAatBN,CAAD,EAAWC,CAbY,CAmBpB,IAnBoB,CAevB,oBAAC,WAAD,EAAa,IAAI,CAAEC,CAAnB,CAAyB,KAAK,CAAEG,CAAhC,CAA8C,SAAS,CAAEC,CAAzD,EAKL,CA5BM"}
@@ -63,9 +63,9 @@ export declare type ListProps<ITEM = DefaultListItem, GROUP = DefaultListGroup>
63
63
  size?: ListPropSize;
64
64
  items: ITEM[];
65
65
  innerOffset?: ListPropInnerOffset;
66
- itemSpase?: MixSpaceProps;
67
- groupLabelSpase?: MixSpaceProps;
68
- dividerSpase?: MixSpaceProps;
66
+ itemSpace?: MixSpaceProps;
67
+ groupLabelSpace?: MixSpaceProps;
68
+ dividerSpace?: MixSpaceProps;
69
69
  onItemClick?: ListPropOnItemClick<ITEM>;
70
70
  getItemLabel?: ListPropGetItemLabel<ITEM>;
71
71
  getItemDisabled?: ListPropGetItemDisabled<ITEM>;
@@ -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 itemSpase?: MixSpaceProps;\n groupLabelSpase?: MixSpaceProps;\n dividerSpase?: 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> = (\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 +1 @@
1
- {"version":3,"file":"Pagination.js","names":["React","forwardRef","useCallback","useForkRef","useMutableRef","cn","defaultGetItemClickable","defaultGetItemKey","guardCurrentPage","paginationArrowIconsMap","PaginationArrow","PaginationList","PaginationNumberInput","PaginationSizeCalculateHelper","paginationPropFormDefault","paginationPropSizeDefault","paginationPropTypeDefault","usePaginationItems","cnPagination","PaginationRender","props","ref","items","valueProp","value","onChange","size","form","type","containerEventListener","window","getTotalLabel","outerMostArrows","arrows","hotKeys","showFirstPage","showLastPage","visibleCount","className","style","getItemAs","getItemAttributes","getItemRef","otherProps","valueRef","onChangeRef","onItemClick","key","e","current","handleNext","Math","min","handlePrevious","max","handlefirst","handleLast","pages","refs","symbolSize","rootRef","renderArrow","item","hotKey","onClick","flag","orientation","label","icon","toString","clickable","Pagination"],"sources":["../../../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import './Pagination.css';\n\nimport React, { forwardRef, useCallback } from 'react';\n\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef';\nimport { cn } from '##/utils/bem';\n\nimport {\n defaultGetItemClickable,\n defaultGetItemKey,\n guardCurrentPage,\n paginationArrowIconsMap,\n} from './helpers';\nimport { PaginationArrow } from './PaginationArrow';\nimport { PaginationList } from './PaginationList';\nimport { PaginationNumberInput } from './PaginationNumberInput';\nimport { PaginationSizeCalculateHelper } from './PaginationSizeCalculateHelper';\nimport {\n PaginationArrowTypes,\n PaginationComponent,\n PaginationItem,\n PaginationPropArrow,\n paginationPropFormDefault,\n PaginationPropHotKey,\n PaginationPropOnItemClick,\n PaginationProps,\n paginationPropSizeDefault,\n PaginationPropType,\n paginationPropTypeDefault,\n} from './types';\nimport { usePaginationItems } from './usePaginationItems';\n\nconst cnPagination = cn('Pagination');\n\nconst PaginationRender = <TYPE extends PaginationPropType>(\n props: PaginationProps<TYPE>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n items = 0,\n value: valueProp,\n onChange,\n size = paginationPropSizeDefault,\n form = paginationPropFormDefault,\n type = paginationPropTypeDefault,\n containerEventListener = window,\n getTotalLabel,\n outerMostArrows,\n arrows,\n hotKeys,\n showFirstPage,\n showLastPage,\n visibleCount,\n className,\n style,\n getItemAs,\n getItemAttributes,\n getItemRef,\n ...otherProps\n } = props;\n\n const valueRef = useMutableRef(guardCurrentPage(valueProp, items));\n const onChangeRef = useMutableRef(onChange);\n\n const onItemClick: PaginationPropOnItemClick<PaginationItem> = useCallback(\n ({ key }, { e }) => {\n if (key !== valueRef.current && typeof key === 'number') {\n onChangeRef.current?.(key, { e });\n }\n },\n [],\n );\n\n const handleNext = useCallback(\n (e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(Math.min(valueRef.current + 1, items), { e });\n },\n [items],\n );\n\n const handlePrevious = useCallback((e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(Math.max(valueRef.current - 1, 1), { e });\n }, []);\n\n const handlefirst = useCallback((e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(1, { e });\n }, []);\n\n const handleLast = useCallback(\n (e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(items, { e });\n },\n [items],\n );\n\n const [pages, refs, symbolSize] = usePaginationItems({\n showFirstPage,\n showLastPage,\n items,\n visibleCount,\n size,\n value: valueRef.current,\n containerEventListener,\n hotKeys,\n outerMostArrows,\n type,\n arrows,\n handleNext,\n handlePrevious,\n });\n\n const rootRef = useForkRef([refs[4], ref]);\n\n const renderArrow = (\n item: PaginationPropArrow,\n type: PaginationArrowTypes,\n ref: React.Ref<HTMLButtonElement> | undefined,\n hotKey: PaginationPropHotKey | undefined,\n onClick?: React.MouseEventHandler,\n ) => {\n const flag =\n type === 'first' || type === 'previous'\n ? valueRef.current > 1\n : valueRef.current < items;\n const orientation =\n type === 'first' || type === 'previous' ? 'start' : 'end';\n if (typeof item === 'object') {\n const { label, icon = paginationArrowIconsMap[type] } = item;\n\n return (\n <PaginationArrow\n label={label}\n icon={icon}\n disabled={!flag}\n size={size}\n form={form}\n ref={ref}\n orientation={orientation}\n caption={hotKey?.label}\n onClick={onClick}\n />\n );\n }\n return (\n <PaginationArrow\n orientation={orientation}\n icon={typeof item === 'function' ? item : paginationArrowIconsMap[type]}\n disabled={!flag}\n size={size}\n form={form}\n ref={ref}\n onClick={onClick}\n />\n );\n };\n\n if (items <= 0) {\n return null;\n }\n\n return (\n <nav\n {...otherProps}\n className={cnPagination({ type }, [className])}\n ref={rootRef}\n style={{\n ['--pagination-symbol-size' as string]: `${symbolSize}px`,\n ...style,\n }}\n >\n {(outerMostArrows?.[0] || arrows?.[0]) && (\n <>\n {outerMostArrows?.[0] &&\n renderArrow(\n outerMostArrows[0],\n 'first',\n refs[0] as unknown as React.RefObject<HTMLButtonElement>,\n undefined,\n handlefirst,\n )}\n {arrows?.[0] &&\n renderArrow(\n arrows[0],\n 'previous',\n refs[1] as unknown as React.RefObject<HTMLButtonElement>,\n hotKeys?.[0],\n handlePrevious,\n )}\n </>\n )}\n\n {type === 'default' ? (\n <PaginationList\n items={pages}\n form={form}\n size={size}\n onItemClick={onItemClick}\n value={{\n key: valueRef.current,\n label: valueRef.current.toString(),\n clickable: true,\n }}\n getItemKey={defaultGetItemKey}\n getItemClickable={defaultGetItemClickable}\n getItemAs={getItemAs}\n getItemAttributes={getItemAttributes}\n getItemRef={getItemRef}\n />\n ) : (\n <PaginationNumberInput\n form={form}\n size={size}\n total={items}\n value={valueRef.current}\n onChange={onChange}\n getTotalLabel={getTotalLabel}\n />\n )}\n {(arrows?.[1] || outerMostArrows?.[1]) && (\n <>\n {arrows?.[1] &&\n renderArrow(\n arrows[1],\n 'next',\n refs[2] as unknown as React.RefObject<HTMLButtonElement>,\n hotKeys?.[1],\n handleNext,\n )}\n {outerMostArrows?.[1] &&\n renderArrow(\n outerMostArrows[1],\n 'last',\n refs[3] as unknown as React.RefObject<HTMLButtonElement>,\n undefined,\n handleLast,\n )}\n </>\n )}\n {type === 'default' && (\n <PaginationSizeCalculateHelper refs={refs} size={size} />\n )}\n </nav>\n );\n};\n\nexport const Pagination = forwardRef(PaginationRender) as PaginationComponent;\n"],"mappings":"wjCAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,KAA+C,OAA/C,CAEA,OAASC,UAAT,8BACA,OAASC,aAAT,iCACA,OAASC,EAAT,uBAEA,OACEC,uBADF,CAEEC,iBAFF,CAGEC,gBAHF,CAIEC,uBAJF,iBAMA,OAASC,eAAT,yBACA,OAASC,cAAT,wBACA,OAASC,qBAAT,+BACA,OAASC,6BAAT,uCACA,OAKEC,yBALF,CASEC,yBATF,CAWEC,yBAXF,eAaA,OAASC,kBAAT,4B,GAEMC,aAAY,CAAGb,EAAE,CAAC,YAAD,C,CAEjBc,gBAAgB,CAAG,SACvBC,CADuB,CAEvBC,CAFuB,CAGpB,OAsBCD,CAtBD,CAEDE,KAFC,CAEDA,CAFC,YAEO,CAFP,GAGMC,CAHN,CAsBCH,CAtBD,CAGDI,KAHC,CAIDC,CAJC,CAsBCL,CAtBD,CAIDK,QAJC,GAsBCL,CAtBD,CAKDM,IALC,CAKDA,CALC,YAKMX,yBALN,KAsBCK,CAtBD,CAMDO,IANC,CAMDA,CANC,YAMMb,yBANN,KAsBCM,CAtBD,CAODQ,IAPC,CA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,CAbrB,CAcE,UAAU,CAAEC,CAdd,EADG,CAkBH,oBAAC,qBAAD,EACE,IAAI,CAAEf,CADR,CAEE,IAAI,CAAED,CAFR,CAGE,KAAK,CAAEJ,CAHT,CAIE,KAAK,CAAEsB,CAAQ,CAACK,OAJlB,CAKE,QAAQ,CAAExB,CALZ,CAME,aAAa,CAAEM,CANjB,EAhDJ,CAyDG,CAAC,QAAAE,CAAM,WAANA,CAAA,QAAAA,CAAM,CAAG,CAAH,CAAN,WAAeD,CAAf,WAAeA,CAAf,QAAeA,CAAe,CAAG,CAAH,CAA9B,CAAD,GACC,wCACG,QAAAC,CAAM,WAANA,CAAA,QAAAA,CAAM,CAAG,CAAH,CAAN,GACC4B,CAAW,CACT5B,CAAM,CAAC,CAAD,CADG,CAET,MAFS,CAGTyB,CAAI,CAAC,CAAD,CAHK,QAITxB,CAJS,WAITA,CAJS,QAITA,CAAO,CAAG,CAAH,CAJE,CAKTgB,CALS,CAFf,CASG,QAAAlB,CAAe,WAAfA,CAAA,QAAAA,CAAe,CAAG,CAAH,CAAf,GACC6B,CAAW,CACT7B,CAAe,CAAC,CAAD,CADN,CAET,MAFS,CAGT0B,CAAI,CAAC,CAAD,CAHK,QAKTF,CALS,CAVf,CA1DJ,CA6EY,SAAT,GAAA5B,CAAI,EACH,oBAAC,6BAAD,EAA+B,IAAI,CAAE8B,CAArC,CAA2C,IAAI,CAAEhC,CAAjD,EA9EJ,CAkFH,C,CAED,MAAO,IAAM6C,WAAU,CAAGtE,UAAU,CAACkB,gBAAD,CAA7B"}
1
+ {"version":3,"file":"Pagination.js","names":["React","forwardRef","useCallback","useForkRef","useMutableRef","cn","defaultGetItemClickable","defaultGetItemKey","guardCurrentPage","paginationArrowIconsMap","PaginationArrow","PaginationList","PaginationNumberInput","PaginationSizeCalculateHelper","paginationPropFormDefault","paginationPropSizeDefault","paginationPropTypeDefault","usePaginationItems","cnPagination","PaginationRender","props","ref","items","valueProp","value","onChange","size","form","type","containerEventListener","window","getTotalLabel","outerMostArrows","arrows","hotKeys","showFirstPage","showLastPage","visibleCount","className","style","getItemAs","getItemAttributes","getItemRef","otherProps","valueRef","onChangeRef","onItemClick","key","e","current","handleNext","Math","min","handlePrevious","max","handleFirst","handleLast","pages","refs","symbolSize","rootRef","renderArrow","item","hotKey","onClick","flag","orientation","label","icon","toString","clickable","Pagination"],"sources":["../../../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import './Pagination.css';\n\nimport React, { forwardRef, useCallback } from 'react';\n\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMutableRef } from '##/hooks/useMutableRef';\nimport { cn } from '##/utils/bem';\n\nimport {\n defaultGetItemClickable,\n defaultGetItemKey,\n guardCurrentPage,\n paginationArrowIconsMap,\n} from './helpers';\nimport { PaginationArrow } from './PaginationArrow';\nimport { PaginationList } from './PaginationList';\nimport { PaginationNumberInput } from './PaginationNumberInput';\nimport { PaginationSizeCalculateHelper } from './PaginationSizeCalculateHelper';\nimport {\n PaginationArrowTypes,\n PaginationComponent,\n PaginationItem,\n PaginationPropArrow,\n paginationPropFormDefault,\n PaginationPropHotKey,\n PaginationPropOnItemClick,\n PaginationProps,\n paginationPropSizeDefault,\n PaginationPropType,\n paginationPropTypeDefault,\n} from './types';\nimport { usePaginationItems } from './usePaginationItems';\n\nconst cnPagination = cn('Pagination');\n\nconst PaginationRender = <TYPE extends PaginationPropType>(\n props: PaginationProps<TYPE>,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n items = 0,\n value: valueProp,\n onChange,\n size = paginationPropSizeDefault,\n form = paginationPropFormDefault,\n type = paginationPropTypeDefault,\n containerEventListener = window,\n getTotalLabel,\n outerMostArrows,\n arrows,\n hotKeys,\n showFirstPage,\n showLastPage,\n visibleCount,\n className,\n style,\n getItemAs,\n getItemAttributes,\n getItemRef,\n ...otherProps\n } = props;\n\n const valueRef = useMutableRef(guardCurrentPage(valueProp, items));\n const onChangeRef = useMutableRef(onChange);\n\n const onItemClick: PaginationPropOnItemClick<PaginationItem> = useCallback(\n ({ key }, { e }) => {\n if (key !== valueRef.current && typeof key === 'number') {\n onChangeRef.current?.(key, { e });\n }\n },\n [],\n );\n\n const handleNext = useCallback(\n (e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(Math.min(valueRef.current + 1, items), { e });\n },\n [items],\n );\n\n const handlePrevious = useCallback((e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(Math.max(valueRef.current - 1, 1), { e });\n }, []);\n\n const handleFirst = useCallback((e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(1, { e });\n }, []);\n\n const handleLast = useCallback(\n (e: React.MouseEvent | KeyboardEvent) => {\n onChangeRef.current?.(items, { e });\n },\n [items],\n );\n\n const [pages, refs, symbolSize] = usePaginationItems({\n showFirstPage,\n showLastPage,\n items,\n visibleCount,\n size,\n value: valueRef.current,\n containerEventListener,\n hotKeys,\n outerMostArrows,\n type,\n arrows,\n handleNext,\n handlePrevious,\n });\n\n const rootRef = useForkRef([refs[4], ref]);\n\n const renderArrow = (\n item: PaginationPropArrow,\n type: PaginationArrowTypes,\n ref: React.Ref<HTMLButtonElement> | undefined,\n hotKey: PaginationPropHotKey | undefined,\n onClick?: React.MouseEventHandler,\n ) => {\n const flag =\n type === 'first' || type === 'previous'\n ? valueRef.current > 1\n : valueRef.current < items;\n const orientation =\n type === 'first' || type === 'previous' ? 'start' : 'end';\n if (typeof item === 'object') {\n const { label, icon = paginationArrowIconsMap[type] } = item;\n\n return (\n <PaginationArrow\n label={label}\n icon={icon}\n disabled={!flag}\n size={size}\n form={form}\n ref={ref}\n orientation={orientation}\n caption={hotKey?.label}\n onClick={onClick}\n />\n );\n }\n return (\n <PaginationArrow\n orientation={orientation}\n icon={typeof item === 'function' ? item : paginationArrowIconsMap[type]}\n disabled={!flag}\n size={size}\n form={form}\n ref={ref}\n onClick={onClick}\n />\n );\n };\n\n if (items <= 0) {\n return null;\n }\n\n return (\n <nav\n {...otherProps}\n className={cnPagination({ type }, [className])}\n ref={rootRef}\n style={{\n ['--pagination-symbol-size' as string]: `${symbolSize}px`,\n ...style,\n }}\n >\n {(outerMostArrows?.[0] || arrows?.[0]) && (\n <>\n {outerMostArrows?.[0] &&\n renderArrow(\n outerMostArrows[0],\n 'first',\n refs[0] as unknown as React.RefObject<HTMLButtonElement>,\n undefined,\n handleFirst,\n )}\n {arrows?.[0] &&\n renderArrow(\n arrows[0],\n 'previous',\n refs[1] as unknown as React.RefObject<HTMLButtonElement>,\n hotKeys?.[0],\n handlePrevious,\n )}\n </>\n )}\n\n {type === 'default' ? (\n <PaginationList\n items={pages}\n form={form}\n size={size}\n onItemClick={onItemClick}\n value={{\n key: valueRef.current,\n label: valueRef.current.toString(),\n clickable: true,\n }}\n getItemKey={defaultGetItemKey}\n getItemClickable={defaultGetItemClickable}\n getItemAs={getItemAs}\n getItemAttributes={getItemAttributes}\n getItemRef={getItemRef}\n />\n ) : (\n <PaginationNumberInput\n form={form}\n size={size}\n total={items}\n value={valueRef.current}\n onChange={onChange}\n getTotalLabel={getTotalLabel}\n />\n )}\n {(arrows?.[1] || outerMostArrows?.[1]) && (\n <>\n {arrows?.[1] &&\n renderArrow(\n arrows[1],\n 'next',\n refs[2] as unknown as React.RefObject<HTMLButtonElement>,\n hotKeys?.[1],\n handleNext,\n )}\n {outerMostArrows?.[1] &&\n renderArrow(\n outerMostArrows[1],\n 'last',\n refs[3] as unknown as React.RefObject<HTMLButtonElement>,\n undefined,\n handleLast,\n )}\n </>\n )}\n {type === 'default' && (\n <PaginationSizeCalculateHelper refs={refs} size={size} />\n )}\n </nav>\n );\n};\n\nexport const Pagination = forwardRef(PaginationRender) as PaginationComponent;\n"],"mappings":"wjCAAA,yBAEA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,WAA5B,KAA+C,OAA/C,CAEA,OAASC,UAAT,8BACA,OAASC,aAAT,iCACA,OAASC,EAAT,uBAEA,OACEC,uBADF,CAEEC,iBAFF,CAGEC,gBAHF,CAIE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,CAET,MAFS,CAGT0B,CAAI,CAAC,CAAD,CAHK,QAKTF,CALS,CAVf,CA1DJ,CA6EY,SAAT,GAAA5B,CAAI,EACH,oBAAC,6BAAD,EAA+B,IAAI,CAAE8B,CAArC,CAA2C,IAAI,CAAEhC,CAAjD,EA9EJ,CAkFH,C,CAED,MAAO,IAAM6C,WAAU,CAAGtE,UAAU,CAACkB,gBAAD,CAA7B"}
@@ -1 +1 @@
1
- .PaginationList{display:flex;gap:var(--pagination-gap);width:-moz-max-content;width:max-content}.PaginationList-Item.Button.PaginationItem{width:calc(var(--pagination-item-label-lenght)*var(--pagination-symbol-size) + var(--pagination-item-ph)*2)}
1
+ .PaginationList{display:flex;gap:var(--pagination-gap);width:-moz-max-content;width:max-content}.PaginationList-Item.Button.PaginationItem{width:calc(var(--pagination-item-label-length)*var(--pagination-symbol-size) + var(--pagination-item-ph)*2)}