@consta/uikit 4.31.2 → 4.33.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 (233) hide show
  1. package/AttachmentCanary/index.d.ts +1 -0
  2. package/AttachmentCanary/index.js +1 -0
  3. package/PaginationCanary/index.d.ts +1 -0
  4. package/PaginationCanary/index.js +1 -0
  5. package/TooltipCanary/index.d.ts +1 -0
  6. package/TooltipCanary/index.js +1 -0
  7. package/__internal__/src/components/AttachmentCanary/Attachment.css +1 -0
  8. package/__internal__/src/components/AttachmentCanary/AttachmentCanary.d.ts +5 -0
  9. package/__internal__/src/components/AttachmentCanary/AttachmentCanary.js +2 -0
  10. package/__internal__/src/components/AttachmentCanary/AttachmentCanary.js.map +1 -0
  11. package/__internal__/src/components/AttachmentCanary/index.d.ts +1 -0
  12. package/__internal__/src/components/AttachmentCanary/index.js +2 -0
  13. package/__internal__/src/components/AttachmentCanary/index.js.map +1 -0
  14. package/__internal__/src/components/AttachmentCanary/types.d.ts +22 -0
  15. package/__internal__/src/components/AttachmentCanary/types.js +2 -0
  16. package/__internal__/src/components/AttachmentCanary/types.js.map +1 -0
  17. package/__internal__/src/components/BadgeGroup/BadgeGroup.css +1 -1
  18. package/__internal__/src/components/BadgeGroup/BadgeGroup.js +1 -1
  19. package/__internal__/src/components/BadgeGroup/BadgeGroup.js.map +1 -1
  20. package/__internal__/src/components/BookmarkTabsCanary/BookmarkTabsCanary.js +1 -1
  21. package/__internal__/src/components/BookmarkTabsCanary/BookmarkTabsCanary.js.map +1 -1
  22. package/__internal__/src/components/BookmarkTabsCanary/BookmarkTabsTab/BookmarkTabsTab.css +1 -1
  23. package/__internal__/src/components/BookmarkTabsCanary/BookmarkTabsTab/BookmarkTabsTab.js +1 -1
  24. package/__internal__/src/components/BookmarkTabsCanary/BookmarkTabsTab/BookmarkTabsTab.js.map +1 -1
  25. package/__internal__/src/components/BookmarkTabsCanary/types.d.ts +2 -2
  26. package/__internal__/src/components/BookmarkTabsCanary/types.js.map +1 -1
  27. package/__internal__/src/components/BookmarkTabsCanary/useBookmarkTabs.d.ts +1 -1
  28. package/__internal__/src/components/BookmarkTabsCanary/useBookmarkTabs.js.map +1 -1
  29. package/__internal__/src/components/CheckboxGroup/CheckboxGroup.js +1 -1
  30. package/__internal__/src/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  31. package/__internal__/src/components/CheckboxGroup/helper.d.ts +1 -0
  32. package/__internal__/src/components/CheckboxGroup/types.d.ts +13 -9
  33. package/__internal__/src/components/CheckboxGroup/types.js +1 -1
  34. package/__internal__/src/components/CheckboxGroup/types.js.map +1 -1
  35. package/__internal__/src/components/ChoiceGroup/types.d.ts +3 -3
  36. package/__internal__/src/components/ChoiceGroup/types.js.map +1 -1
  37. package/__internal__/src/components/ChoiceGroupDeprecated/ChoiceGroupDeprecated.d.ts +3 -3
  38. package/__internal__/src/components/ChoiceGroupDeprecated/ChoiceGroupDeprecated.js.map +1 -1
  39. package/__internal__/src/components/Combobox/Combobox.js +1 -1
  40. package/__internal__/src/components/Combobox/Combobox.js.map +1 -1
  41. package/__internal__/src/components/Combobox/helpers.d.ts +3 -1
  42. package/__internal__/src/components/Combobox/helpers.js +1 -1
  43. package/__internal__/src/components/Combobox/helpers.js.map +1 -1
  44. package/__internal__/src/components/ComboboxCanary/ComboboxCanary.js +1 -1
  45. package/__internal__/src/components/ComboboxCanary/ComboboxCanary.js.map +1 -1
  46. package/__internal__/src/components/ComboboxCanary/helpers.d.ts +3 -1
  47. package/__internal__/src/components/ComboboxCanary/helpers.js +1 -1
  48. package/__internal__/src/components/ComboboxCanary/helpers.js.map +1 -1
  49. package/__internal__/src/components/DateTime/helpers/getHandleSelectDate.d.ts +3 -3
  50. package/__internal__/src/components/DateTime/helpers/getHandleSelectDate.js.map +1 -1
  51. package/__internal__/src/components/DateTime/helpers/types.d.ts +4 -4
  52. package/__internal__/src/components/DateTime/helpers/types.js.map +1 -1
  53. package/__internal__/src/components/DragNDropField/DragNDropFieldTooltip/DragNDropFieldTooltip.js +1 -1
  54. package/__internal__/src/components/DragNDropField/DragNDropFieldTooltip/DragNDropFieldTooltip.js.map +1 -1
  55. package/__internal__/src/components/Loader/Loader.css +1 -1
  56. package/__internal__/src/components/Loader/Loader.d.ts +1 -1
  57. package/__internal__/src/components/Loader/Loader.js +1 -1
  58. package/__internal__/src/components/Loader/Loader.js.map +1 -1
  59. package/__internal__/src/components/LoaderCanary/Loader.css +1 -1
  60. package/__internal__/src/components/LoaderCanary/LoaderCanary.d.ts +2 -2
  61. package/__internal__/src/components/LoaderCanary/types.d.ts +1 -1
  62. package/__internal__/src/components/LoaderCanary/types.js +1 -1
  63. package/__internal__/src/components/LoaderCanary/types.js.map +1 -1
  64. package/__internal__/src/components/PaginationCanary/Pagination.css +1 -0
  65. package/__internal__/src/components/PaginationCanary/PaginationArrow/PaginationArrow.css +1 -0
  66. package/__internal__/src/components/PaginationCanary/PaginationArrow/PaginationArrow.d.ts +11 -0
  67. package/__internal__/src/components/PaginationCanary/PaginationArrow/PaginationArrow.js +2 -0
  68. package/__internal__/src/components/PaginationCanary/PaginationArrow/PaginationArrow.js.map +1 -0
  69. package/__internal__/src/components/PaginationCanary/PaginationArrow/index.d.ts +1 -0
  70. package/__internal__/src/components/PaginationCanary/PaginationArrow/index.js +2 -0
  71. package/__internal__/src/components/PaginationCanary/PaginationArrow/index.js.map +1 -0
  72. package/__internal__/src/components/PaginationCanary/PaginationBase/PaginationBase.css +1 -0
  73. package/__internal__/src/components/PaginationCanary/PaginationBase/PaginationBase.d.ts +3 -0
  74. package/__internal__/src/components/PaginationCanary/PaginationBase/PaginationBase.js +2 -0
  75. package/__internal__/src/components/PaginationCanary/PaginationBase/PaginationBase.js.map +1 -0
  76. package/__internal__/src/components/PaginationCanary/PaginationBase/index.d.ts +1 -0
  77. package/__internal__/src/components/PaginationCanary/PaginationBase/index.js +2 -0
  78. package/__internal__/src/components/PaginationCanary/PaginationBase/index.js.map +1 -0
  79. package/__internal__/src/components/PaginationCanary/PaginationCanary.d.ts +3 -0
  80. package/__internal__/src/components/PaginationCanary/PaginationCanary.js +2 -0
  81. package/__internal__/src/components/PaginationCanary/PaginationCanary.js.map +1 -0
  82. package/__internal__/src/components/PaginationCanary/PaginationItem/PaginationItem.css +1 -0
  83. package/__internal__/src/components/PaginationCanary/PaginationItem/PaginationItem.d.ts +3 -0
  84. package/__internal__/src/components/PaginationCanary/PaginationItem/PaginationItem.js +2 -0
  85. package/__internal__/src/components/PaginationCanary/PaginationItem/PaginationItem.js.map +1 -0
  86. package/__internal__/src/components/PaginationCanary/PaginationItem/index.d.ts +1 -0
  87. package/__internal__/src/components/PaginationCanary/PaginationItem/index.js +2 -0
  88. package/__internal__/src/components/PaginationCanary/PaginationItem/index.js.map +1 -0
  89. package/__internal__/src/components/PaginationCanary/PaginationList/PaginationList.css +1 -0
  90. package/__internal__/src/components/PaginationCanary/PaginationList/PaginationList.d.ts +3 -0
  91. package/__internal__/src/components/PaginationCanary/PaginationList/PaginationList.js +2 -0
  92. package/__internal__/src/components/PaginationCanary/PaginationList/PaginationList.js.map +1 -0
  93. package/__internal__/src/components/PaginationCanary/PaginationList/index.d.ts +1 -0
  94. package/__internal__/src/components/PaginationCanary/PaginationList/index.js +2 -0
  95. package/__internal__/src/components/PaginationCanary/PaginationList/index.js.map +1 -0
  96. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/PaginationNumberInput.css +1 -0
  97. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/PaginationNumberInput.d.ts +10 -0
  98. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/PaginationNumberInput.js +2 -0
  99. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/PaginationNumberInput.js.map +1 -0
  100. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/index.d.ts +1 -0
  101. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/index.js +2 -0
  102. package/__internal__/src/components/PaginationCanary/PaginationNumberInput/index.js.map +1 -0
  103. package/__internal__/src/components/PaginationCanary/helpers.d.ts +560 -0
  104. package/__internal__/src/components/PaginationCanary/helpers.js +2 -0
  105. package/__internal__/src/components/PaginationCanary/helpers.js.map +1 -0
  106. package/__internal__/src/components/PaginationCanary/index.d.ts +2 -0
  107. package/__internal__/src/components/PaginationCanary/index.js +2 -0
  108. package/__internal__/src/components/PaginationCanary/index.js.map +1 -0
  109. package/__internal__/src/components/PaginationCanary/types.d.ts +148 -0
  110. package/__internal__/src/components/PaginationCanary/types.js +2 -0
  111. package/__internal__/src/components/PaginationCanary/types.js.map +1 -0
  112. package/__internal__/src/components/PaginationCanary/usePaginationItems.d.ts +19 -0
  113. package/__internal__/src/components/PaginationCanary/usePaginationItems.js +2 -0
  114. package/__internal__/src/components/PaginationCanary/usePaginationItems.js.map +1 -0
  115. package/__internal__/src/components/PaginationCanary/usePaginationKeys.d.ts +10 -0
  116. package/__internal__/src/components/PaginationCanary/usePaginationKeys.js +2 -0
  117. package/__internal__/src/components/PaginationCanary/usePaginationKeys.js.map +1 -0
  118. package/__internal__/src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.js +1 -1
  119. package/__internal__/src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.js.map +1 -1
  120. package/__internal__/src/components/Responses/Responses.css +1 -1
  121. package/__internal__/src/components/Responses/Responses.d.ts +1 -1
  122. package/__internal__/src/components/Responses/Responses.js +1 -1
  123. package/__internal__/src/components/Responses/Responses.js.map +1 -1
  124. package/__internal__/src/components/Responses403/Responses403.js +1 -1
  125. package/__internal__/src/components/Responses403/Responses403.js.map +1 -1
  126. package/__internal__/src/components/Responses500/Responses500.d.ts +2 -2
  127. package/__internal__/src/components/Responses500/Responses500.js +1 -1
  128. package/__internal__/src/components/Responses500/Responses500.js.map +1 -1
  129. package/__internal__/src/components/Responses503/Responses503.d.ts +2 -2
  130. package/__internal__/src/components/Responses503/Responses503.js +1 -1
  131. package/__internal__/src/components/Responses503/Responses503.js.map +1 -1
  132. package/__internal__/src/components/ResponsesConnectionError/ResponsesConnectionError.js +1 -1
  133. package/__internal__/src/components/ResponsesConnectionError/ResponsesConnectionError.js.map +1 -1
  134. package/__internal__/src/components/ResponsesDeleted/ResponsesDeleted.js +1 -1
  135. package/__internal__/src/components/ResponsesDeleted/ResponsesDeleted.js.map +1 -1
  136. package/__internal__/src/components/Select/Select.js +1 -1
  137. package/__internal__/src/components/Select/Select.js.map +1 -1
  138. package/__internal__/src/components/Select/helpers.d.ts +2 -1
  139. package/__internal__/src/components/Select/helpers.js +1 -1
  140. package/__internal__/src/components/Select/helpers.js.map +1 -1
  141. package/__internal__/src/components/SelectCanary/SelectCanary.js +1 -1
  142. package/__internal__/src/components/SelectCanary/SelectCanary.js.map +1 -1
  143. package/__internal__/src/components/SelectCanary/helpers.d.ts +2 -1
  144. package/__internal__/src/components/SelectCanary/helpers.js +1 -1
  145. package/__internal__/src/components/SelectCanary/helpers.js.map +1 -1
  146. package/__internal__/src/components/SelectComponents/Select.css +1 -1
  147. package/__internal__/src/components/SelectComponentsCanary/Select.css +1 -1
  148. package/__internal__/src/components/Slider/SliderPoint/SliderPoint.js +1 -1
  149. package/__internal__/src/components/Slider/SliderPoint/SliderPoint.js.map +1 -1
  150. package/__internal__/src/components/Table/filtering.js +1 -1
  151. package/__internal__/src/components/Table/filtering.js.map +1 -1
  152. package/__internal__/src/components/Table/helpers.js +1 -1
  153. package/__internal__/src/components/Table/helpers.js.map +1 -1
  154. package/__internal__/src/components/Tabs/Tabs.js +1 -1
  155. package/__internal__/src/components/Tabs/Tabs.js.map +1 -1
  156. package/__internal__/src/components/Tabs/{FitModeDropdownWrapper → TabsFitModeDropdownWrapper}/TabsFitModeDropdownWrapper.d.ts +1 -1
  157. package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.js +2 -0
  158. package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/TabsFitModeDropdownWrapper.js.map +1 -0
  159. package/__internal__/src/components/Tabs/TabsFitModeDropdownWrapper/useFittingItems.js.map +1 -0
  160. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.js +2 -0
  161. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/TabsFitModeScrollWrapper.js.map +1 -0
  162. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js.map +1 -0
  163. package/__internal__/src/components/Tabs/TabsLine/TabsLine.js.map +1 -0
  164. package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.d.ts +2 -0
  165. package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.js +2 -0
  166. package/__internal__/src/components/Tabs/TabsListWrapper/TabsListWrapper.js.map +1 -0
  167. package/__internal__/src/components/Tabs/TabsListWrapper/index.d.ts +1 -0
  168. package/__internal__/src/components/Tabs/TabsListWrapper/index.js +2 -0
  169. package/__internal__/src/components/Tabs/TabsListWrapper/index.js.map +1 -0
  170. package/__internal__/src/components/Tabs/TabsMoreItems/TabsMoreItems.css +1 -0
  171. package/__internal__/src/components/Tabs/TabsMoreItems/TabsMoreItems.js +2 -0
  172. package/__internal__/src/components/Tabs/TabsMoreItems/TabsMoreItems.js.map +1 -0
  173. package/__internal__/src/components/Tabs/TabsTab/TabsTab.js.map +1 -0
  174. package/__internal__/src/components/Tabs/helpers.d.ts +329 -329
  175. package/__internal__/src/components/Tabs/helpers.js +1 -1
  176. package/__internal__/src/components/Tabs/helpers.js.map +1 -1
  177. package/__internal__/src/components/Tabs/index.d.ts +1 -1
  178. package/__internal__/src/components/Tabs/index.js +1 -1
  179. package/__internal__/src/components/Tabs/index.js.map +1 -1
  180. package/__internal__/src/components/Tabs/types.d.ts +3 -2
  181. package/__internal__/src/components/Tabs/types.js.map +1 -1
  182. package/__internal__/src/components/TabsDeprecated/FitModeScrollWrapper/helpers.js +1 -1
  183. package/__internal__/src/components/TabsDeprecated/FitModeScrollWrapper/helpers.js.map +1 -1
  184. package/__internal__/src/components/Theme/_color/Theme_color_gpnDark.css +1 -1
  185. package/__internal__/src/components/TooltipCanary/Tooltip.css +1 -0
  186. package/__internal__/src/components/TooltipCanary/TooltipCanary.d.ts +4 -0
  187. package/__internal__/src/components/TooltipCanary/TooltipCanary.js +2 -0
  188. package/__internal__/src/components/TooltipCanary/TooltipCanary.js.map +1 -0
  189. package/__internal__/src/components/TooltipCanary/index.d.ts +2 -0
  190. package/__internal__/src/components/TooltipCanary/index.js +2 -0
  191. package/__internal__/src/components/TooltipCanary/index.js.map +1 -0
  192. package/__internal__/src/components/TooltipCanary/types.d.ts +23 -0
  193. package/__internal__/src/components/TooltipCanary/types.js +2 -0
  194. package/__internal__/src/components/TooltipCanary/types.js.map +1 -0
  195. package/__internal__/src/components/UserSelect/UserSelect.js +1 -1
  196. package/__internal__/src/components/UserSelect/UserSelect.js.map +1 -1
  197. package/__internal__/src/components/UserSelect/helpers.d.ts +3 -1
  198. package/__internal__/src/components/UserSelect/helpers.js +1 -1
  199. package/__internal__/src/components/UserSelect/helpers.js.map +1 -1
  200. package/__internal__/src/components/UserSelectCanary/UserSelectCanary.js +1 -1
  201. package/__internal__/src/components/UserSelectCanary/UserSelectCanary.js.map +1 -1
  202. package/__internal__/src/components/UserSelectCanary/helpers.d.ts +3 -1
  203. package/__internal__/src/components/UserSelectCanary/helpers.js +1 -1
  204. package/__internal__/src/components/UserSelectCanary/helpers.js.map +1 -1
  205. package/__internal__/src/hocs/withTooltip/withTooltip.d.ts +1 -1
  206. package/__internal__/src/hocs/withTooltip/withTooltip.js +1 -1
  207. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  208. package/package.json +1 -1
  209. package/__internal__/src/components/Tabs/FitModeDropdownWrapper/TabsFitModeDropdownWrapper.js +0 -2
  210. package/__internal__/src/components/Tabs/FitModeDropdownWrapper/TabsFitModeDropdownWrapper.js.map +0 -1
  211. package/__internal__/src/components/Tabs/FitModeDropdownWrapper/useFittingItems.js.map +0 -1
  212. package/__internal__/src/components/Tabs/FitModeScrollWrapper/TabsFitModeScrollWrapper.js +0 -2
  213. package/__internal__/src/components/Tabs/FitModeScrollWrapper/TabsFitModeScrollWrapper.js.map +0 -1
  214. package/__internal__/src/components/Tabs/FitModeScrollWrapper/__test__/helpers.test.js.map +0 -1
  215. package/__internal__/src/components/Tabs/Line/TabsLine.js.map +0 -1
  216. package/__internal__/src/components/Tabs/MoreItems/TabsMoreItems.css +0 -1
  217. package/__internal__/src/components/Tabs/MoreItems/TabsMoreItems.js +0 -2
  218. package/__internal__/src/components/Tabs/MoreItems/TabsMoreItems.js.map +0 -1
  219. package/__internal__/src/components/Tabs/Tab/TabsTab.js.map +0 -1
  220. /package/__internal__/src/components/Tabs/{FitModeDropdownWrapper → TabsFitModeDropdownWrapper}/TabsFitModeDropdownWrapper.css +0 -0
  221. /package/__internal__/src/components/Tabs/{FitModeDropdownWrapper → TabsFitModeDropdownWrapper}/useFittingItems.d.ts +0 -0
  222. /package/__internal__/src/components/Tabs/{FitModeDropdownWrapper → TabsFitModeDropdownWrapper}/useFittingItems.js +0 -0
  223. /package/__internal__/src/components/Tabs/{FitModeScrollWrapper → TabsFitModeScrollWrapper}/TabsFitModeScrollWrapper.css +0 -0
  224. /package/__internal__/src/components/Tabs/{FitModeScrollWrapper → TabsFitModeScrollWrapper}/TabsFitModeScrollWrapper.d.ts +0 -0
  225. /package/__internal__/src/components/Tabs/{FitModeScrollWrapper → TabsFitModeScrollWrapper}/__test__/helpers.test.d.ts +0 -0
  226. /package/__internal__/src/components/Tabs/{FitModeScrollWrapper → TabsFitModeScrollWrapper}/__test__/helpers.test.js +0 -0
  227. /package/__internal__/src/components/Tabs/{Line → TabsLine}/TabsLine.css +0 -0
  228. /package/__internal__/src/components/Tabs/{Line → TabsLine}/TabsLine.d.ts +0 -0
  229. /package/__internal__/src/components/Tabs/{Line → TabsLine}/TabsLine.js +0 -0
  230. /package/__internal__/src/components/Tabs/{MoreItems → TabsMoreItems}/TabsMoreItems.d.ts +0 -0
  231. /package/__internal__/src/components/Tabs/{Tab → TabsTab}/TabsTab.css +0 -0
  232. /package/__internal__/src/components/Tabs/{Tab → TabsTab}/TabsTab.d.ts +0 -0
  233. /package/__internal__/src/components/Tabs/{Tab → TabsTab}/TabsTab.js +0 -0
@@ -0,0 +1,148 @@
1
+ import { IconComponent } from '@consta/icons/Icon';
2
+ import React from 'react';
3
+ import { AsAttributes, AsTags } from "../../utils/types/AsTags";
4
+ import { PropsWithAsAttributes } from "../../utils/types/PropsWithAsAttributes";
5
+ import { PropsWithHTMLAttributes, PropsWithHTMLAttributesAndRef } from "../../utils/types/PropsWithHTMLAttributes";
6
+ export declare const paginationPropForm: readonly ["default", "brick", "round"];
7
+ export declare type PaginationPropForm = typeof paginationPropForm[number];
8
+ export declare const paginationPropFormDefault: PaginationPropForm;
9
+ export declare const paginationPropSize: readonly ["m", "xs", "s", "l"];
10
+ export declare type PaginationPropSize = typeof paginationPropSize[number];
11
+ export declare const paginationPropSizeDefault: PaginationPropSize;
12
+ export declare const paginationPropType: readonly ["default", "input"];
13
+ export declare type PaginationPropType = typeof paginationPropType[number];
14
+ export declare const paginationPropTypeDefault: PaginationPropType;
15
+ export declare type PaginationArrowTypes = 'first' | 'previous' | 'next' | 'last';
16
+ export declare type PaginationPropHotKey = {
17
+ label: string;
18
+ keys: string[];
19
+ };
20
+ export declare type PaginationPropOnItemClick<ITEM> = (item: ITEM, params: {
21
+ e: React.MouseEvent;
22
+ }) => void;
23
+ export declare type PaginationPropOnChange<ITEM> = (value: ITEM, params: {
24
+ e: React.MouseEvent | Event | React.KeyboardEvent;
25
+ }) => void;
26
+ export declare type PaginationPropArrow = boolean | IconComponent | {
27
+ label?: string;
28
+ icon?: IconComponent;
29
+ };
30
+ export declare type PaginationBasePropArrow = false | {
31
+ label?: string;
32
+ disabled?: boolean;
33
+ icon?: IconComponent;
34
+ onClick?: React.MouseEventHandler;
35
+ };
36
+ declare type PaginationArrowsProps = {
37
+ outerMostArrows?: [PaginationPropArrow?, PaginationPropArrow?];
38
+ } & ({
39
+ arrows: [PaginationPropArrow?, PaginationPropArrow?];
40
+ hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];
41
+ } | {
42
+ arrows?: never;
43
+ hotKeys?: never;
44
+ });
45
+ declare type PaginationBaseArrowsProps = {
46
+ outerMostArrows?: [PaginationBasePropArrow?, PaginationBasePropArrow?];
47
+ } & ({
48
+ arrows: [PaginationBasePropArrow?, PaginationBasePropArrow?];
49
+ hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];
50
+ } | {
51
+ arrows?: never;
52
+ hotKeys?: never;
53
+ });
54
+ declare type Props<ITEM> = {
55
+ form?: PaginationPropForm;
56
+ size?: PaginationPropSize;
57
+ containerEventListener?: HTMLElement | Window;
58
+ value?: ITEM;
59
+ items?: ITEM extends number ? number : ITEM[];
60
+ onChange?: PaginationPropOnChange<ITEM>;
61
+ };
62
+ export declare type PaginationProps<TYPE extends PaginationPropType> = PropsWithHTMLAttributes<{
63
+ type?: TYPE;
64
+ showFirstPage?: boolean;
65
+ showLastPage?: boolean;
66
+ visibleCount?: number;
67
+ } & Props<number>, HTMLDivElement> & PaginationArrowsProps & (TYPE extends 'input' ? {
68
+ getTotalLabel?: (pages: number) => string | number;
69
+ } : {
70
+ getTotalLabel?: never;
71
+ });
72
+ export declare type PaginationComponent = <TYPE extends PaginationPropType>(props: PaginationProps<TYPE>) => React.ReactElement | null;
73
+ export declare type PaginationItem = {
74
+ key: number;
75
+ label: string;
76
+ active?: boolean;
77
+ clickable?: boolean;
78
+ page: number;
79
+ };
80
+ export declare type PaginationBaseItemDefault = {
81
+ key: string | number;
82
+ label?: string;
83
+ as?: AsTags;
84
+ ref?: React.RefObject<HTMLElement>;
85
+ clickable?: boolean;
86
+ attributes?: AsAttributes;
87
+ onClick?: React.MouseEventHandler;
88
+ };
89
+ export declare type PaginationPropGetItemKey<ITEM> = (item: ITEM) => PaginationBaseItemDefault['key'];
90
+ export declare type PaginationPropGetItemLabel<ITEM> = (item: ITEM) => PaginationBaseItemDefault['label'];
91
+ export declare type PaginationPropGetItemClickable<ITEM> = (item: ITEM) => PaginationBaseItemDefault['clickable'];
92
+ export declare type PaginationPropGetItemAs<ITEM> = (item: ITEM) => PaginationBaseItemDefault['as'];
93
+ export declare type PaginationPropGetItemAttributes<ITEM> = (item: ITEM) => PaginationBaseItemDefault['attributes'];
94
+ export declare type PaginationPropGetItemRef<ITEM> = (item: ITEM) => PaginationBaseItemDefault['ref'];
95
+ export declare type PaginationPropGetItemOnClick<ITEM> = (item: ITEM) => PaginationBaseItemDefault['onClick'];
96
+ declare type Mappers<ITEM = PaginationBaseItemDefault> = {
97
+ getItemLabel?: PaginationPropGetItemLabel<ITEM>;
98
+ getItemKey?: PaginationPropGetItemKey<ITEM>;
99
+ getItemAs?: PaginationPropGetItemAs<ITEM>;
100
+ getItemAttributes?: PaginationPropGetItemAttributes<ITEM>;
101
+ getItemRef?: PaginationPropGetItemRef<ITEM>;
102
+ getItemClickable?: PaginationPropGetItemClickable<ITEM>;
103
+ getItemOnClick?: PaginationPropGetItemOnClick<ITEM>;
104
+ };
105
+ export declare type PaginationBaseProps<ITEM = PaginationBaseItemDefault> = PropsWithHTMLAttributes<Mappers<ITEM> & Props<ITEM> & PaginationBaseArrowsProps & (ITEM extends {
106
+ key: PaginationBaseItemDefault['key'];
107
+ } ? {} : {
108
+ getItemKey: PaginationPropGetItemKey<ITEM>;
109
+ }), HTMLDivElement>;
110
+ export declare type PaginationBaseComponent = <ITEM = PaginationBaseItemDefault>(props: PaginationBaseProps<ITEM>) => React.ReactElement | null;
111
+ export declare type PaginationArrowProps = PropsWithHTMLAttributes<{
112
+ icon?: IconComponent;
113
+ form?: PaginationPropForm;
114
+ size?: PaginationPropSize;
115
+ disabled?: boolean;
116
+ orientation?: 'start' | 'end';
117
+ label?: string;
118
+ caption?: string;
119
+ }, HTMLButtonElement>;
120
+ export declare type PaginationItemProps<AS extends AsTags = 'button'> = PropsWithAsAttributes<{
121
+ form?: PaginationPropForm;
122
+ size?: PaginationPropSize;
123
+ label?: string;
124
+ active?: boolean;
125
+ clickable?: boolean;
126
+ }, AS>;
127
+ export declare type PaginationItemComponent = <AS extends AsTags = 'button'>(props: PaginationItemProps<AS>) => React.ReactElement | null;
128
+ export declare type PaginationNumberInputProps = PropsWithHTMLAttributes<{
129
+ value?: number;
130
+ onChange?: PaginationPropOnChange<number>;
131
+ form?: PaginationPropForm;
132
+ size?: PaginationPropSize;
133
+ total: number;
134
+ getTotalLabel?: (pages: number) => string | number;
135
+ }, HTMLDivElement>;
136
+ export declare type PaginationListProps<ITEM> = PropsWithHTMLAttributesAndRef<{
137
+ form?: PaginationPropForm;
138
+ size?: PaginationPropSize;
139
+ items: ITEM[];
140
+ value?: ITEM;
141
+ onItemClick?: PaginationPropOnItemClick<ITEM>;
142
+ }, HTMLDivElement> & Mappers<ITEM> & (ITEM extends {
143
+ label: string;
144
+ } ? {} : {
145
+ getItemKey: PaginationPropGetItemKey<ITEM>;
146
+ });
147
+ export declare type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(props: PaginationListProps<ITEM>) => React.ReactElement | null;
148
+ export {};
@@ -0,0 +1,2 @@
1
+ export var paginationPropForm=["default","brick","round"];export var paginationPropFormDefault=paginationPropForm[0];export var paginationPropSize=["m","xs","s","l"];export var paginationPropSizeDefault=paginationPropSize[0];export var paginationPropType=["default","input"];export var paginationPropTypeDefault=paginationPropType[0];
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","names":["paginationPropForm","paginationPropFormDefault","paginationPropSize","paginationPropSizeDefault","paginationPropType","paginationPropTypeDefault"],"sources":["../../../../../src/components/PaginationCanary/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { AsAttributes, AsTags } from '##/utils/types/AsTags';\nimport { PropsWithAsAttributes } from '##/utils/types/PropsWithAsAttributes';\nimport {\n PropsWithHTMLAttributes,\n PropsWithHTMLAttributesAndRef,\n} from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const paginationPropForm = ['default', 'brick', 'round'] as const;\nexport type PaginationPropForm = typeof paginationPropForm[number];\nexport const paginationPropFormDefault: PaginationPropForm =\n paginationPropForm[0];\n\nexport const paginationPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type PaginationPropSize = typeof paginationPropSize[number];\nexport const paginationPropSizeDefault: PaginationPropSize =\n paginationPropSize[0];\n\nexport const paginationPropType = ['default', 'input'] as const;\nexport type PaginationPropType = typeof paginationPropType[number];\nexport const paginationPropTypeDefault: PaginationPropType =\n paginationPropType[0];\n\nexport type PaginationArrowTypes = 'first' | 'previous' | 'next' | 'last';\n\nexport type PaginationPropHotKey = { label: string; keys: string[] };\n\nexport type PaginationPropOnItemClick<ITEM> = (\n item: ITEM,\n params: { e: React.MouseEvent },\n) => void;\n\nexport type PaginationPropOnChange<ITEM> = (\n value: ITEM,\n params: { e: React.MouseEvent | Event | React.KeyboardEvent },\n) => void;\n\n// ARROWS\n\nexport type PaginationPropArrow =\n | boolean\n | IconComponent\n | {\n label?: string;\n icon?: IconComponent;\n };\n\nexport type PaginationBasePropArrow =\n | false\n | {\n label?: string;\n disabled?: boolean;\n icon?: IconComponent;\n onClick?: React.MouseEventHandler;\n };\n\ntype PaginationArrowsProps = {\n outerMostArrows?: [PaginationPropArrow?, PaginationPropArrow?];\n} & (\n | {\n arrows: [PaginationPropArrow?, PaginationPropArrow?];\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n }\n | {\n arrows?: never;\n hotKeys?: never;\n }\n);\n\ntype PaginationBaseArrowsProps = {\n outerMostArrows?: [PaginationBasePropArrow?, PaginationBasePropArrow?];\n} & (\n | {\n arrows: [PaginationBasePropArrow?, PaginationBasePropArrow?];\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n }\n | {\n arrows?: never;\n hotKeys?: never;\n }\n);\n\ntype Props<ITEM> = {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n containerEventListener?: HTMLElement | Window;\n value?: ITEM;\n items?: ITEM extends number ? number : ITEM[];\n onChange?: PaginationPropOnChange<ITEM>;\n};\n\nexport type PaginationProps<TYPE extends PaginationPropType> =\n PropsWithHTMLAttributes<\n {\n type?: TYPE;\n showFirstPage?: boolean;\n showLastPage?: boolean;\n visibleCount?: number;\n } & Props<number>,\n HTMLDivElement\n > &\n PaginationArrowsProps &\n (TYPE extends 'input'\n ? { getTotalLabel?: (pages: number) => string | number }\n : {\n getTotalLabel?: never;\n });\n\nexport type PaginationComponent = <TYPE extends PaginationPropType>(\n props: PaginationProps<TYPE>,\n) => React.ReactElement | null;\n\nexport type PaginationItem = {\n key: number;\n label: string;\n active?: boolean;\n clickable?: boolean;\n page: number;\n};\n\nexport type PaginationBaseItemDefault = {\n key: string | number;\n label?: string;\n as?: AsTags;\n ref?: React.RefObject<HTMLElement>;\n clickable?: boolean;\n attributes?: AsAttributes;\n onClick?: React.MouseEventHandler;\n};\n\nexport type PaginationPropGetItemKey<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['key'];\nexport type PaginationPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['label'];\nexport type PaginationPropGetItemClickable<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['clickable'];\nexport type PaginationPropGetItemAs<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['as'];\nexport type PaginationPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['attributes'];\nexport type PaginationPropGetItemRef<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['ref'];\nexport type PaginationPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => PaginationBaseItemDefault['onClick'];\n\ntype Mappers<ITEM = PaginationBaseItemDefault> = {\n getItemLabel?: PaginationPropGetItemLabel<ITEM>;\n getItemKey?: PaginationPropGetItemKey<ITEM>;\n getItemAs?: PaginationPropGetItemAs<ITEM>;\n getItemAttributes?: PaginationPropGetItemAttributes<ITEM>;\n getItemRef?: PaginationPropGetItemRef<ITEM>;\n getItemClickable?: PaginationPropGetItemClickable<ITEM>;\n getItemOnClick?: PaginationPropGetItemOnClick<ITEM>;\n};\n\nexport type PaginationBaseProps<ITEM = PaginationBaseItemDefault> =\n PropsWithHTMLAttributes<\n Mappers<ITEM> &\n Props<ITEM> &\n PaginationBaseArrowsProps &\n (ITEM extends { key: PaginationBaseItemDefault['key'] }\n ? {}\n : {\n getItemKey: PaginationPropGetItemKey<ITEM>;\n }),\n HTMLDivElement\n >;\n\nexport type PaginationBaseComponent = <ITEM = PaginationBaseItemDefault>(\n props: PaginationBaseProps<ITEM>,\n) => React.ReactElement | null;\n\nexport type PaginationArrowProps = PropsWithHTMLAttributes<\n {\n icon?: IconComponent;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n disabled?: boolean;\n orientation?: 'start' | 'end';\n label?: string;\n caption?: string;\n },\n HTMLButtonElement\n>;\n\nexport type PaginationItemProps<AS extends AsTags = 'button'> =\n PropsWithAsAttributes<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n label?: string;\n active?: boolean;\n clickable?: boolean;\n },\n AS\n >;\n\nexport type PaginationItemComponent = <AS extends AsTags = 'button'>(\n props: PaginationItemProps<AS>,\n) => React.ReactElement | null;\n\nexport type PaginationNumberInputProps = PropsWithHTMLAttributes<\n {\n value?: number;\n onChange?: PaginationPropOnChange<number>;\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n total: number;\n getTotalLabel?: (pages: number) => string | number;\n },\n HTMLDivElement\n>;\n\nexport type PaginationListProps<ITEM> = PropsWithHTMLAttributesAndRef<\n {\n form?: PaginationPropForm;\n size?: PaginationPropSize;\n items: ITEM[];\n value?: ITEM;\n onItemClick?: PaginationPropOnItemClick<ITEM>;\n },\n HTMLDivElement\n> &\n Mappers<ITEM> &\n (ITEM extends { label: string }\n ? {}\n : {\n getItemKey: PaginationPropGetItemKey<ITEM>;\n });\n\nexport type PaginationListComponent = <ITEM extends PaginationBaseItemDefault>(\n props: PaginationListProps<ITEM>,\n) => React.ReactElement | null;\n"],"mappings":"AAUA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAAqB,OAArB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb,CAGP,MAAO,IAAME,mBAAkB,CAAG,CAAC,SAAD,CAAY,OAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { PaginationItem, PaginationPropHotKey, PaginationPropSize } from './types';
3
+ declare type UsePaginationItemsProps = {
4
+ visibleCount?: number;
5
+ value: number;
6
+ items: number;
7
+ showFirstPage?: boolean;
8
+ showLastPage?: boolean;
9
+ containerEventListener?: HTMLElement | Window;
10
+ size: PaginationPropSize;
11
+ hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];
12
+ };
13
+ export declare const itemSizeMap: Record<PaginationPropSize, number>;
14
+ export declare const usePaginationItems: (props: UsePaginationItemsProps) => {
15
+ buttonRefs: import("react").RefObject<HTMLButtonElement>[];
16
+ wrapperRef: import("react").RefObject<HTMLDivElement>;
17
+ pages: PaginationItem[];
18
+ };
19
+ export {};
@@ -0,0 +1,2 @@
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useEffect,useRef,useState}from"react";import{useComponentSize}from"../../hooks/useComponentSize";import{useRefs}from"../../hooks/useRefs";import{useResizeObserved}from"../../hooks/useResizeObserved";import{getPagesArray}from"./helpers";import{usePaginationKeys}from"./usePaginationKeys";export var itemSizeMap={l:48,m:40,s:32,xs:24};var getElementSize=function(a){var b;return null!==(b=null===a||void 0===a?void 0:a.offsetWidth)&&void 0!==b?b:0};export var usePaginationItems=function(a){var b=a.visibleCount,c=a.value,d=a.items,e=a.showFirstPage,f=a.showLastPage,g=a.containerEventListener,h=a.size,i=a.hotKeys,j=useState([]),k=_slicedToArray(j,2),l=k[0],m=k[1],n=useState(7),o=_slicedToArray(n,2),p=o[0],q=o[1],r=useRef(null),s=useRefs(4),t=useResizeObserved(s,getElementSize),u=_slicedToArray(t,4),v=u[0],w=u[1],x=u[2],y=u[3];usePaginationKeys({containerEventListener:g,hotKeys:i,prevButtonRef:s[1],nextButtonRef:s[2]});var z=useComponentSize(r),A=z.width;return useEffect(function(){q(Math.max(Math.floor((A-v-w-x-y)/(itemSizeMap[h]+2)),3+(e?2:0)+(f?2:0)))},[l,v,w,x,y,A,h]),useEffect(function(){m(getPagesArray({currentPage:c,totalPages:d,visibleCount:null!==b&&void 0!==b?b:p,showFirstPage:e,showLastPage:f}))},[b,e,f,c,d,p]),{buttonRefs:s,wrapperRef:r,pages:l}};
2
+ //# sourceMappingURL=usePaginationItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePaginationItems.js","names":["useEffect","useRef","useState","useComponentSize","useRefs","useResizeObserved","getPagesArray","usePaginationKeys","itemSizeMap","l","m","s","xs","getElementSize","el","offsetWidth","usePaginationItems","props","visibleCount","value","items","showFirstPage","showLastPage","containerEventListener","size","hotKeys","pages","setPages","maxVisiblePages","setMaxVisiblePages","wrapperRef","refs","firstWidth","prevWidth","nextWidth","lastWidth","prevButtonRef","nextButtonRef","width","Math","max","floor","currentPage","totalPages","buttonRefs"],"sources":["../../../../../src/components/PaginationCanary/usePaginationItems.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { useComponentSize } from '##/hooks/useComponentSize';\nimport { useRefs } from '##/hooks/useRefs';\nimport { useResizeObserved } from '##/hooks/useResizeObserved';\n\nimport { getPagesArray } from './helpers';\nimport {\n PaginationItem,\n PaginationPropHotKey,\n PaginationPropSize,\n} from './types';\nimport { usePaginationKeys } from './usePaginationKeys';\n\ntype UsePaginationItemsProps = {\n visibleCount?: number;\n value: number;\n items: number;\n showFirstPage?: boolean;\n showLastPage?: boolean;\n containerEventListener?: HTMLElement | Window;\n size: PaginationPropSize;\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n};\n\nexport const itemSizeMap: Record<PaginationPropSize, number> = {\n l: 48,\n m: 40,\n s: 32,\n xs: 24,\n};\n\nconst getElementSize = (el: HTMLElement | null) => el?.offsetWidth ?? 0;\n\nexport const usePaginationItems = (props: UsePaginationItemsProps) => {\n const {\n visibleCount,\n value,\n items,\n showFirstPage,\n showLastPage,\n containerEventListener,\n size,\n hotKeys,\n } = props;\n const [pages, setPages] = useState<PaginationItem[]>([]);\n const [maxVisiblePages, setMaxVisiblePages] = useState(7);\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n const refs = useRefs<HTMLButtonElement>(4);\n\n const [firstWidth, prevWidth, nextWidth, lastWidth] = useResizeObserved(\n refs,\n getElementSize,\n );\n\n usePaginationKeys({\n containerEventListener,\n hotKeys,\n prevButtonRef: refs[1],\n nextButtonRef: refs[2],\n });\n\n const { width } = useComponentSize(wrapperRef);\n\n useEffect(() => {\n setMaxVisiblePages(\n Math.max(\n Math.floor(\n (width - firstWidth - prevWidth - nextWidth - lastWidth) /\n (itemSizeMap[size] + 2),\n ),\n 3 + (showFirstPage ? 2 : 0) + (showLastPage ? 2 : 0),\n ),\n );\n }, [pages, firstWidth, prevWidth, nextWidth, lastWidth, width, size]);\n\n useEffect(() => {\n setPages(\n getPagesArray({\n currentPage: value,\n totalPages: items,\n visibleCount: visibleCount ?? maxVisiblePages,\n showFirstPage,\n showLastPage,\n }),\n );\n }, [\n visibleCount,\n showFirstPage,\n showLastPage,\n value,\n items,\n maxVisiblePages,\n ]);\n\n return {\n buttonRefs: refs,\n wrapperRef,\n pages,\n };\n};\n"],"mappings":"iEAAA,OAASA,SAAT,CAA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BAAsB,CAAtBA,CADgB,CAEhBE,OAAO,CAAPA,CAFgB,CAGhBW,aAAa,CAAEL,CAAI,CAAC,CAAD,CAHH,CAIhBM,aAAa,CAAEN,CAAI,CAAC,CAAD,CAJH,CAAD,CAtBmD,CA6BpE,MAAkB5B,gBAAgB,CAAC2B,CAAD,CAAlC,CAAQQ,CAAR,GAAQA,KAAR,CAiCA,MA/BAtC,UAAS,CAAC,UAAM,CACd6B,CAAkB,CAChBU,IAAI,CAACC,GAAL,CACED,IAAI,CAACE,KAAL,CACE,CAACH,CAAK,CAAGN,CAAR,CAAqBC,CAArB,CAAiCC,CAAjC,CAA6CC,CAA9C,GACG3B,WAAW,CAACgB,CAAD,CAAX,CAAoB,CADvB,CADF,CADF,CAKE,GAAKH,CAAa,CAAG,CAAH,CAAO,CAAzB,GAA+BC,CAAY,CAAG,CAAH,CAAO,CAAlD,CALF,CADgB,CASnB,CAVQ,CAUN,CAACI,CAAD,CAAQM,CAAR,CAAoBC,CAApB,CAA+BC,CAA/B,CAA0CC,CAA1C,CAAqDG,CAArD,CAA4Dd,CAA5D,CAVM,CA+BT,CAnBAxB,SAAS,CAAC,UAAM,CACd2B,CAAQ,CACNrB,aAAa,CAAC,CACZoC,WAAW,CAAEvB,CADD,CAEZwB,UAAU,CAAEvB,CAFA,CAGZF,YAAY,QAAEA,CAAF,WAAEA,CAAF,CAAEA,CAAF,CAAkBU,CAHlB,CAIZP,aAAa,CAAbA,CAJY,CAKZC,YAAY,CAAZA,CALY,CAAD,CADP,CAST,CAVQ,CAUN,CACDJ,CADC,CAEDG,CAFC,CAGDC,CAHC,CAIDH,CAJC,CAKDC,CALC,CAMDQ,CANC,CAVM,CAmBT,CAAO,CACLgB,UAAU,CAAEb,CADP,CAELD,UAAU,CAAVA,CAFK,CAGLJ,KAAK,CAALA,CAHK,CAKR,CAnEM"}
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { PaginationPropHotKey } from './types';
3
+ declare type UsePaginationKeysParams = {
4
+ containerEventListener?: HTMLElement | Window;
5
+ hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];
6
+ nextButtonRef?: React.RefObject<HTMLElement>;
7
+ prevButtonRef?: React.RefObject<HTMLElement>;
8
+ };
9
+ export declare const usePaginationKeys: (params: UsePaginationKeysParams) => void;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useCallback,useEffect,useLayoutEffect,useRef}from"react";export var usePaginationKeys=function(a){var b=a.containerEventListener,c=void 0===b?window:b,d=a.hotKeys,e=a.nextButtonRef,f=a.prevButtonRef,g=useRef([]),h=useRef(null!==d&&void 0!==d?d:[]),i=function(a){var b=a.key;g.current=g.current.filter(function(a){return a!==b})},j=useCallback(function(a){var b=a.key,c=_slicedToArray(h.current,2),d=c[0],i=c[1];if(null!==d&&void 0!==d&&d.keys.includes(b)||null!==i&&void 0!==i&&i.keys.includes(b)){var l=[].concat(_toConsumableArray(g.current),[b]);if(null!==i&&void 0!==i&&i.keys.every(function(a){return l.includes(a)})){var j;null===e||void 0===e||null===(j=e.current)||void 0===j?void 0:j.click()}else if(null!==d&&void 0!==d&&d.keys.every(function(a){return l.includes(a)})){var k;null===f||void 0===f||null===(k=f.current)||void 0===k?void 0:k.click()}g.current=l}},[d]);useLayoutEffect(function(){return c.addEventListener("keydown",j),c.addEventListener("keyup",i),function(){c.removeEventListener("keydown",j),c.removeEventListener("keyup",i)}},[e,f,c]),useEffect(function(){d&&(h.current=d)},[d])};
2
+ //# sourceMappingURL=usePaginationKeys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePaginationKeys.js","names":["useCallback","useEffect","useLayoutEffect","useRef","usePaginationKeys","params","containerEventListener","window","hotKeys","nextButtonRef","prevButtonRef","keys","hotKeysRef","keyUpListener","event","key","current","filter","hotKey","keyDownListener","start","end","includes","newKeys","every","click","addEventListener","removeEventListener"],"sources":["../../../../../src/components/PaginationCanary/usePaginationKeys.tsx"],"sourcesContent":["import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';\n\nimport { PaginationPropHotKey } from './types';\n\ntype UsePaginationKeysParams = {\n containerEventListener?: HTMLElement | Window;\n hotKeys?: [PaginationPropHotKey?, PaginationPropHotKey?];\n nextButtonRef?: React.RefObject<HTMLElement>;\n prevButtonRef?: React.RefObject<HTMLElement>;\n};\n\nexport const usePaginationKeys = (params: UsePaginationKeysParams) => {\n const {\n containerEventListener = window,\n hotKeys,\n nextButtonRef,\n prevButtonRef,\n } = params;\n const keys: React.MutableRefObject<string[]> = useRef([]);\n const hotKeysRef = useRef(hotKeys ?? []);\n\n const keyUpListener: EventListener = (event) => {\n const { key } = event as KeyboardEvent;\n keys.current = keys.current.filter((hotKey) => hotKey !== key);\n };\n\n const keyDownListener: EventListener = useCallback(\n (event) => {\n const { key } = event as KeyboardEvent;\n\n const [start, end] = hotKeysRef.current;\n\n if (start?.keys.includes(key) || end?.keys.includes(key)) {\n const newKeys = [...keys.current, key];\n if (end?.keys.every((hotKey) => newKeys.includes(hotKey))) {\n nextButtonRef?.current?.click();\n } else if (start?.keys.every((hotKey) => newKeys.includes(hotKey))) {\n prevButtonRef?.current?.click();\n }\n keys.current = newKeys;\n }\n },\n [hotKeys],\n );\n\n useLayoutEffect(() => {\n containerEventListener.addEventListener('keydown', keyDownListener);\n containerEventListener.addEventListener('keyup', keyUpListener);\n return () => {\n containerEventListener.removeEventListener('keydown', keyDownListener);\n containerEventListener.removeEventListener('keyup', keyUpListener);\n };\n }, [nextButtonRef, prevButtonRef, containerEventListener]);\n\n useEffect(() => {\n if (hotKeys) {\n hotKeysRef.current = hotKeys;\n }\n }, [hotKeys]);\n};\n"],"mappings":"0IAAA,OAASA,WAAT,CAAsBC,SAAtB,CAAiCC,eAAjC,CAAkDC,MAAlD,KAAgE,OAAhE,CAWA,MAAO,IAAMC,kBAAiB,CAAG,SAACC,CAAD,CAAqC,OAMhEA,CANgE,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AAK,CAAET,IAAP,CAAYa,KAAZ,CAAkB,SAACN,CAAD,QAAYK,EAAO,CAACD,QAAR,CAAiBJ,CAAjB,CAAZ,CAAlB,CAAJ,CAA6D,cAClER,CADkE,WAClEA,CADkE,YAClEA,CAAa,CAAEM,OADmD,qBAClE,EAAwBS,KAAxB,EACD,CACDd,CAAI,CAACK,OAAL,CAAeO,CAChB,CACF,CAf+C,CAgBhD,CAACf,CAAD,CAhBgD,CAfkB,CAkCpEN,eAAe,CAAC,UAAM,CAGpB,MAFAI,EAAsB,CAACoB,gBAAvB,CAAwC,SAAxC,CAAmDP,CAAnD,CAEA,CADAb,CAAsB,CAACoB,gBAAvB,CAAwC,OAAxC,CAAiDb,CAAjD,CACA,CAAO,UAAM,CACXP,CAAsB,CAACqB,mBAAvB,CAA2C,SAA3C,CAAsDR,CAAtD,CADW,CAEXb,CAAsB,CAACqB,mBAAvB,CAA2C,OAA3C,CAAoDd,CAApD,CACD,CACF,CAPc,CAOZ,CAACJ,CAAD,CAAgBC,CAAhB,CAA+BJ,CAA/B,CAPY,CAlCqD,CA2CpEL,SAAS,CAAC,UAAM,CACVO,CADU,GAEZI,CAAU,CAACI,OAAX,CAAqBR,CAFT,CAIf,CAJQ,CAIN,CAACA,CAAD,CAJM,CAKV,CAhDM"}
@@ -1,2 +1,2 @@
1
- import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["content","tooltipContent","label","point","status","progress","direction","size","pointRef","onClick","position","tooltipZIndex","className"];import"./ProgressStepBarItem.css";import React,{useMemo,useRef}from"react";import{useForkRef}from"../../../hooks/useForkRef";import{useMouseLeave}from"../../../hooks/useMouseLeave";import{useFlag}from"../../../hooks/useFlag/useFlag";import{cnMixFocus}from"../../../mixs/MixFocus/MixFocus";import{cn}from"../../../utils/bem";import{ProgressSpin}from"../../ProgressSpin/ProgressSpin";import{Text}from"../../Text/Text";import{Tooltip}from"../../Tooltip/Tooltip";import{propPositionDefault,propStatusDefault}from"../helpers";var cnProgressStepBarItem=cn("ProgressStepBarItem"),possibleVerticalDirections=["leftCenter","rightCenter","rightUp","downCenter"],possibleHorizontalDirections=["downCenter","upCenter","downStartLeft","downStartRight"],renderPointContent=function(a,b,c){if(c)return React.createElement(ProgressSpin,{size:b});if(!a)return null;if("number"==typeof a)return React.createElement(Text,{className:cnProgressStepBarItem("PointText"),size:"s"===b?"2xs":"xs",weight:"bold"},a);return React.createElement(a,{className:cnProgressStepBarItem("PointIcon"),size:"xs"})};export var ProgressStepBarItem=React.forwardRef(function(a,b){var c=a.content,d=a.tooltipContent,e=a.label,f=a.point,g=a.status,h=a.progress,i=a.direction,j=a.size,k=a.pointRef,l=a.onClick,m=a.position,n=void 0===m?propPositionDefault:m,o=a.tooltipZIndex,p=a.className,q=_objectWithoutProperties(a,_excluded),r=useFlag(),s=_slicedToArray(r,2),t=s[0],u=s[1],v=useRef(null),w=useRef(null),x=useRef(null),y=useForkRef([x,k]),z={onMouseEnter:u.on,className:cnProgressStepBarItem("Point",{size:j,pointer:!!l},[l?cnMixFocus():void 0]),children:"xs"!==j&&renderPointContent(f,j,h),ref:y,onClick:l},A=useMemo(function(){if("vertical"===i)return{tooltipDirection:"leftUp",possibleDirections:possibleVerticalDirections,spareDirection:"rightCenter"};var a="downCenter";return"start"===n&&(a="rightCenter"),"end"===n&&(a="leftCenter"),{tooltipDirection:"downCenter",possibleDirections:possibleHorizontalDirections,spareDirection:a}},[i,n]),B=A.tooltipDirection,C=A.possibleDirections,D=A.spareDirection;return useMouseLeave({isActive:t,refs:[v,x,w],handler:u.off,debounce:100}),React.createElement(React.Fragment,null,React.createElement("div",Object.assign({ref:b,className:cnProgressStepBarItem({direction:i,position:n,status:g||propStatusDefault,size:j},[p])},q),React.createElement("button",Object.assign({tabIndex:-1,type:"button"},z)),(e||c)&&React.createElement("div",{className:cnProgressStepBarItem("Content",{bottomOffset:!!c})},e&&React.createElement(Text,{className:cnProgressStepBarItem("Label"),ref:v,size:j,onMouseEnter:u.on,lineHeight:"s"===j?"xs":j,view:"primary"},e),c)),d&&t&&React.createElement(Tooltip,{ref:w,anchorRef:x,className:cnProgressStepBarItem("Tooltip"),direction:B,style:{zIndex:o},isInteractive:!1,possibleDirections:C,spareDirection:D},d))});
1
+ import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["content","tooltipContent","label","point","status","progress","direction","size","pointRef","onClick","position","tooltipZIndex","className"];import"./ProgressStepBarItem.css";import React,{useMemo,useRef}from"react";import{ProgressSpin}from"../../ProgressSpin";import{Text}from"../../Text";import{Tooltip}from"../../TooltipCanary";import{useFlag}from"../../../hooks/useFlag/useFlag";import{useForkRef}from"../../../hooks/useForkRef";import{useMouseLeave}from"../../../hooks/useMouseLeave";import{cnMixFocus}from"../../../mixs/MixFocus/MixFocus";import{cn}from"../../../utils/bem";import{propPositionDefault,propStatusDefault}from"../helpers";var cnProgressStepBarItem=cn("ProgressStepBarItem"),possibleVerticalDirections=["leftCenter","rightCenter","rightUp","downCenter"],possibleHorizontalDirections=["downCenter","upCenter","downStartLeft","downStartRight"],renderPointContent=function(a,b,c){if(c)return React.createElement(ProgressSpin,{size:b});if(!a)return null;if("number"==typeof a)return React.createElement(Text,{className:cnProgressStepBarItem("PointText"),size:"s"===b?"2xs":"xs",weight:"bold"},a);return React.createElement(a,{className:cnProgressStepBarItem("PointIcon"),size:"xs"})};export var ProgressStepBarItem=React.forwardRef(function(a,b){var c=a.content,d=a.tooltipContent,e=a.label,f=a.point,g=a.status,h=a.progress,i=a.direction,j=a.size,k=a.pointRef,l=a.onClick,m=a.position,n=void 0===m?propPositionDefault:m,o=a.tooltipZIndex,p=a.className,q=_objectWithoutProperties(a,_excluded),r=useFlag(),s=_slicedToArray(r,2),t=s[0],u=s[1],v=useRef(null),w=useRef(null),x=useRef(null),y=useForkRef([x,k]),z={onMouseEnter:u.on,className:cnProgressStepBarItem("Point",{size:j,pointer:!!l},[l?cnMixFocus():void 0]),children:"xs"!==j&&renderPointContent(f,j,h),ref:y,onClick:l},A=useMemo(function(){if("vertical"===i)return{tooltipDirection:"leftUp",possibleDirections:possibleVerticalDirections,spareDirection:"rightCenter"};var a="downCenter";return"start"===n&&(a="rightCenter"),"end"===n&&(a="leftCenter"),{tooltipDirection:"downCenter",possibleDirections:possibleHorizontalDirections,spareDirection:a}},[i,n]),B=A.tooltipDirection,C=A.possibleDirections,D=A.spareDirection;return useMouseLeave({isActive:t,refs:[v,x,w],handler:u.off,debounce:100}),React.createElement(React.Fragment,null,React.createElement("div",Object.assign({ref:b,className:cnProgressStepBarItem({direction:i,position:n,status:g||propStatusDefault,size:j},[p])},q),React.createElement("button",Object.assign({tabIndex:-1,type:"button"},z)),(e||c)&&React.createElement("div",{className:cnProgressStepBarItem("Content",{bottomOffset:!!c})},e&&React.createElement(Text,{className:cnProgressStepBarItem("Label"),ref:v,size:j,onMouseEnter:u.on,lineHeight:"s"===j?"xs":j,view:"primary"},e),c)),React.createElement(Tooltip,{ref:w,isOpen:!!d&&t,anchorRef:x,className:cnProgressStepBarItem("Tooltip"),direction:B,style:{zIndex:o},isInteractive:!1,possibleDirections:C,spareDirection:D},d))});
2
2
  //# sourceMappingURL=ProgressStepBarItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressStepBarItem.js","names":["React","useMemo","useRef","useForkRef","useMouseLeave","useFlag","cnMixFocus","cn","ProgressSpin","Text","Tooltip","propPositionDefault","propStatusDefault","cnProgressStepBarItem","possibleVerticalDirections","possibleHorizontalDirections","renderPointContent","point","size","progress","ProgressStepBarItem","forwardRef","props","ref","content","tooltipContent","label","status","direction","pointRefProp","pointRef","onClick","position","tooltipZIndex","className","otherProps","isTooltipVisible","setTooltipVisible","anchorRef","tooltipRef","pointForkedRef","pointProps","onMouseEnter","on","pointer","children","tooltipDirection","possibleDirections","spareDirection","isActive","refs","handler","off","debounce","bottomOffset","zIndex"],"sources":["../../../../../../src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.tsx"],"sourcesContent":["import './ProgressStepBarItem.css';\n\nimport { IconComponent } from '@consta/icons/Icon';\nimport React, { useMemo, useRef } from 'react';\n\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMouseLeave } from '##/hooks/useMouseLeave';\n\nimport { useFlag } from '../../../hooks/useFlag/useFlag';\nimport { cnMixFocus } from '../../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../../utils/bem';\nimport { Direction } from '../../Popover/Popover';\nimport { ProgressSpin } from '../../ProgressSpin/ProgressSpin';\nimport { Text } from '../../Text/Text';\nimport { Tooltip } from '../../Tooltip/Tooltip';\nimport {\n PointNumbersMap,\n ProgressStepBarItemComponent,\n propPositionDefault,\n propStatusDefault,\n} from '../helpers';\n\nconst cnProgressStepBarItem = cn('ProgressStepBarItem');\n\nconst possibleVerticalDirections: Direction[] = [\n 'leftCenter',\n 'rightCenter',\n 'rightUp',\n 'downCenter',\n];\nconst possibleHorizontalDirections: Direction[] = [\n 'downCenter',\n 'upCenter',\n 'downStartLeft',\n 'downStartRight',\n];\n\nconst renderPointContent = (\n point: PointNumbersMap | IconComponent | undefined,\n size: 'm' | 's',\n progress: boolean | undefined,\n) => {\n if (progress) return <ProgressSpin size={size} />;\n if (!point) return null;\n\n if (typeof point === 'number') {\n return (\n <Text\n className={cnProgressStepBarItem('PointText')}\n size={size === 's' ? '2xs' : 'xs'}\n weight=\"bold\"\n >\n {point}\n </Text>\n );\n }\n\n const Icon = point;\n\n return <Icon className={cnProgressStepBarItem('PointIcon')} size=\"xs\" />;\n};\n\nexport const ProgressStepBarItem: ProgressStepBarItemComponent =\n React.forwardRef((props, ref) => {\n const {\n content,\n tooltipContent,\n label,\n point,\n status,\n progress,\n direction,\n size,\n pointRef: pointRefProp,\n onClick,\n position = propPositionDefault,\n tooltipZIndex,\n className,\n ...otherProps\n } = props;\n\n const [isTooltipVisible, setTooltipVisible] = useFlag();\n\n const anchorRef = useRef<HTMLDivElement>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n const pointRef = useRef<HTMLButtonElement>(null);\n\n const pointForkedRef = useForkRef([pointRef, pointRefProp]);\n\n const pointProps = {\n onMouseEnter: setTooltipVisible.on,\n className: cnProgressStepBarItem(\n 'Point',\n {\n size,\n pointer: !!onClick,\n },\n [onClick ? cnMixFocus() : undefined],\n ),\n children: size !== 'xs' && renderPointContent(point, size, progress),\n ref: pointForkedRef,\n onClick,\n };\n\n const { tooltipDirection, possibleDirections, spareDirection } = useMemo<{\n tooltipDirection: Direction;\n possibleDirections: Direction[];\n spareDirection: Direction;\n }>(() => {\n if (direction === 'vertical') {\n return {\n tooltipDirection: 'leftUp',\n possibleDirections: possibleVerticalDirections,\n spareDirection: 'rightCenter',\n };\n }\n let spareDirection: Direction = 'downCenter';\n if (position === 'start') {\n spareDirection = 'rightCenter';\n }\n if (position === 'end') {\n spareDirection = 'leftCenter';\n }\n return {\n tooltipDirection: 'downCenter',\n possibleDirections: possibleHorizontalDirections,\n spareDirection,\n };\n }, [direction, position]);\n\n useMouseLeave({\n isActive: isTooltipVisible,\n refs: [anchorRef, pointRef, tooltipRef],\n handler: setTooltipVisible.off,\n debounce: 100,\n });\n\n return (\n <>\n <div\n ref={ref}\n className={cnProgressStepBarItem(\n {\n direction,\n position,\n status: status || propStatusDefault,\n size,\n },\n [className],\n )}\n {...otherProps}\n >\n <button tabIndex={-1} type=\"button\" {...pointProps} />\n {(label || content) && (\n <div\n className={cnProgressStepBarItem('Content', {\n bottomOffset: !!content,\n })}\n >\n {label && (\n <Text\n className={cnProgressStepBarItem('Label')}\n ref={anchorRef}\n size={size}\n onMouseEnter={setTooltipVisible.on}\n lineHeight={size === 's' ? 'xs' : size}\n view=\"primary\"\n >\n {label}\n </Text>\n )}\n {content}\n </div>\n )}\n </div>\n {tooltipContent && isTooltipVisible && (\n <Tooltip\n ref={tooltipRef}\n anchorRef={pointRef}\n className={cnProgressStepBarItem('Tooltip')}\n direction={tooltipDirection}\n style={{ zIndex: tooltipZIndex }}\n isInteractive={false}\n possibleDirections={possibleDirections}\n spareDirection={spareDirection}\n >\n {tooltipContent}\n </Tooltip>\n )}\n </>\n );\n });\n"],"mappings":"oTAAA,kCAGA,MAAOA,MAAP,EAAgBC,OAAhB,CAAyBC,MAAzB,KAAuC,OAAvC,CAEA,OAASC,UAAT,iCACA,OAASC,aAAT,oCAEA,OAASC,OAAT,sCACA,OAASC,UAAT,uCACA,OAASC,EAAT,0BAEA,OAASC,YAAT,uCACA,OAASC,IAAT,uBACA,OAASC,OAAT,6BACA,OAGEC,mBAHF,CAIEC,iBAJF,kB,GAOMC,sBAAqB,CAAGN,EAAE,CAAC,qBAAD,C,CAE1BO,0BAAuC,CAAG,CAC9C,YAD8C,CAE9C,aAF8C,CAG9C,SAH8C,CAI9C,YAJ8C,C,CAM1CC,4BAAyC,CAAG,CAChD,YADgD,CAEhD,UAFgD,CAGhD,eAHgD,CAIhD,gBAJgD,C,CAO5CC,kBAAkB,CAAG,SACzBC,CADyB,CAEzBC,CAFyB,CAGzBC,CAHyB,CAItB,CACH,GAAIA,CAAJ,CAAc,MAAO,qBAAC,YAAD,EAAc,IAAI,CAAED,CAApB,EAAP,CACd,GAAI,CAACD,CAAL,CAAY,MAAO,KAAP,CAEZ,GAAqB,QAAjB,QAAOA,EAAX,CACE,MACE,qBAAC,IAAD,EACE,SAAS,CAAEJ,qBAAqB,CAAC,WAAD,CADlC,CAEE,IAAI,CAAW,GAAT,GAAAK,CAAI,CAAW,KAAX,CAAmB,IAF/B,CAGE,MAAM,CAAC,MAHT,EAKGD,CALH,CADF,CAaF,MAAO,qBAFMA,CAEN,EAAM,SAAS,CAAEJ,qBAAqB,CAAC,WAAD,CAAtC,CAAqD,IAAI,CAAC,IAA1D,EACR,C,CAED,MAAO,IAAMO,oBAAiD,CAC5DpB,KAAK,CAACqB,UAAN,CAAiB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IAE7BC,EAF6B,CAg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I,CAAC,QAA3B,EAAwCM,CAAxC,EAbF,CAcG,CAACf,CAAK,EAAIF,CAAV,GACC,2BACE,SAAS,CAAEX,qBAAqB,CAAC,SAAD,CAAY,CAC1CyC,YAAY,CAAE,CAAC,CAAC9B,CAD0B,CAAZ,CADlC,EAKGE,CAAK,EACJ,oBAAC,IAAD,EACE,SAAS,CAAEb,qBAAqB,CAAC,OAAD,CADlC,CAEE,GAAG,CAAEyB,CAFP,CAGE,IAAI,CAAEpB,CAHR,CAIE,YAAY,CAAEmB,CAAiB,CAACM,EAJlC,CAKE,UAAU,CAAW,GAAT,GAAAzB,CAAI,CAAW,IAAX,CAAkBA,CALpC,CAME,IAAI,CAAC,SANP,EAQGQ,CARH,CANJ,CAiBGF,CAjBH,CAfJ,CADF,CAqCGC,CAAc,EAAIW,CAAlB,EACC,oBAAC,OAAD,EACE,GAAG,CAAEG,CADP,CAEE,SAAS,CAAET,CAFb,CAGE,SAAS,CAAEjB,qBAAqB,CAAC,SAAD,CAHlC,CAIE,SAAS,CAAEiC,CAJb,CAKE,KAAK,CAAE,CAAES,MAAM,CAAEtB,CAAV,CALT,CAME,aAAa,GANf,CAOE,kBAAkB,CAAEc,CAPtB,CAQE,cAAc,CAAEC,CARlB,EAUGvB,CAVH,CAtCJ,CAqDH,CAhID,CADK"}
1
+ {"version":3,"file":"ProgressStepBarItem.js","names":["React","useMemo","useRef","ProgressSpin","Text","Tooltip","useFlag","useForkRef","useMouseLeave","cnMixFocus","cn","propPositionDefault","propStatusDefault","cnProgressStepBarItem","possibleVerticalDirections","possibleHorizontalDirections","renderPointContent","point","size","progress","ProgressStepBarItem","forwardRef","props","ref","content","tooltipContent","label","status","direction","pointRefProp","pointRef","onClick","position","tooltipZIndex","className","otherProps","isTooltipVisible","setTooltipVisible","anchorRef","tooltipRef","pointForkedRef","pointProps","onMouseEnter","on","pointer","children","tooltipDirection","possibleDirections","spareDirection","isActive","refs","handler","off","debounce","bottomOffset","zIndex"],"sources":["../../../../../../src/components/ProgressStepBar/ProgressStepBarItem/ProgressStepBarItem.tsx"],"sourcesContent":["import './ProgressStepBarItem.css';\n\nimport { IconComponent } from '@consta/icons/Icon';\nimport React, { useMemo, useRef } from 'react';\n\nimport { Direction } from '##/components/Popover';\nimport { ProgressSpin } from '##/components/ProgressSpin';\nimport { Text } from '##/components/Text';\nimport { Tooltip } from '##/components/TooltipCanary';\nimport { useFlag } from '##/hooks/useFlag/useFlag';\nimport { useForkRef } from '##/hooks/useForkRef';\nimport { useMouseLeave } from '##/hooks/useMouseLeave';\nimport { cnMixFocus } from '##/mixs/MixFocus/MixFocus';\nimport { cn } from '##/utils/bem';\n\nimport {\n PointNumbersMap,\n ProgressStepBarItemComponent,\n propPositionDefault,\n propStatusDefault,\n} from '../helpers';\n\nconst cnProgressStepBarItem = cn('ProgressStepBarItem');\n\nconst possibleVerticalDirections: Direction[] = [\n 'leftCenter',\n 'rightCenter',\n 'rightUp',\n 'downCenter',\n];\nconst possibleHorizontalDirections: Direction[] = [\n 'downCenter',\n 'upCenter',\n 'downStartLeft',\n 'downStartRight',\n];\n\nconst renderPointContent = (\n point: PointNumbersMap | IconComponent | undefined,\n size: 'm' | 's',\n progress: boolean | undefined,\n) => {\n if (progress) return <ProgressSpin size={size} />;\n if (!point) return null;\n\n if (typeof point === 'number') {\n return (\n <Text\n className={cnProgressStepBarItem('PointText')}\n size={size === 's' ? '2xs' : 'xs'}\n weight=\"bold\"\n >\n {point}\n </Text>\n );\n }\n\n const Icon = point;\n\n return <Icon className={cnProgressStepBarItem('PointIcon')} size=\"xs\" />;\n};\n\nexport const ProgressStepBarItem: ProgressStepBarItemComponent =\n React.forwardRef((props, ref) => {\n const {\n content,\n tooltipContent,\n label,\n point,\n status,\n progress,\n direction,\n size,\n pointRef: pointRefProp,\n onClick,\n position = propPositionDefault,\n tooltipZIndex,\n className,\n ...otherProps\n } = props;\n\n const [isTooltipVisible, setTooltipVisible] = useFlag();\n\n const anchorRef = useRef<HTMLDivElement>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n const pointRef = useRef<HTMLButtonElement>(null);\n\n const pointForkedRef = useForkRef([pointRef, pointRefProp]);\n\n const pointProps = {\n onMouseEnter: setTooltipVisible.on,\n className: cnProgressStepBarItem(\n 'Point',\n {\n size,\n pointer: !!onClick,\n },\n [onClick ? cnMixFocus() : undefined],\n ),\n children: size !== 'xs' && renderPointContent(point, size, progress),\n ref: pointForkedRef,\n onClick,\n };\n\n const { tooltipDirection, possibleDirections, spareDirection } = useMemo<{\n tooltipDirection: Direction;\n possibleDirections: Direction[];\n spareDirection: Direction;\n }>(() => {\n if (direction === 'vertical') {\n return {\n tooltipDirection: 'leftUp',\n possibleDirections: possibleVerticalDirections,\n spareDirection: 'rightCenter',\n };\n }\n let spareDirection: Direction = 'downCenter';\n if (position === 'start') {\n spareDirection = 'rightCenter';\n }\n if (position === 'end') {\n spareDirection = 'leftCenter';\n }\n return {\n tooltipDirection: 'downCenter',\n possibleDirections: possibleHorizontalDirections,\n spareDirection,\n };\n }, [direction, position]);\n\n useMouseLeave({\n isActive: isTooltipVisible,\n refs: [anchorRef, pointRef, tooltipRef],\n handler: setTooltipVisible.off,\n debounce: 100,\n });\n\n return (\n <>\n <div\n ref={ref}\n className={cnProgressStepBarItem(\n {\n direction,\n position,\n status: status || propStatusDefault,\n size,\n },\n [className],\n )}\n {...otherProps}\n >\n <button tabIndex={-1} type=\"button\" {...pointProps} />\n {(label || content) && (\n <div\n className={cnProgressStepBarItem('Content', {\n bottomOffset: !!content,\n })}\n >\n {label && (\n <Text\n className={cnProgressStepBarItem('Label')}\n ref={anchorRef}\n size={size}\n onMouseEnter={setTooltipVisible.on}\n lineHeight={size === 's' ? 'xs' : size}\n view=\"primary\"\n >\n {label}\n </Text>\n )}\n {content}\n </div>\n )}\n </div>\n <Tooltip\n ref={tooltipRef}\n isOpen={!!tooltipContent && isTooltipVisible}\n anchorRef={pointRef}\n className={cnProgressStepBarItem('Tooltip')}\n direction={tooltipDirection}\n style={{ zIndex: tooltipZIndex }}\n isInteractive={false}\n possibleDirections={possibleDirections}\n spareDirection={spareDirection}\n >\n {tooltipContent}\n </Tooltip>\n </>\n );\n });\n"],"mappings":"oTAAA,kCAGA,MAAOA,MAAP,EAAgBC,OAAhB,CAAyBC,MAAzB,KAAuC,OAAvC,CAGA,OAASC,YAAT,0BACA,OAASC,IAAT,kBACA,OAASC,OAAT,2BACA,OAASC,OAAT,sCACA,OAASC,UAAT,iCACA,OAASC,aAAT,oCACA,OAASC,UAAT,uCACA,OAASC,EAAT,0BAEA,OAGEC,mBAHF,CAIEC,iBAJF,kB,GAOMC,sBAAqB,CAAGH,EAAE,CAAC,qBAAD,C,CAE1BI,0BAAuC,CAAG,CAC9C,YAD8C,CAE9C,aAF8C,CAG9C,SAH8C,CAI9C,YAJ8C,C,CAM1CC,4BAAyC,CAAG,CAChD,YADgD,CAEhD,UAFgD,CAGhD,eAHgD,CAIhD,gBAJgD,C,CAO5CC,kBAAkB,CAAG,SACzBC,CADyB,CAEzBC,CAFyB,CAGzBC,CAHyB,CAItB,CACH,GAAIA,CAAJ,CAAc,MAAO,qBAAC,YAAD,EAAc,IAAI,CAAED,CAApB,EAAP,CACd,GAAI,CAACD,CAAL,CAAY,MAAO,KAAP,CAEZ,GAAqB,QAAjB,QAAOA,EAAX,CACE,MACE,qBAAC,IAAD,EACE,SAAS,CAAEJ,qBAAqB,CAAC,WAAD,CADlC,CAEE,IAAI,CAAW,GAAT,GAAAK,CAAI,CAAW,KAAX,CAAmB,IAF/B,CAGE,MAAM,CAAC,MAHT,EAKGD,CALH,CADF,CAaF,MAAO,qBAFMA,CAEN,EAAM,SAAS,CAAEJ,qBAAqB,CAAC,WAAD,CAAtC,CAAqD,IAAI,CAAC,IAA1D,EACR,C,CAED,MAAO,IAAMO,oBAAiD,CAC5DpB,KAAK,CAACqB,UAAN,CAAiB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IAE7BC,EAF6B,CAgB3BF,CAhB2B,CAE7BE,OAF6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,EAbF,CAcG,CAACf,CAAK,EAAIF,CAAV,GACC,2BACE,SAAS,CAAEX,qBAAqB,CAAC,SAAD,CAAY,CAC1CyC,YAAY,CAAE,CAAC,CAAC9B,CAD0B,CAAZ,CADlC,EAKGE,CAAK,EACJ,oBAAC,IAAD,EACE,SAAS,CAAEb,qBAAqB,CAAC,OAAD,CADlC,CAEE,GAAG,CAAEyB,CAFP,CAGE,IAAI,CAAEpB,CAHR,CAIE,YAAY,CAAEmB,CAAiB,CAACM,EAJlC,CAKE,UAAU,CAAW,GAAT,GAAAzB,CAAI,CAAW,IAAX,CAAkBA,CALpC,CAME,IAAI,CAAC,SANP,EAQGQ,CARH,CANJ,CAiBGF,CAjBH,CAfJ,CADF,CAqCE,oBAAC,OAAD,EACE,GAAG,CAAEe,CADP,CAEE,MAAM,CAAE,CAAC,CAACd,CAAF,EAAoBW,CAF9B,CAGE,SAAS,CAAEN,CAHb,CAIE,SAAS,CAAEjB,qBAAqB,CAAC,SAAD,CAJlC,CAKE,SAAS,CAAEiC,CALb,CAME,KAAK,CAAE,CAAES,MAAM,CAAEtB,CAAV,CANT,CAOE,aAAa,GAPf,CAQE,kBAAkB,CAAEc,CARtB,CASE,cAAc,CAAEC,CATlB,EAWGvB,CAXH,CArCF,CAoDH,CA/HD,CADK"}
@@ -1 +1 @@
1
- .Responses{align-items:center;display:flex;flex-direction:column;justify-content:center;width:100%}.Responses_size_m{--title-size:var(--size-text-xl);--description-size:var(--size-text-s);--image-width:300px}.Responses_size_l{--title-size:var(--size-text-2xl);--description-size:var(--size-text-m);--image-width:420px}.Responses-Title{color:var(--color-typo-primary);font-size:var(--title-size);font-weight:var(--font-weight-text-semibold);margin-top:var(--space-xl)}.Responses-Description,.Responses-Title{line-height:var(--line-height-text-xs);margin-bottom:0;max-width:350px;text-align:center}.Responses-Description{color:var(--color-typo-ghost);font-size:var(--description-size);margin-top:var(--space-xs)}.Responses .Responses-Image{max-width:var(--image-width);width:100%}.Responses-ButtonsWrapper{display:flex;justify-content:center;margin-top:var(--space-2xl)}.Responses-Button:not(:last-child){margin-right:var(--space-xs)}
1
+ .Responses{align-items:center;display:flex;flex-direction:column;justify-content:center;width:100%}.Responses_size_m{--title-size:var(--size-text-xl);--description-size:var(--size-text-s);--image-width:300px}.Responses_size_l{--title-size:var(--size-text-2xl);--description-size:var(--size-text-m);--image-width:420px}.Responses-Title{color:var(--color-typo-primary);font-size:var(--title-size);font-weight:var(--font-weight-text-semibold)}.Responses-Description,.Responses-Title{line-height:var(--line-height-text-xs);max-width:350px;text-align:center}.Responses-Description{color:var(--color-typo-ghost);font-size:var(--description-size);margin-bottom:0}.Responses .Responses-Image{max-width:var(--image-width);width:100%}.Responses-ButtonsWrapper{display:flex;justify-content:center}.Responses-Button:not(:last-child){margin-right:var(--space-xs)}
@@ -1,7 +1,7 @@
1
1
  import './Responses.css';
2
2
  import React from 'react';
3
3
  import { ResponsesImageProps } from "../../responsesImages/ResponsesImage/ResponsesImage";
4
- import { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';
4
+ import { PropsWithHTMLAttributes } from "../../utils/types/PropsWithHTMLAttributes";
5
5
  export declare const responsesPropSize: readonly ["l", "m"];
6
6
  export declare type ResponsesPropSize = typeof responsesPropSize[number];
7
7
  export declare const responsesPropSizeDefault: ResponsesPropSize;
@@ -1,2 +1,2 @@
1
- import"./Responses.css";import React from"react";import{cn}from"../../utils/bem";export var responsesPropSize=["l","m"];export var responsesPropSizeDefault=responsesPropSize[0];export var cnResponses=cn("Responses");export var Responses=React.forwardRef(function(a,b){var c=a.className,d=a.title,e=a.description,f=a.size,g=void 0===f?responsesPropSizeDefault:f,h=a.image,i=a.actions;return React.createElement("div",{className:cnResponses({size:g},[c]),ref:b},React.createElement(h,{className:cnResponses("Image")}),d&&React.createElement("h1",{className:cnResponses("Title")},d),e&&React.createElement("p",{className:cnResponses("Description")},e),i&&React.createElement("div",{className:cnResponses("ButtonsWrapper")},i))});
1
+ import"./Responses.css";import React from"react";import{cnMixSpace}from"../../mixs/MixSpace";import{cn}from"../../utils/bem";export var responsesPropSize=["l","m"];export var responsesPropSizeDefault=responsesPropSize[0];export var cnResponses=cn("Responses");export var Responses=React.forwardRef(function(a,b){var c=a.className,d=a.title,e=a.description,f=a.size,g=void 0===f?responsesPropSizeDefault:f,h=a.image,i=a.actions;return React.createElement("div",{className:cnResponses({size:g},[c]),ref:b},React.createElement(h,{className:cnResponses("Image")}),d&&React.createElement("h1",{className:cnResponses("Title",[cnMixSpace({mT:"xl",mB:0})])},d),e&&React.createElement("p",{className:cnResponses("Description",[cnMixSpace({mT:"xs"})])},e),i&&React.createElement("div",{className:cnResponses("ButtonsWrapper",[cnMixSpace({mT:"xl"})])},i))});
2
2
  //# sourceMappingURL=Responses.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Responses.js","names":["React","cn","responsesPropSize","responsesPropSizeDefault","cnResponses","Responses","forwardRef","props","ref","className","title","description","size","image","actions"],"sources":["../../../../../src/components/Responses/Responses.tsx"],"sourcesContent":["import './Responses.css';\n\nimport React from 'react';\n\nimport { ResponsesImageProps } from '##/responsesImages/ResponsesImage/ResponsesImage';\n\nimport { cn } from '../../utils/bem';\nimport { PropsWithHTMLAttributes } from '../../utils/types/PropsWithHTMLAttributes';\n\nexport const responsesPropSize = ['l', 'm'] as const;\nexport type ResponsesPropSize = typeof responsesPropSize[number];\nexport const responsesPropSizeDefault: ResponsesPropSize = responsesPropSize[0];\n\nexport type ResponsesProps = PropsWithHTMLAttributes<\n {\n title?: React.ReactNode;\n description?: React.ReactNode;\n size?: ResponsesPropSize;\n image: React.FC<ResponsesImageProps>;\n actions?: React.ReactNode;\n children?: never;\n },\n HTMLDivElement\n>;\n\nexport const cnResponses = cn('Responses');\n\nexport const Responses = React.forwardRef<HTMLDivElement, ResponsesProps>(\n (props, ref) => {\n const {\n className,\n title,\n description,\n size = responsesPropSizeDefault,\n image,\n actions,\n } = props;\n const Image = image;\n\n return (\n <div className={cnResponses({ size }, [className])} ref={ref}>\n <Image className={cnResponses('Image')} />\n {title && <h1 className={cnResponses('Title')}>{title}</h1>}\n {description && (\n <p className={cnResponses('Description')}>{description}</p>\n )}\n {actions && (\n <div className={cnResponses('ButtonsWrapper')}>{actions}</div>\n )}\n </div>\n );\n },\n);\n"],"mappings":"AAAA,wBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAIA,OAASC,EAAT,uBAGA,MAAO,IAAMC,kBAAiB,CAAG,CAAC,GAAD,CAAM,GAAN,CAA1B,CAEP,MAAO,IAAMC,yBAA2C,CAAGD,iBAAiB,CAAC,CAAD,CAArE,CAcP,MAAO,IAAME,YAAW,CAAGH,EAAE,CAAC,WAAD,CAAtB,CAEP,MAAO,IAAMI,UAAS,CAAGL,KAAK,CAACM,UAAN,CACvB,SAACC,CAAD,CAAQC,CAAR,CAAgB,IAEZC,EAFY,CAQVF,CARU,CAEZE,SAFY,CAGZC,CAHY,CAQVH,CARU,CAGZG,KAHY,CAIZC,CAJY,CAQVJ,CARU,CAIZI,WAJY,GAQVJ,CARU,CAKZK,IALY,CAKZA,CALY,YAKLT,wBALK,GAMZU,CANY,CAQVN,CARU,CAMZM,KANY,CAOZC,CAPY,CAQVP,CARU,CAOZO,OAPY,CAWd,MACE,4BAAK,SAAS,CAAEV,WAAW,CAAC,CAAEQ,IAAI,CAAJA,CAAF,CAAD,CAAW,CAACH,CAAD,CAAX,CAA3B,CAAoD,GAAG,CAAED,CAAzD,EACE,oBAJUK,CAIV,EAAO,SAAS,CAAET,WAAW,CAAC,OAAD,CAA7B,EADF,CAEGM,CAAK,EAAI,0BAAI,SAAS,CAAEN,WAAW,CAAC,OAAD,CAA1B,EAAsCM,CAAtC,CAFZ,CAGGC,CAAW,EACV,yBAAG,SAAS,CAAEP,WAAW,CAAC,aAAD,CAAzB,EAA2CO,CAA3C,CAJJ,CAMGG,CAAO,EACN,2BAAK,SAAS,CAAEV,WAAW,CAAC,gBAAD,CAA3B,EAAgDU,CAAhD,CAPJ,CAWH,CAxBsB,CAAlB"}
1
+ {"version":3,"file":"Responses.js","names":["React","cnMixSpace","cn","responsesPropSize","responsesPropSizeDefault","cnResponses","Responses","forwardRef","props","ref","className","title","description","size","image","actions","mT","mB"],"sources":["../../../../../src/components/Responses/Responses.tsx"],"sourcesContent":["import './Responses.css';\n\nimport React from 'react';\n\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { ResponsesImageProps } from '##/responsesImages/ResponsesImage/ResponsesImage';\nimport { cn } from '##/utils/bem';\nimport { PropsWithHTMLAttributes } from '##/utils/types/PropsWithHTMLAttributes';\n\nexport const responsesPropSize = ['l', 'm'] as const;\nexport type ResponsesPropSize = typeof responsesPropSize[number];\nexport const responsesPropSizeDefault: ResponsesPropSize = responsesPropSize[0];\n\nexport type ResponsesProps = PropsWithHTMLAttributes<\n {\n title?: React.ReactNode;\n description?: React.ReactNode;\n size?: ResponsesPropSize;\n image: React.FC<ResponsesImageProps>;\n actions?: React.ReactNode;\n children?: never;\n },\n HTMLDivElement\n>;\n\nexport const cnResponses = cn('Responses');\n\nexport const Responses = React.forwardRef<HTMLDivElement, ResponsesProps>(\n (props, ref) => {\n const {\n className,\n title,\n description,\n size = responsesPropSizeDefault,\n image,\n actions,\n } = props;\n const Image = image;\n\n return (\n <div className={cnResponses({ size }, [className])} ref={ref}>\n <Image className={cnResponses('Image')} />\n {title && (\n <h1\n className={cnResponses('Title', [cnMixSpace({ mT: 'xl', mB: 0 })])}\n >\n {title}\n </h1>\n )}\n {description && (\n <p className={cnResponses('Description', [cnMixSpace({ mT: 'xs' })])}>\n {description}\n </p>\n )}\n {actions && (\n <div\n className={cnResponses('ButtonsWrapper', [\n cnMixSpace({ mT: 'xl' }),\n ])}\n >\n {actions}\n </div>\n )}\n </div>\n );\n },\n);\n"],"mappings":"AAAA,wBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,UAAT,2BAEA,OAASC,EAAT,uBAGA,MAAO,IAAMC,kBAAiB,CAAG,CAAC,GAAD,CAAM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Responses/createResponses";import{ResponsesImage403}from"../../responsesImages/ResponsesImage403/ResponsesImage403";export var Responses403=createResponses({name:"Responses403",image:ResponsesImage403,title:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430",description:"\u0415\u0441\u043B\u0438 \u0432\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0432\u0430\u043C \u043D\u0443\u0436\u043D\u0430 \u044D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430, \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u0443 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430",actions:React.createElement(Button,{type:"button",label:"\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F",view:"ghost"})});
1
+ import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{cnMixSpace}from"../../mixs/MixSpace";import{ResponsesImage403}from"../../responsesImages/ResponsesImage403/ResponsesImage403";export var Responses403=createResponses({name:"Responses403",image:ResponsesImage403,title:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430",description:"\u0415\u0441\u043B\u0438 \u0432\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0432\u0430\u043C \u043D\u0443\u0436\u043D\u0430 \u044D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430, \u0437\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0434\u043E\u0441\u0442\u0443\u043F \u0443 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430",actions:React.createElement(React.Fragment,null,React.createElement(Button,{type:"button",label:"\u0417\u0430\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F",view:"primary",className:cnMixSpace({mR:"s"})}),React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434",view:"ghost"}))});
2
2
  //# sourceMappingURL=Responses403.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Responses403.js","names":["React","Button","createResponses","ResponsesImage403","Responses403","name","image","title","description","actions"],"sources":["../../../../../src/components/Responses403/Responses403.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImage403 } from '##/responsesImages/ResponsesImage403/ResponsesImage403';\n\nexport const Responses403 = createResponses({\n name: 'Responses403',\n image: ResponsesImage403,\n title: 'Нет доступа',\n description:\n 'Если вы уверены, что вам нужна эта страница, запросите доступ у администратора',\n actions: <Button type=\"button\" label=\"Запросить доступ\" view=\"ghost\" />,\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGF,eAAe,CAAC,CAC1CG,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,+DAHmC,CAI1CC,WAAW,CACT,qZALwC,CAM1CC,OAAO,CAAE,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,6FAA5B,CAA+C,IAAI,CAAC,OAApD,EANiC,CAAD,CAApC"}
1
+ {"version":3,"file":"Responses403.js","names":["React","Button","createResponses","cnMixSpace","ResponsesImage403","Responses403","name","image","title","description","actions","mR"],"sources":["../../../../../src/components/Responses403/Responses403.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { ResponsesImage403 } from '##/responsesImages/ResponsesImage403/ResponsesImage403';\n\nexport const Responses403 = createResponses({\n name: 'Responses403',\n image: ResponsesImage403,\n title: 'Нет доступа',\n description:\n 'Если вы уверены, что вам нужна эта страница, запросите доступ у администратора',\n actions: (\n <>\n <Button\n type=\"button\"\n label=\"Запросить доступ\"\n view=\"primary\"\n className={cnMixSpace({ mR: 's' })}\n />\n <Button type=\"button\" label=\"Вернуться назад\" view=\"ghost\" />\n </>\n ),\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,UAAT,2BACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGH,eAAe,CAAC,CAC1CI,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,+DAHmC,CAI1CC,WAAW,CACT,qZALwC,CAM1CC,OAAO,CACL,wCACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,KAAK,CAAC,6FAFR,CAGE,IAAI,CAAC,SAHP,CAIE,SAAS,CAAEP,UAAU,CAAC,CAAEQ,EAAE,CAAE,GAAN,CAAD,CAJvB,EADF,CAOE,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,uFAA5B,CAA8C,IAAI,CAAC,OAAnD,EAPF,CAPwC,CAAD,CAApC"}
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const Responses500: import("react").ForwardRefExoticComponent<Omit<import("../Responses").ResponsesProps, "image"> & import("react").RefAttributes<HTMLDivElement>>;
1
+ import React from 'react';
2
+ export declare const Responses500: React.ForwardRefExoticComponent<Omit<import("../Responses").ResponsesProps, "image"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- import{createResponses}from"../Responses/createResponses";import{ResponsesImage500}from"../../responsesImages/ResponsesImage500/ResponsesImage500";export var Responses500=createResponses({name:"Responses500",image:ResponsesImage500,title:"\u0427\u0442\u043E-\u0442\u043E \u0441\u043B\u043E\u043C\u0430\u043B\u043E\u0441\u044C",description:"\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u043F\u043E\u0437\u0436\u0435"});
1
+ import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{ResponsesImage500}from"../../responsesImages/ResponsesImage500/ResponsesImage500";export var Responses500=createResponses({name:"Responses500",image:ResponsesImage500,title:"\u0427\u0442\u043E-\u0442\u043E \u0441\u043B\u043E\u043C\u0430\u043B\u043E\u0441\u044C",description:"\u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0438\u043B\u0438 \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u043F\u043E\u0437\u0436\u0435",actions:React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434",view:"ghost"})});
2
2
  //# sourceMappingURL=Responses500.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Responses500.js","names":["createResponses","ResponsesImage500","Responses500","name","image","title","description"],"sources":["../../../../../src/components/Responses500/Responses500.tsx"],"sourcesContent":["import { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImage500 } from '##/responsesImages/ResponsesImage500/ResponsesImage500';\n\nexport const Responses500 = createResponses({\n name: 'Responses500',\n image: ResponsesImage500,\n title: 'Что-то сломалось',\n description: 'Попробуйте обновить страницу или зайдите позже',\n});\n"],"mappings":"AAAA,OAASA,eAAT,oCACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGF,eAAe,CAAC,CAC1CG,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,wFAHmC,CAI1CC,WAAW,CAAE,6PAJ6B,CAAD,CAApC"}
1
+ {"version":3,"file":"Responses500.js","names":["React","Button","createResponses","ResponsesImage500","Responses500","name","image","title","description","actions"],"sources":["../../../../../src/components/Responses500/Responses500.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImage500 } from '##/responsesImages/ResponsesImage500/ResponsesImage500';\n\nexport const Responses500 = createResponses({\n name: 'Responses500',\n image: ResponsesImage500,\n title: 'Что-то сломалось',\n description: 'Попробуйте обновить страницу или зайдите позже',\n actions: <Button type=\"button\" label=\"Вернуться назад\" view=\"ghost\" />,\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGF,eAAe,CAAC,CAC1CG,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,wFAHmC,CAI1CC,WAAW,CAAE,6PAJ6B,CAK1CC,OAAO,CAAE,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,uFAA5B,CAA8C,IAAI,CAAC,OAAnD,EALiC,CAAD,CAApC"}
@@ -1,2 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const Responses503: import("react").ForwardRefExoticComponent<Omit<import("../Responses").ResponsesProps, "image"> & import("react").RefAttributes<HTMLDivElement>>;
1
+ import React from 'react';
2
+ export declare const Responses503: React.ForwardRefExoticComponent<Omit<import("../Responses").ResponsesProps, "image"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- import{createResponses}from"../Responses/createResponses";import{ResponsesImage503}from"../../responsesImages/ResponsesImage503/ResponsesImage503";export var Responses503=createResponses({name:"Responses503",image:ResponsesImage503,title:"\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0440\u0430\u0431\u043E\u0442\u044B",description:"\u0421\u043A\u043E\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043E, \u043C\u044B \u0443\u0436\u0435 \u0440\u0435\u0448\u0430\u0435\u043C \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435."});
1
+ import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{ResponsesImage503}from"../../responsesImages/ResponsesImage503/ResponsesImage503";export var Responses503=createResponses({name:"Responses503",image:ResponsesImage503,title:"\u0422\u0435\u0445\u043D\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0440\u0430\u0431\u043E\u0442\u044B",description:"\u0421\u043A\u043E\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043E, \u043C\u044B \u0443\u0436\u0435 \u0440\u0435\u0448\u0430\u0435\u043C \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0443. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0437\u0430\u0439\u0442\u0438 \u043F\u043E\u0437\u0436\u0435.",actions:React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434",view:"ghost"})});
2
2
  //# sourceMappingURL=Responses503.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Responses503.js","names":["createResponses","ResponsesImage503","Responses503","name","image","title","description"],"sources":["../../../../../src/components/Responses503/Responses503.tsx"],"sourcesContent":["import { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImage503 } from '##/responsesImages/ResponsesImage503/ResponsesImage503';\n\nexport const Responses503 = createResponses({\n name: 'Responses503',\n image: ResponsesImage503,\n title: 'Технические работы',\n description: 'Скорее всего, мы уже решаем проблему. Попробуйте зайти позже.',\n});\n"],"mappings":"AAAA,OAASA,eAAT,oCACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGF,eAAe,CAAC,CAC1CG,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,yGAHmC,CAI1CC,WAAW,CAAE,yTAJ6B,CAAD,CAApC"}
1
+ {"version":3,"file":"Responses503.js","names":["React","Button","createResponses","ResponsesImage503","Responses503","name","image","title","description","actions"],"sources":["../../../../../src/components/Responses503/Responses503.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImage503 } from '##/responsesImages/ResponsesImage503/ResponsesImage503';\n\nexport const Responses503 = createResponses({\n name: 'Responses503',\n image: ResponsesImage503,\n title: 'Технические работы',\n description: 'Скорее всего, мы уже решаем проблему. Попробуйте зайти позже.',\n actions: <Button type=\"button\" label=\"Вернуться назад\" view=\"ghost\" />,\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,iBAAT,iEAEA,MAAO,IAAMC,aAAY,CAAGF,eAAe,CAAC,CAC1CG,IAAI,CAAE,cADoC,CAE1CC,KAAK,CAAEH,iBAFmC,CAG1CI,KAAK,CAAE,yGAHmC,CAI1CC,WAAW,CAAE,yTAJ6B,CAK1CC,OAAO,CAAE,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,uFAA5B,CAA8C,IAAI,CAAC,OAAnD,EALiC,CAAD,CAApC"}
@@ -1,2 +1,2 @@
1
- import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{ResponsesImageConnectionError}from"../../responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionError";export var ResponsesConnectionError=createResponses({name:"ResponsesConnectionError",image:ResponsesImageConnectionError,title:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u043E\u0439",description:"\u041A\u0430\u043A\u0438\u0435-\u0442\u043E \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.",actions:React.createElement(Button,{label:"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",view:"ghost"})});
1
+ import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{cnMixSpace}from"../../mixs/MixSpace";import{ResponsesImageConnectionError}from"../../responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionError";export var ResponsesConnectionError=createResponses({name:"ResponsesConnectionError",image:ResponsesImageConnectionError,title:"\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u0441 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u043E\u0439",description:"\u041A\u0430\u043A\u0438\u0435-\u0442\u043E \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B \u0441\u043E \u0441\u0432\u044F\u0437\u044C\u044E. \u041E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",actions:React.createElement(React.Fragment,null,React.createElement(Button,{type:"button",label:"\u041F\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C",className:cnMixSpace({mR:"s"})}),React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043D\u0430\u0437\u0430\u0434",view:"ghost"}))});
2
2
  //# sourceMappingURL=ResponsesConnectionError.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsesConnectionError.js","names":["React","Button","createResponses","ResponsesImageConnectionError","ResponsesConnectionError","name","image","title","description","actions"],"sources":["../../../../../src/components/ResponsesConnectionError/ResponsesConnectionError.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImageConnectionError } from '##/responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionError';\n\nexport const ResponsesConnectionError = createResponses({\n name: 'ResponsesConnectionError',\n image: ResponsesImageConnectionError,\n title: 'Проблемы с загрузкой',\n description: 'Какие-то проблемы со связью. Обновите страницу.',\n actions: <Button label=\"Перезагрузить\" view=\"ghost\" />,\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,6BAAT,yFAEA,MAAO,IAAMC,yBAAwB,CAAGF,eAAe,CAAC,CACtDG,IAAI,CAAE,0BADgD,CAEtDC,KAAK,CAAEH,6BAF+C,CAGtDI,KAAK,CAAE,gHAH+C,CAItDC,WAAW,CAAE,oPAJyC,CAKtDC,OAAO,CAAE,oBAAC,MAAD,EAAQ,KAAK,CAAC,gFAAd,CAA8B,IAAI,CAAC,OAAnC,EAL6C,CAAD,CAAhD"}
1
+ {"version":3,"file":"ResponsesConnectionError.js","names":["React","Button","createResponses","cnMixSpace","ResponsesImageConnectionError","ResponsesConnectionError","name","image","title","description","actions","mR"],"sources":["../../../../../src/components/ResponsesConnectionError/ResponsesConnectionError.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { ResponsesImageConnectionError } from '##/responsesImages/ResponsesImageConnectionError/ResponsesImageConnectionError';\n\nexport const ResponsesConnectionError = createResponses({\n name: 'ResponsesConnectionError',\n image: ResponsesImageConnectionError,\n title: 'Проблемы с загрузкой',\n description: 'Какие-то проблемы со связью. Обновите страницу',\n actions: (\n <>\n <Button\n type=\"button\"\n label=\"Перезагрузить\"\n className={cnMixSpace({ mR: 's' })}\n />\n <Button type=\"button\" label=\"Вернуться назад\" view=\"ghost\" />\n </>\n ),\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,UAAT,2BACA,OAASC,6BAAT,yFAEA,MAAO,IAAMC,yBAAwB,CAAGH,eAAe,CAAC,CACtDI,IAAI,CAAE,0BADgD,CAEtDC,KAAK,CAAEH,6BAF+C,CAGtDI,KAAK,CAAE,gHAH+C,CAItDC,WAAW,CAAE,mPAJyC,CAKtDC,OAAO,CACL,wCACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,KAAK,CAAC,gFAFR,CAGE,SAAS,CAAEP,UAAU,CAAC,CAAEQ,EAAE,CAAE,GAAN,CAAD,CAHvB,EADF,CAME,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,uFAA5B,CAA8C,IAAI,CAAC,OAAnD,EANF,CANoD,CAAD,CAAhD"}
@@ -1,2 +1,2 @@
1
- import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{ResponsesImageDeleted}from"../../responsesImages/ResponsesImageDeleted/ResponsesImageDeleted";export var ResponsesDeleted=createResponses({name:"ResponsesDeleted",image:ResponsesImageDeleted,title:"*\u0427\u0442\u043E-\u0442\u043E* \u0443\u0434\u0430\u043B\u0435\u043D\u043E",description:"*\u0427\u0442\u043E-\u0442\u043E* \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0443\u0434\u0430\u043B\u0435\u043D\u043E",actions:React.createElement(React.Fragment,null,React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u043D\u0430 \u043C\u0435\u0441\u0442\u043E",view:"ghost",style:{marginRight:"var(--space-m)"}}),React.createElement(Button,{type:"button",label:"\u041E\u0442\u043B\u0438\u0447\u043D\u043E!",view:"ghost"}))});
1
+ import React from"react";import{Button}from"../Button";import{createResponses}from"../Responses/createResponses";import{cnMixSpace}from"../../mixs/MixSpace";import{ResponsesImageDeleted}from"../../responsesImages/ResponsesImageDeleted/ResponsesImageDeleted";export var ResponsesDeleted=createResponses({name:"ResponsesDeleted",image:ResponsesImageDeleted,title:"*\u0427\u0442\u043E-\u0442\u043E* \u0443\u0434\u0430\u043B\u0435\u043D\u043E",description:"*\u0427\u0442\u043E-\u0442\u043E* \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0443\u0434\u0430\u043B\u0435\u043D\u043E",actions:React.createElement(React.Fragment,null,React.createElement(Button,{type:"button",label:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u043D\u0430 \u043C\u0435\u0441\u0442\u043E",className:cnMixSpace({mR:"s"})}),React.createElement(Button,{type:"button",label:"\u041E\u0442\u043B\u0438\u0447\u043D\u043E!",view:"ghost"}))});
2
2
  //# sourceMappingURL=ResponsesDeleted.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsesDeleted.js","names":["React","Button","createResponses","ResponsesImageDeleted","ResponsesDeleted","name","image","title","description","actions","marginRight"],"sources":["../../../../../src/components/ResponsesDeleted/ResponsesDeleted.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { ResponsesImageDeleted } from '##/responsesImages/ResponsesImageDeleted/ResponsesImageDeleted';\n\nexport const ResponsesDeleted = createResponses({\n name: 'ResponsesDeleted',\n image: ResponsesImageDeleted,\n title: '*Что-то* удалено',\n description: '*Что-то* успешно удалено',\n actions: (\n <>\n <Button\n type=\"button\"\n label=\"Вернуть на место\"\n view=\"ghost\"\n style={{ marginRight: 'var(--space-m)' }}\n />\n <Button type=\"button\" label=\"Отлично!\" view=\"ghost\" />\n </>\n ),\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,qBAAT,yEAEA,MAAO,IAAMC,iBAAgB,CAAGF,eAAe,CAAC,CAC9CG,IAAI,CAAE,kBADwC,CAE9CC,KAAK,CAAEH,qBAFuC,CAG9CI,KAAK,CAAE,8EAHuC,CAI9CC,WAAW,CAAE,yHAJiC,CAK9CC,OAAO,CACL,wCACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,KAAK,CAAC,wFAFR,CAGE,IAAI,CAAC,OAHP,CAIE,KAAK,CAAE,CAAEC,WAAW,CAAE,gBAAf,CAJT,EADF,CAOE,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,6CAA5B,CAAuC,IAAI,CAAC,OAA5C,EAPF,CAN4C,CAAD,CAAxC"}
1
+ {"version":3,"file":"ResponsesDeleted.js","names":["React","Button","createResponses","cnMixSpace","ResponsesImageDeleted","ResponsesDeleted","name","image","title","description","actions","mR"],"sources":["../../../../../src/components/ResponsesDeleted/ResponsesDeleted.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { createResponses } from '##/components/Responses/createResponses';\nimport { cnMixSpace } from '##/mixs/MixSpace';\nimport { ResponsesImageDeleted } from '##/responsesImages/ResponsesImageDeleted/ResponsesImageDeleted';\n\nexport const ResponsesDeleted = createResponses({\n name: 'ResponsesDeleted',\n image: ResponsesImageDeleted,\n title: '*Что-то* удалено',\n description: '*Что-то* успешно удалено',\n actions: (\n <>\n <Button\n type=\"button\"\n label=\"Вернуть на место\"\n className={cnMixSpace({ mR: 's' })}\n />\n <Button type=\"button\" label=\"Отлично!\" view=\"ghost\" />\n </>\n ),\n});\n"],"mappings":"AAAA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,eAAT,oCACA,OAASC,UAAT,2BACA,OAASC,qBAAT,yEAEA,MAAO,IAAMC,iBAAgB,CAAGH,eAAe,CAAC,CAC9CI,IAAI,CAAE,kBADwC,CAE9CC,KAAK,CAAEH,qBAFuC,CAG9CI,KAAK,CAAE,8EAHuC,CAI9CC,WAAW,CAAE,yHAJiC,CAK9CC,OAAO,CACL,wCACE,oBAAC,MAAD,EACE,IAAI,CAAC,QADP,CAEE,KAAK,CAAC,wFAFR,CAGE,SAAS,CAAEP,UAAU,CAAC,CAAEQ,EAAE,CAAE,GAAN,CAAD,CAHvB,EADF,CAME,oBAAC,MAAD,EAAQ,IAAI,CAAC,QAAb,CAAsB,KAAK,CAAC,6CAA5B,CAAuC,IAAI,CAAC,OAA5C,EANF,CAN4C,CAAD,CAAxC"}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["placeholder","onBlur","onFocus","items","onChange","value","required","disabled","ariaLabel","id","dropdownRef","form","view","size","dropdownClassName","name","groups","getItemLabel","labelForEmptyItems","getItemKey","getItemGroupKey","getItemDisabled","getGroupKey","getGroupLabel","renderItem","isLoading","renderValue","inputRef","style","dropdownForm"];import"../SelectComponents/Select.css";import{IconSelect}from"@consta/icons/IconSelect";import React,{forwardRef,useRef}from"react";import{isNotNil}from"../../utils/type-guards";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useSelect}from"../../hooks/useSelect/useSelect";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{cnSelect,COMPONENT_NAME}from"../SelectComponents/cnSelect";import{defaultLabelForEmptyItems}from"../SelectComponents/helpers";import{SelectContainer}from"../SelectComponents/SelectContainer/SelectContainer";import{SelectDropdown}from"../SelectComponents/SelectDropdown/SelectDropdown";import{SelectItem}from"../SelectComponents/SelectItem/SelectItem";import{defaultPropForm,defaultPropSize,defaultPropView}from"../SelectComponents/types";import{withDefaultGetters}from"./helpers";var SelectRender=function(a,b){var c=useRef(null),d=useRef(null),e=usePropsHandler(COMPONENT_NAME,withDefaultGetters(a),d),f=e.placeholder,g=e.onBlur,h=e.onFocus,i=e.items,j=e.onChange,k=e.value,l=e.required,m=e.disabled,n=e.ariaLabel,o=e.id,p=e.dropdownRef,q=void 0===p?c:p,r=e.form,s=void 0===r?defaultPropForm:r,t=e.view,u=void 0===t?defaultPropView:t,v=e.size,w=void 0===v?defaultPropSize:v,x=e.dropdownClassName,y=e.name,z=e.groups,A=void 0===z?[]:z,B=e.getItemLabel,C=e.labelForEmptyItems,D=void 0===C?defaultLabelForEmptyItems:C,E=e.getItemKey,F=e.getItemGroupKey,G=e.getItemDisabled,H=e.getGroupKey,I=e.getGroupLabel,J=e.renderItem,K=e.isLoading,L=e.renderValue,M=e.inputRef,N=e.style,O=e.dropdownForm,P=void 0===O?"default":O,Q=_objectWithoutProperties(e,_excluded),R=useSelect({items:i,groups:A,value:k,onChange:j,dropdownRef:q,controlRef:d,disabled:m,getItemLabel:B,getItemKey:E,getGroupKey:H,getItemGroupKey:F,getItemDisabled:G,multiple:!1,onBlur:g,onFocus:h}),S=R.getKeyProps,T=R.getOptionProps,U=R.isOpen,V=R.visibleItems,W=R.isFocused,X=R.handleInputFocus,Y=R.handleInputBlur,Z=R.handleToggleDropdown,$=R.inputRef,_=R.handleInputClick,aa=R.notFound,ba=R.hasItems,ca=o?"".concat(o,"-input"):o;return React.createElement(React.Fragment,null,React.createElement(SelectContainer,Object.assign({focused:W,disabled:m,size:w,view:u,form:s,required:l,ref:b,style:N,id:ca},Q),React.createElement("div",{className:cnSelect("Control"),ref:d,"aria-expanded":U,"aria-haspopup":"listbox",id:o},React.createElement("div",{className:cnSelect("ControlInner")},React.createElement("div",{className:cnSelect("ControlValueContainer")},React.createElement("input",Object.assign({},S(),{type:"button",name:y,id:ca,onFocus:X,onBlur:Y,"aria-label":n,onClick:_,ref:useForkRef([$,M]),className:cnSelect("FakeField"),readOnly:!0})),isNotNil(k)&&(L||function renderValueDefault(a){var b=B(a.item);return React.createElement("span",{className:cnSelect("ControlValue"),title:b},b)})({item:k}),!isNotNil(k)&&f&&React.createElement("span",{className:cnSelect("Placeholder"),title:"placeholder"},f))),React.createElement("span",{className:cnSelect("Indicators")},React.createElement("button",{type:"button",className:cnSelect("IndicatorsDropdown"),tabIndex:-1,onClick:Z},React.createElement(IconSelect,{size:"xs",className:cnSelect("DropdownIndicatorIcon")}))))),React.createElement(SelectDropdown,{isOpen:U,size:w,controlRef:d,getOptionProps:T,dropdownRef:q,form:P,className:x,renderItem:J||function renderItemDefault(a){var b=a.item,c=a.active,d=a.hovered,e=a.onClick,f=a.onMouseEnter;return React.createElement(SelectItem,{label:B(b),active:c,hovered:d,multiple:!1,size:w,indent:"round"===P?"increased":"normal",onClick:e,onMouseEnter:f,disabled:G(b)})},getGroupLabel:I,visibleItems:V,notFound:aa,isLoading:K,labelForEmptyItems:D,hasItems:ba,style:"number"==typeof(null===N||void 0===N?void 0:N.zIndex)?{zIndex:N.zIndex+1}:void 0}))};export var Select=forwardRef(SelectRender);export*from"./helpers";
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["placeholder","onBlur","onFocus","items","onChange","value","required","disabled","ariaLabel","id","dropdownRef","form","view","size","dropdownClassName","name","groups","getItemLabel","labelForEmptyItems","getItemKey","getItemGroupKey","getItemDisabled","getGroupKey","getGroupLabel","renderItem","isLoading","renderValue","inputRef","style","dropdownForm"];import"../SelectComponents/Select.css";import{IconSelect}from"@consta/icons/IconSelect";import React,{forwardRef,useRef}from"react";import{isNotNil}from"../../utils/type-guards";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{useSelect}from"../../hooks/useSelect/useSelect";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{cnSelect,COMPONENT_NAME}from"../SelectComponents/cnSelect";import{defaultLabelForEmptyItems}from"../SelectComponents/helpers";import{SelectContainer}from"../SelectComponents/SelectContainer/SelectContainer";import{SelectDropdown}from"../SelectComponents/SelectDropdown/SelectDropdown";import{SelectItem}from"../SelectComponents/SelectItem/SelectItem";import{defaultPropForm,defaultPropSize,defaultPropView}from"../SelectComponents/types";import{iconSizeMap,withDefaultGetters}from"./helpers";var SelectRender=function(a,b){var c=useRef(null),d=useRef(null),e=usePropsHandler(COMPONENT_NAME,withDefaultGetters(a),d),f=e.placeholder,g=e.onBlur,h=e.onFocus,i=e.items,j=e.onChange,k=e.value,l=e.required,m=e.disabled,n=e.ariaLabel,o=e.id,p=e.dropdownRef,q=void 0===p?c:p,r=e.form,s=void 0===r?defaultPropForm:r,t=e.view,u=void 0===t?defaultPropView:t,v=e.size,w=void 0===v?defaultPropSize:v,x=e.dropdownClassName,y=e.name,z=e.groups,A=void 0===z?[]:z,B=e.getItemLabel,C=e.labelForEmptyItems,D=void 0===C?defaultLabelForEmptyItems:C,E=e.getItemKey,F=e.getItemGroupKey,G=e.getItemDisabled,H=e.getGroupKey,I=e.getGroupLabel,J=e.renderItem,K=e.isLoading,L=e.renderValue,M=e.inputRef,N=e.style,O=e.dropdownForm,P=void 0===O?"default":O,Q=_objectWithoutProperties(e,_excluded),R=useSelect({items:i,groups:A,value:k,onChange:j,dropdownRef:q,controlRef:d,disabled:m,getItemLabel:B,getItemKey:E,getGroupKey:H,getItemGroupKey:F,getItemDisabled:G,multiple:!1,onBlur:g,onFocus:h}),S=R.getKeyProps,T=R.getOptionProps,U=R.isOpen,V=R.visibleItems,W=R.isFocused,X=R.handleInputFocus,Y=R.handleInputBlur,Z=R.handleToggleDropdown,$=R.inputRef,_=R.handleInputClick,aa=R.notFound,ba=R.hasItems,ca=o?"".concat(o,"-input"):o;return React.createElement(React.Fragment,null,React.createElement(SelectContainer,Object.assign({focused:W,disabled:m,size:w,view:u,form:s,required:l,ref:b,style:N,id:ca},Q),React.createElement("div",{className:cnSelect("Control"),ref:d,"aria-expanded":U,"aria-haspopup":"listbox",id:o},React.createElement("div",{className:cnSelect("ControlInner")},React.createElement("div",{className:cnSelect("ControlValueContainer")},React.createElement("input",Object.assign({},S(),{type:"button",name:y,id:ca,onFocus:X,onBlur:Y,"aria-label":n,onClick:_,ref:useForkRef([$,M]),className:cnSelect("FakeField"),readOnly:!0})),isNotNil(k)&&(L||function renderValueDefault(a){var b=B(a.item);return React.createElement("span",{className:cnSelect("ControlValue"),title:b},b)})({item:k}),!isNotNil(k)&&f&&React.createElement("span",{className:cnSelect("Placeholder"),title:"placeholder"},f))),React.createElement("span",{className:cnSelect("Indicators")},React.createElement("button",{type:"button",className:cnSelect("IndicatorsDropdown"),tabIndex:-1,onClick:Z},React.createElement(IconSelect,{size:iconSizeMap[w],className:cnSelect("DropdownIndicatorIcon")}))))),React.createElement(SelectDropdown,{isOpen:U,size:w,controlRef:d,getOptionProps:T,dropdownRef:q,form:P,className:x,renderItem:J||function renderItemDefault(a){var b=a.item,c=a.active,d=a.hovered,e=a.onClick,f=a.onMouseEnter;return React.createElement(SelectItem,{label:B(b),active:c,hovered:d,multiple:!1,size:w,indent:"round"===P?"increased":"normal",onClick:e,onMouseEnter:f,disabled:G(b)})},getGroupLabel:I,visibleItems:V,notFound:aa,isLoading:K,labelForEmptyItems:D,hasItems:ba,style:"number"==typeof(null===N||void 0===N?void 0:N.zIndex)?{zIndex:N.zIndex+1}:void 0}))};export var Select=forwardRef(SelectRender);export*from"./helpers";
2
2
  //# sourceMappingURL=Select.js.map