@alfalab/core-components-picker-button 11.1.10 → 11.3.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 (266) hide show
  1. package/Component-081223cb.d.ts +220 -0
  2. package/Component-0816e61d.d.ts +5 -0
  3. package/Component-72dda473.d.ts +53 -0
  4. package/Component-c44170fe.d.ts +281 -0
  5. package/Component.desktop-785df74d.d.ts +1 -1
  6. package/Component.desktop.d.ts +2 -2
  7. package/Component.desktop.js +3 -2
  8. package/Component.mobile-d7e9f69d.d.ts +1 -1
  9. package/Component.mobile.d.ts +4 -4
  10. package/Component.responsive.d.ts +7 -9
  11. package/Component.responsive.js +1 -0
  12. package/browser-a216f694.d.ts +6 -0
  13. package/cssm/Component-081223cb.d.ts +220 -0
  14. package/cssm/Component-0816e61d.d.ts +5 -0
  15. package/cssm/Component-c44170fe.d.ts +281 -0
  16. package/cssm/Component.desktop-785df74d.d.ts +1 -1
  17. package/cssm/Component.desktop.d.ts +2 -2
  18. package/cssm/Component.desktop.js +2 -1
  19. package/cssm/Component.mobile-d7e9f69d.d.ts +1 -1
  20. package/cssm/Component.mobile.d.ts +4 -4
  21. package/cssm/Component.responsive.d.ts +7 -9
  22. package/cssm/Component.responsive.js +1 -0
  23. package/cssm/browser-a216f694.d.ts +6 -0
  24. package/cssm/{desktop.d.ts → desktop/index.d.ts} +1 -1
  25. package/cssm/{desktop.js → desktop/index.js} +8 -7
  26. package/cssm/field/Component.d.ts +1 -1
  27. package/cssm/field/index.module.css +2 -2
  28. package/cssm/{index-10db897e.d.ts → index-081223cb.d.ts} +12 -1
  29. package/cssm/index-785df74d.d.ts +2 -0
  30. package/cssm/index-c44170fe.d.ts +17 -2
  31. package/cssm/index-ebda875c.d.ts +53 -192
  32. package/cssm/index.js +1 -0
  33. package/cssm/mobile/index.d.ts +2 -0
  34. package/cssm/{mobile.js → mobile/index.js} +6 -6
  35. package/cssm/option/Component.d.ts +2 -2
  36. package/cssm/shared/index.d.ts +2 -0
  37. package/cssm/{shared.js → shared/index.js} +1 -1
  38. package/cssm/typings-0816e61d.d.ts +1320 -0
  39. package/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  40. package/cssm/useSkeleton-1b036d4b.d.ts +31 -3
  41. package/cssm/{utils-0f4b9bed.d.ts → utils-d2597f31.d.ts} +1 -1
  42. package/{esm/desktop.d.ts → desktop/index.d.ts} +1 -1
  43. package/{desktop.js → desktop/index.js} +5 -4
  44. package/desktop/package.json +3 -0
  45. package/esm/Component-081223cb.d.ts +220 -0
  46. package/esm/Component-0816e61d.d.ts +5 -0
  47. package/esm/Component-72dda473.d.ts +53 -0
  48. package/{cssm/Component-10db897e.d.ts → esm/Component-c44170fe.d.ts} +3 -18
  49. package/esm/Component.desktop-785df74d.d.ts +1 -1
  50. package/esm/Component.desktop.d.ts +2 -2
  51. package/esm/Component.desktop.js +3 -2
  52. package/esm/Component.mobile-d7e9f69d.d.ts +1 -1
  53. package/esm/Component.mobile.d.ts +4 -4
  54. package/esm/Component.responsive.d.ts +7 -9
  55. package/esm/Component.responsive.js +1 -0
  56. package/esm/browser-a216f694.d.ts +6 -0
  57. package/{modern/desktop.d.ts → esm/desktop/index.d.ts} +1 -1
  58. package/esm/{desktop.js → desktop/index.js} +5 -4
  59. package/esm/field/Component.d.ts +1 -1
  60. package/esm/field/Component.js +1 -1
  61. package/esm/field/index.css +8 -8
  62. package/{index-10db897e.d.ts → esm/index-081223cb.d.ts} +13 -2
  63. package/esm/index-785df74d.d.ts +2 -0
  64. package/esm/index-c44170fe.d.ts +17 -2
  65. package/esm/index-ebda875c.d.ts +1 -2
  66. package/esm/index.css +5 -5
  67. package/esm/index.js +1 -0
  68. package/esm/mobile/index.d.ts +2 -0
  69. package/esm/{mobile.js → mobile/index.js} +4 -4
  70. package/esm/option/Component.d.ts +2 -2
  71. package/esm/option/Component.js +1 -1
  72. package/esm/option/index.css +4 -4
  73. package/esm/shared/index.d.ts +2 -0
  74. package/esm/{shared.js → shared/index.js} +1 -1
  75. package/esm/typings-0816e61d.d.ts +1320 -0
  76. package/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  77. package/esm/useSkeleton-1b036d4b.d.ts +40 -0
  78. package/{modern/utils-0f4b9bed.d.ts → esm/utils-d2597f31.d.ts} +1 -1
  79. package/field/Component.d.ts +1 -1
  80. package/field/Component.js +1 -1
  81. package/field/index.css +8 -8
  82. package/{esm/index-10db897e.d.ts → index-081223cb.d.ts} +13 -2
  83. package/index-785df74d.d.ts +2 -0
  84. package/index-c44170fe.d.ts +17 -2
  85. package/index-ebda875c.d.ts +0 -1
  86. package/index.css +5 -5
  87. package/index.js +1 -0
  88. package/mobile/index.d.ts +2 -0
  89. package/{mobile.js → mobile/index.js} +4 -4
  90. package/mobile/package.json +3 -0
  91. package/modern/Component-081223cb.d.ts +220 -0
  92. package/modern/Component-0816e61d.d.ts +5 -0
  93. package/modern/Component-72dda473.d.ts +53 -0
  94. package/modern/Component-c44170fe.d.ts +281 -0
  95. package/modern/Component.desktop-785df74d.d.ts +1 -1
  96. package/modern/Component.desktop.d.ts +2 -2
  97. package/modern/Component.desktop.js +3 -2
  98. package/modern/Component.mobile-d7e9f69d.d.ts +1 -1
  99. package/modern/Component.mobile.d.ts +4 -4
  100. package/modern/Component.responsive.d.ts +7 -9
  101. package/modern/Component.responsive.js +1 -0
  102. package/modern/browser-a216f694.d.ts +6 -0
  103. package/{desktop.d.ts → modern/desktop/index.d.ts} +1 -1
  104. package/modern/{desktop.js → desktop/index.js} +5 -4
  105. package/modern/field/Component.d.ts +1 -1
  106. package/modern/field/Component.js +1 -1
  107. package/modern/field/index.css +8 -8
  108. package/modern/{index-10db897e.d.ts → index-081223cb.d.ts} +13 -2
  109. package/modern/index-785df74d.d.ts +2 -0
  110. package/modern/index-c44170fe.d.ts +17 -2
  111. package/modern/index-ebda875c.d.ts +0 -1
  112. package/modern/index.css +5 -5
  113. package/modern/index.js +1 -0
  114. package/modern/mobile/index.d.ts +2 -0
  115. package/modern/{mobile.js → mobile/index.js} +4 -4
  116. package/modern/option/Component.d.ts +2 -2
  117. package/modern/option/Component.js +1 -1
  118. package/modern/option/index.css +4 -4
  119. package/modern/shared/index.d.ts +2 -0
  120. package/modern/{shared.js → shared/index.js} +1 -1
  121. package/modern/typings-0816e61d.d.ts +1320 -0
  122. package/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  123. package/modern/useSkeleton-1b036d4b.d.ts +40 -0
  124. package/{esm/utils-0f4b9bed.d.ts → modern/utils-d2597f31.d.ts} +1 -1
  125. package/option/Component.d.ts +2 -2
  126. package/option/Component.js +1 -1
  127. package/option/index.css +4 -4
  128. package/package.json +4 -3
  129. package/shared/index.d.ts +2 -0
  130. package/{shared.js → shared/index.js} +1 -1
  131. package/shared/package.json +3 -0
  132. package/src/Component.desktop.tsx +3 -0
  133. package/src/Component.mobile.tsx +3 -1
  134. package/src/Component.responsive.tsx +6 -6
  135. package/src/{desktop.ts → desktop/index.ts} +1 -1
  136. package/src/desktop/package.json +3 -0
  137. package/src/field/index.module.css +1 -1
  138. package/src/mobile/index.ts +1 -0
  139. package/src/mobile/package.json +3 -0
  140. package/src/shared/index.ts +2 -0
  141. package/src/shared/package.json +3 -0
  142. package/typings-0816e61d.d.ts +1320 -0
  143. package/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  144. package/useSkeleton-1b036d4b.d.ts +40 -0
  145. package/{utils-0f4b9bed.d.ts → utils-d2597f31.d.ts} +1 -1
  146. package/Component-0f4b9bed.d.ts +0 -72
  147. package/Component-10db897e.d.ts +0 -6
  148. package/Component-69921c40.d.ts +0 -184
  149. package/Component-bdb4c6b9.d.ts +0 -12
  150. package/Component-c76d6398.d.ts +0 -5
  151. package/Component-ebda875c.d.ts +0 -12
  152. package/Component.mobile-f1f15074.d.ts +0 -34
  153. package/Component.mobile-f28cbba0.d.ts +0 -41
  154. package/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  155. package/Component.responsive-3109f463.d.ts +0 -26
  156. package/Context-bdb4c6b9.d.ts +0 -4
  157. package/ResponsiveContext-baf4875b.d.ts +0 -5
  158. package/component-10db897e.d.ts +0 -44
  159. package/cssm/Component-0f4b9bed.d.ts +0 -5
  160. package/cssm/Component-aed0af6e.d.ts +0 -11
  161. package/cssm/Component-bdb4c6b9.d.ts +0 -12
  162. package/cssm/Component-c76d6398.d.ts +0 -5
  163. package/cssm/Component-ebda875c.d.ts +0 -101
  164. package/cssm/Component-f12ee135.d.ts +0 -72
  165. package/cssm/Component.mobile-96988a65.d.ts +0 -6
  166. package/cssm/Component.mobile-f1f15074.d.ts +0 -34
  167. package/cssm/Component.mobile-f28cbba0.d.ts +0 -41
  168. package/cssm/Component.responsive-d7e9f69d.d.ts +0 -26
  169. package/cssm/Context-bdb4c6b9.d.ts +0 -4
  170. package/cssm/ResponsiveContext-baf4875b.d.ts +0 -5
  171. package/cssm/desktop-69921c40.d.ts +0 -6
  172. package/cssm/hook-8abfea97.d.ts +0 -90
  173. package/cssm/hook-ebda875c.d.ts +0 -48
  174. package/cssm/index-136acbb1.d.ts +0 -28
  175. package/cssm/index-bdb4c6b9.d.ts +0 -180
  176. package/cssm/index-c76d6398.d.ts +0 -2
  177. package/cssm/index-f12ee135.d.ts +0 -324
  178. package/cssm/mobile.d.ts +0 -2
  179. package/cssm/shared-4cd3936b.d.ts +0 -7
  180. package/cssm/shared.d.ts +0 -2
  181. package/cssm/typings-0f4b9bed.d.ts +0 -576
  182. package/cssm/typings-89f0cb07.d.ts +0 -93
  183. package/cssm/typings-bdb4c6b9.d.ts +0 -52
  184. package/desktop-69921c40.d.ts +0 -6
  185. package/esm/Component-0f4b9bed.d.ts +0 -72
  186. package/esm/Component-10db897e.d.ts +0 -6
  187. package/esm/Component-69921c40.d.ts +0 -184
  188. package/esm/Component-bdb4c6b9.d.ts +0 -12
  189. package/esm/Component-c76d6398.d.ts +0 -5
  190. package/esm/Component-ebda875c.d.ts +0 -12
  191. package/esm/Component.mobile-f1f15074.d.ts +0 -34
  192. package/esm/Component.mobile-f28cbba0.d.ts +0 -41
  193. package/esm/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  194. package/esm/Component.responsive-3109f463.d.ts +0 -26
  195. package/esm/Context-bdb4c6b9.d.ts +0 -4
  196. package/esm/ResponsiveContext-baf4875b.d.ts +0 -5
  197. package/esm/component-10db897e.d.ts +0 -44
  198. package/esm/desktop-69921c40.d.ts +0 -6
  199. package/esm/hook-8abfea97.d.ts +0 -90
  200. package/esm/index-136acbb1.d.ts +0 -28
  201. package/esm/index-bdb4c6b9.d.ts +0 -2
  202. package/esm/index-c76d6398.d.ts +0 -2
  203. package/esm/index-f12ee135.d.ts +0 -3
  204. package/esm/mobile-89f0cb07.d.ts +0 -6
  205. package/esm/mobile.d.ts +0 -2
  206. package/esm/shared-4cd3936b.d.ts +0 -65
  207. package/esm/shared.d.ts +0 -2
  208. package/esm/types-67a2d8af.d.ts +0 -276
  209. package/esm/typings-0f4b9bed.d.ts +0 -576
  210. package/esm/typings-89f0cb07.d.ts +0 -93
  211. package/esm/typings-bdb4c6b9.d.ts +0 -52
  212. package/esm/useSkeleton-ebda875c.d.ts +0 -12
  213. package/esm/utils-1574ad8b.d.ts +0 -29
  214. package/esm/utils-49cc3c24.d.ts +0 -8
  215. package/hook-8abfea97.d.ts +0 -90
  216. package/index-136acbb1.d.ts +0 -28
  217. package/index-bdb4c6b9.d.ts +0 -2
  218. package/index-c76d6398.d.ts +0 -2
  219. package/index-f12ee135.d.ts +0 -3
  220. package/mobile-89f0cb07.d.ts +0 -6
  221. package/mobile.d.ts +0 -2
  222. package/modern/Component-0f4b9bed.d.ts +0 -72
  223. package/modern/Component-10db897e.d.ts +0 -6
  224. package/modern/Component-69921c40.d.ts +0 -184
  225. package/modern/Component-bdb4c6b9.d.ts +0 -12
  226. package/modern/Component-c76d6398.d.ts +0 -5
  227. package/modern/Component-ebda875c.d.ts +0 -12
  228. package/modern/Component.mobile-f1f15074.d.ts +0 -34
  229. package/modern/Component.mobile-f28cbba0.d.ts +0 -41
  230. package/modern/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  231. package/modern/Component.responsive-3109f463.d.ts +0 -26
  232. package/modern/Context-bdb4c6b9.d.ts +0 -4
  233. package/modern/ResponsiveContext-baf4875b.d.ts +0 -5
  234. package/modern/component-10db897e.d.ts +0 -44
  235. package/modern/desktop-69921c40.d.ts +0 -6
  236. package/modern/hook-8abfea97.d.ts +0 -90
  237. package/modern/index-136acbb1.d.ts +0 -28
  238. package/modern/index-bdb4c6b9.d.ts +0 -2
  239. package/modern/index-c76d6398.d.ts +0 -2
  240. package/modern/index-f12ee135.d.ts +0 -3
  241. package/modern/mobile-89f0cb07.d.ts +0 -6
  242. package/modern/mobile.d.ts +0 -2
  243. package/modern/shared-4cd3936b.d.ts +0 -65
  244. package/modern/shared.d.ts +0 -2
  245. package/modern/types-67a2d8af.d.ts +0 -276
  246. package/modern/typings-0f4b9bed.d.ts +0 -576
  247. package/modern/typings-89f0cb07.d.ts +0 -93
  248. package/modern/typings-bdb4c6b9.d.ts +0 -52
  249. package/modern/useSkeleton-ebda875c.d.ts +0 -12
  250. package/modern/utils-1574ad8b.d.ts +0 -29
  251. package/modern/utils-49cc3c24.d.ts +0 -8
  252. package/shared-4cd3936b.d.ts +0 -65
  253. package/shared.d.ts +0 -2
  254. package/src/mobile.ts +0 -1
  255. package/src/shared.ts +0 -2
  256. package/types-67a2d8af.d.ts +0 -276
  257. package/typings-0f4b9bed.d.ts +0 -576
  258. package/typings-89f0cb07.d.ts +0 -93
  259. package/typings-bdb4c6b9.d.ts +0 -52
  260. package/useSkeleton-ebda875c.d.ts +0 -12
  261. package/utils-1574ad8b.d.ts +0 -29
  262. package/utils-49cc3c24.d.ts +0 -8
  263. /package/cssm/{mobile-96988a65.d.ts → index-d7e9f69d.d.ts} +0 -0
  264. /package/esm/{mobile-d7e9f69d.d.ts → index-d7e9f69d.d.ts} +0 -0
  265. /package/{mobile-d7e9f69d.d.ts → index-d7e9f69d.d.ts} +0 -0
  266. /package/modern/{mobile-d7e9f69d.d.ts → index-d7e9f69d.d.ts} +0 -0
@@ -1,52 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { BaseModalProps } from "./index-bdb4c6b9";
3
- type ModalDesktopProps = BaseModalProps & {
4
- /**
5
- * Ширина модального окна
6
- * @default "m"
7
- */
8
- size?: 's' | 'm' | 'l' | 'xl' | 'fullscreen';
9
- /**
10
- * Растягивает модальное окно на весь экран
11
- * @deprecated Используйте размер fullscreen
12
- */
13
- fullscreen?: boolean;
14
- /**
15
- * Фиксирует позицию модального окна после открытия,
16
- * предотвращая скачки, если контент внутри будет меняться
17
- */
18
- fixedPosition?: boolean;
19
- /**
20
- * Управление наличием закрывающего крестика
21
- * @default false
22
- */
23
- hasCloser?: boolean;
24
- };
25
- type ModalMobileProps = Omit<ModalDesktopProps, 'size' | 'fixedPosition' | 'fullscreen'>;
26
- type ModalResponsiveProps = ModalDesktopProps & {
27
- /**
28
- * Контрольная точка, с нее начинается desktop версия
29
- * @default 1024
30
- */
31
- breakpoint?: number;
32
- };
33
- type View = 'desktop' | 'mobile';
34
- type TResponsiveModalContext = {
35
- view: View;
36
- size: NonNullable<ModalDesktopProps['size']>;
37
- };
38
- type ContentProps = {
39
- /**
40
- * Контент
41
- */
42
- children?: ReactNode;
43
- /**
44
- * Дополнительный класс
45
- */
46
- className?: string;
47
- /**
48
- * Растягивает контент на всю высоту
49
- */
50
- flex?: boolean;
51
- };
52
- export { ModalDesktopProps, ModalMobileProps, ModalResponsiveProps, View, TResponsiveModalContext, ContentProps };
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import React from 'react';
3
- import { TextSkeletonProps } from "./types-1b036d4b";
4
- type SkeletonProps = {
5
- wrapperClassName?: string;
6
- dataTestId?: string;
7
- };
8
- declare function useSkeleton(showSkeleton?: boolean, skeletonProps?: TextSkeletonProps): {
9
- renderSkeleton: (props: SkeletonProps) => React.JSX.Element | null;
10
- textRef: React.RefObject<HTMLElement>;
11
- };
12
- export { useSkeleton };
@@ -1,29 +0,0 @@
1
- type SavedStyle = {
2
- value: string;
3
- key: string;
4
- el: HTMLElement;
5
- };
6
- type RestoreStyle = {
7
- container: HTMLElement;
8
- modals: number;
9
- styles: SavedStyle[];
10
- };
11
- declare class ModalStore {
12
- private readonly restoreStyles;
13
- constructor();
14
- getRestoreStyles: () => RestoreStyle[];
15
- }
16
- declare const getModalStore: () => ModalStore;
17
- declare class GlobalStore {
18
- private readonly modalStore;
19
- constructor();
20
- getModalStore: () => ModalStore;
21
- }
22
- declare function isScrolledToTop(target: HTMLElement): boolean;
23
- declare function isScrolledToBottom(target: HTMLElement): boolean;
24
- declare function hasScrollbar(target: HTMLElement): boolean;
25
- declare const getScrollbarSize: () => number;
26
- declare const restoreContainerStyles: (container: HTMLElement) => void;
27
- declare const handleContainer: (container?: HTMLElement) => void;
28
- export type { SavedStyle };
29
- export { getModalStore, GlobalStore, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer };
@@ -1,8 +0,0 @@
1
- declare const TIMEOUT = 500;
2
- declare const SWIPE_VELOCITY = 0.4;
3
- declare const MARKER_HEIGHT = 24;
4
- declare const CLOSE_OFFSET = 0.2;
5
- declare const SCROLL_OFFSET = 1;
6
- declare const HEADER_OFFSET = 24;
7
- declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
8
- export { TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber };
@@ -1,65 +0,0 @@
1
- /// <reference types="react" />
2
- import React from "react";
3
- import { BaseSelectProps, OptionProps, OptionShape } from "./typings-0f4b9bed";
4
- // eslint-disable-next-line @typescript-eslint/naming-convention
5
- type useSelectWithLoadingProps = {
6
- loading?: boolean;
7
- visibleOptions?: BaseSelectProps["visibleOptions"];
8
- Option?: React.FC<OptionProps>;
9
- };
10
- declare function useSelectWithLoading({ loading, visibleOptions, Option }: useSelectWithLoadingProps): {
11
- Option: (props: OptionProps) => React.JSX.Element;
12
- options: OptionShape[];
13
- } | null;
14
- type OptionsFetcherResponse = {
15
- options: OptionShape[];
16
- hasMore: boolean;
17
- };
18
- // eslint-disable-next-line @typescript-eslint/naming-convention
19
- type useLazyLoadingProps = {
20
- /** Количество элементов на "странице" */
21
- limit?: number;
22
- /** Начальный номер "страницы" */
23
- initialOffset?: number;
24
- /** Скелетон загружаемых элементов */
25
- skeleton?: React.ReactNode;
26
- /** Компонент пункта меню */
27
- Option?: React.FC<OptionProps>;
28
- /**
29
- * Функция-загрузчик опций.
30
- * @param offset - текущая страница
31
- * @param limit - количество элементов на странице
32
- * @param queryString - строчные данные, пробрасываемые для поиска из кастомного инпута, расположенного в заголовке OptionsList
33
- * @returns Promise<{
34
- * options - список опций следующей "страницы". Они аппендятся к предыдущим
35
- * hasMore - указывает, есть ли еще незагруженные элементы (в случае false перестает загружать "следующую страницу")
36
- * }>
37
- */
38
- optionsFetcher(offset: number, limit: number, queryString?: string): Promise<OptionsFetcherResponse>;
39
- };
40
- declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton, Option }: useLazyLoadingProps): {
41
- optionsProps: {
42
- Option: (props: OptionProps) => React.JSX.Element;
43
- options: OptionShape[];
44
- optionsListProps: {
45
- ref: React.RefObject<HTMLDivElement>;
46
- inputProps: {
47
- onChange: (event: React.ChangeEvent<HTMLInputElement>, payload: {
48
- value: string;
49
- }) => void;
50
- value: string;
51
- };
52
- };
53
- onOpen: (payload: {
54
- open?: boolean;
55
- }) => void;
56
- };
57
- reset: () => void;
58
- };
59
- export * from "./index-ebda875c";
60
- export * from "./Component-0f4b9bed";
61
- export { useSelectWithLoading, useLazyLoading };
62
- export * from "./hook-8abfea97";
63
- export * from "./typings-0f4b9bed";
64
- export * from "./utils-0f4b9bed";
65
- export type { AdditionalMobileProps } from "./Component.mobile-f28cbba0";
package/shared.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export { getIcon } from "./utils/index";
2
- export * from "./types";
package/src/mobile.ts DELETED
@@ -1 +0,0 @@
1
- export { PickerButtonMobile, PickerButtonMobileProps } from './Component.mobile';
package/src/shared.ts DELETED
@@ -1,2 +0,0 @@
1
- export { getIcon } from './utils';
2
- export * from './types';
@@ -1,276 +0,0 @@
1
- /// <reference types="react-transition-group" />
2
- import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
3
- import { HandledEvents } from 'react-swipeable/es/types';
4
- import { TransitionProps } from 'react-transition-group/Transition';
5
- import { BaseModalProps } from "./index-bdb4c6b9";
6
- import { NavigationBarProps } from "./index-c76d6398";
7
- import { BackgroundColorType } from "./index-72dda473";
8
- type BottomSheetTitleAlign = 'center' | 'left';
9
- type BottomSheetProps = {
10
- /**
11
- * Контент
12
- */
13
- children?: ReactNode;
14
- /**
15
- * Управление видимостью
16
- */
17
- open: boolean;
18
- /**
19
- * Заголовок
20
- */
21
- title?: ReactNode;
22
- /**
23
- * Размер заголовка
24
- */
25
- titleSize?: NavigationBarProps['titleSize'];
26
- /**
27
- * Подзаголовок.
28
- */
29
- subtitle?: NavigationBarProps['subtitle'];
30
- /**
31
- * Кнопка действия (обычно, это кнопка закрытия)
32
- */
33
- actionButton?: ReactNode;
34
- /**
35
- * Нода, компонент или функция возвращающая их
36
- *
37
- * Контейнер к которому будут добавляться порталы
38
- */
39
- container?: BaseModalProps['container'];
40
- /**
41
- * Рендерить ли в контейнер через портал.
42
- */
43
- usePortal?: BaseModalProps['usePortal'];
44
- /**
45
- * Дополнительный класс
46
- */
47
- className?: string;
48
- /**
49
- * Дополнительный класс
50
- */
51
- contentClassName?: string;
52
- /**
53
- * Дополнительные пропсы на контейнер.
54
- */
55
- containerProps?: HTMLAttributes<HTMLDivElement>;
56
- /**
57
- * Дополнительный класс
58
- */
59
- containerClassName?: string;
60
- /**
61
- * Цвет фона
62
- */
63
- backgroundColor?: Extract<BackgroundColorType, 'primary' | 'secondary'>;
64
- /**
65
- * Дополнительный класс шапки
66
- */
67
- headerClassName?: string;
68
- /**
69
- * Дополнительный класс футера
70
- */
71
- footerClassName?: string;
72
- /**
73
- * Дополнительный класс для аддонов
74
- */
75
- addonClassName?: string;
76
- /**
77
- * Дополнительный класс для компонента крестика
78
- */
79
- closerClassName?: string;
80
- /**
81
- * Дополнительный класс для компонента стрелки назад
82
- */
83
- backerClassName?: string;
84
- /**
85
- * Дополнительный класс для компонента модального окна
86
- */
87
- modalClassName?: string;
88
- /**
89
- * Дополнительный класс для обертки модального окна
90
- */
91
- modalWrapperClassName?: string;
92
- /**
93
- * Дополнительный класс для маркера
94
- */
95
- swipeableMarkerClassName?: string;
96
- /**
97
- * Кастомный маркер
98
- */
99
- swipeableMarker?: ReactElement;
100
- /**
101
- * TransitionProps, прокидываются в компонент CSSTransitionProps.
102
- */
103
- transitionProps?: Partial<TransitionProps>;
104
- /**
105
- * Идентификатор для систем автоматизированного тестирования
106
- */
107
- dataTestId?: string;
108
- /**
109
- * z-index компонента
110
- */
111
- zIndex?: number;
112
- /**
113
- * Будет ли свайпаться шторка
114
- * @default true
115
- */
116
- swipeable?: boolean;
117
- /**
118
- * Будет ли свайпаться контент
119
- */
120
- swipeableContent?: boolean;
121
- /**
122
- * Порог свайпа
123
- */
124
- swipeThreshold?: number;
125
- /**
126
- * Слот слева
127
- */
128
- leftAddons?: ReactNode;
129
- /**
130
- * Слот справа
131
- */
132
- rightAddons?: ReactNode;
133
- /**
134
- * Слот снизу
135
- */
136
- bottomAddons?: ReactNode;
137
- /**
138
- * Наличие компонента крестика
139
- */
140
- hasCloser?: boolean;
141
- /**
142
- * Наличие компонента стрелки назад
143
- */
144
- hasBacker?: boolean;
145
- /**
146
- * Выравнивание заголовка
147
- */
148
- titleAlign?: BottomSheetTitleAlign;
149
- /**
150
- * Фиксирует шапку
151
- */
152
- stickyHeader?: boolean;
153
- /**
154
- * Фиксирует футер
155
- */
156
- stickyFooter?: boolean;
157
- /**
158
- * Высота шторки
159
- */
160
- initialHeight?: 'default' | 'full';
161
- /**
162
- * Будет ли виден оверлэй
163
- */
164
- hideOverlay?: boolean;
165
- /**
166
- * Будет ли видна шапка
167
- */
168
- hideHeader?: boolean;
169
- /**
170
- * Будет ли обрезан заголовок
171
- */
172
- trimTitle?: boolean;
173
- /**
174
- * Запретить закрытие шторки кликом на оверлэй
175
- */
176
- disableOverlayClick?: boolean;
177
- /**
178
- * Отключает блокировку скролла при открытии модального окна
179
- */
180
- disableBlockingScroll?: boolean;
181
- /**
182
- * Отключает ловушку фокуса
183
- */
184
- disableFocusLock?: boolean;
185
- /**
186
- * @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
187
- * Не анимировать шторку при изменении размера вьюпорта
188
- */
189
- ignoreScreenChange?: boolean;
190
- /**
191
- * Свойства для Бэкдропа
192
- */
193
- backdropProps?: BaseModalProps['backdropProps'];
194
- /**
195
- * Реф на контейнер, в котором происходит скролл
196
- */
197
- scrollableContainerRef?: RefObject<HTMLElement>;
198
- /**
199
- * Реф для управления компонентом.
200
- */
201
- bottomSheetInstanceRef?: RefObject<{
202
- scrollToArea: (idx: number) => void;
203
- }>;
204
- /**
205
- * Реф на контейнер, в котором находится шторка
206
- */
207
- sheetContainerRef?: RefObject<HTMLElement>;
208
- /**
209
- * Магнитные области видимой высоты шторки.
210
- * Можно использовать значения в пикселях - 10(число), либо в процентах - 10%(строка).
211
- * По-умолчанию -[0, window.innerHeight - '24px']
212
- * массив должен состоять минимум из 2 элементов
213
- */
214
- magneticAreas?: Array<number | string>;
215
- /**
216
- * Индекс точки из magneticAreas, к которому нужно примагнититься при первом открытии шторки.
217
- */
218
- initialActiveAreaIndex?: number;
219
- /**
220
- * Отключает скролл контентной области.
221
- */
222
- scrollLocked?: boolean;
223
- /**
224
- * Скрыть скроллбар внутри шторки
225
- */
226
- hideScrollbar?: boolean;
227
- /**
228
- * Верхний отступ шторки, если она открыта на максимальную высоту
229
- */
230
- headerOffset?: number;
231
- /**
232
- * Содержимое bottom-sheet всегда в DOM
233
- */
234
- keepMounted?: boolean;
235
- /**
236
- * Отключает автоматический перевод фокуса на bottom-sheet при открытии
237
- */
238
- disableAutoFocus?: boolean;
239
- /**
240
- * Отключает восстановление фокуса на предыдущем элементе после закрытия bottom-sheet
241
- */
242
- disableRestoreFocus?: boolean;
243
- /**
244
- * Отключает вызов `onClose` при нажатии Escape
245
- */
246
- disableEscapeKeyDown?: boolean;
247
- /**
248
- * Обработчик закрытия
249
- */
250
- onClose: () => void;
251
- /**
252
- * Обработчик нажатия на стрелку назад
253
- */
254
- onBack?: () => void;
255
- /**
256
- * Вызывается в начале анимации притягивания к одной из `magneticAreas`
257
- */
258
- onMagnetize?: (index: number) => void;
259
- /**
260
- * Вызывается после окончания анимации притягивания
261
- */
262
- onMagnetizeEnd?: (index: number) => void;
263
- /**
264
- * Вызывается при изменении положения шторки
265
- */
266
- onOffsetChange?: (offset: number, percent: number) => void;
267
- /**
268
- * Вызывается в начале свайпа
269
- */
270
- onSwipeStart?: (event: HandledEvents) => void;
271
- /**
272
- * Вызывается после окончания свайпа
273
- */
274
- onSwipeEnd?: (event: HandledEvents | null) => void;
275
- };
276
- export { BottomSheetTitleAlign, BottomSheetProps };