@alfalab/core-components-input-autocomplete 10.2.3 → 11.0.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 (262) hide show
  1. package/Component.desktop.d.ts +3 -70
  2. package/Component.desktop.js +2 -1
  3. package/Component.mobile.d.ts +5 -95
  4. package/Component.mobile.js +42 -45
  5. package/Component.modal.mobile.d.ts +5 -88
  6. package/Component.modal.mobile.js +9 -62
  7. package/Component.responsive.d.ts +3 -46
  8. package/Component.responsive.js +9 -12
  9. package/autocomplete-field/Component.d.ts +3 -3
  10. package/autocomplete-field/Component.js +1 -1
  11. package/autocomplete-field/index.css +2 -2
  12. package/autocomplete-mobile-field/Component.d.ts +2 -2
  13. package/autocomplete-mobile-field/Component.js +6 -3
  14. package/autocomplete-mobile-field/index.css +10 -10
  15. package/cssm/Component.desktop.d.ts +3 -70
  16. package/cssm/Component.desktop.js +2 -1
  17. package/cssm/Component.mobile.d.ts +5 -95
  18. package/cssm/Component.mobile.js +39 -44
  19. package/cssm/Component.modal.mobile.d.ts +5 -88
  20. package/cssm/Component.modal.mobile.js +10 -63
  21. package/cssm/Component.responsive.d.ts +3 -46
  22. package/cssm/Component.responsive.js +9 -11
  23. package/cssm/autocomplete-field/Component.d.ts +3 -3
  24. package/cssm/autocomplete-mobile-field/Component.d.ts +2 -2
  25. package/cssm/autocomplete-mobile-field/Component.js +5 -2
  26. package/cssm/autocomplete-mobile-field/index.module.css +2 -2
  27. package/cssm/desktop/index.d.ts +2 -0
  28. package/cssm/{desktop.js → desktop/index.js} +4 -3
  29. package/cssm/index.d.ts +2 -2
  30. package/cssm/index.js +5 -4
  31. package/cssm/mobile/index.d.ts +3 -0
  32. package/cssm/{mobile.js → mobile/index.js} +7 -7
  33. package/cssm/mobile.module.css +3 -10
  34. package/cssm/types.d.ts +58 -0
  35. package/cssm/types.js +2 -0
  36. package/cssm/utils.d.ts +2 -0
  37. package/cssm/utils.js +9 -0
  38. package/desktop/index.d.ts +2 -0
  39. package/{desktop.js → desktop/index.js} +3 -2
  40. package/desktop/package.json +3 -0
  41. package/esm/Component.desktop.d.ts +3 -70
  42. package/esm/Component.desktop.js +2 -1
  43. package/esm/Component.mobile.d.ts +5 -95
  44. package/esm/Component.mobile.js +43 -46
  45. package/esm/Component.modal.mobile.d.ts +5 -88
  46. package/esm/Component.modal.mobile.js +11 -61
  47. package/esm/Component.responsive.d.ts +3 -46
  48. package/esm/Component.responsive.js +9 -12
  49. package/esm/autocomplete-field/Component.d.ts +3 -3
  50. package/esm/autocomplete-field/Component.js +1 -1
  51. package/esm/autocomplete-field/index.css +2 -2
  52. package/esm/autocomplete-mobile-field/Component.d.ts +2 -2
  53. package/esm/autocomplete-mobile-field/Component.js +6 -3
  54. package/esm/autocomplete-mobile-field/index.css +10 -10
  55. package/esm/desktop/index.d.ts +2 -0
  56. package/esm/{desktop.js → desktop/index.js} +3 -2
  57. package/esm/index.d.ts +2 -2
  58. package/esm/index.js +5 -5
  59. package/esm/mobile/index.d.ts +3 -0
  60. package/esm/mobile/index.js +14 -0
  61. package/esm/mobile.css +4 -11
  62. package/esm/types.d.ts +58 -0
  63. package/esm/types.js +1 -0
  64. package/esm/utils.d.ts +2 -0
  65. package/esm/utils.js +5 -0
  66. package/index.d.ts +2 -2
  67. package/index.js +5 -5
  68. package/mobile/index.d.ts +3 -0
  69. package/{mobile.js → mobile/index.js} +5 -6
  70. package/mobile/package.json +3 -0
  71. package/mobile.css +4 -11
  72. package/modern/Component.desktop.d.ts +3 -70
  73. package/modern/Component.desktop.js +2 -1
  74. package/modern/Component.mobile.d.ts +5 -95
  75. package/modern/Component.mobile.js +54 -56
  76. package/modern/Component.modal.mobile.d.ts +5 -88
  77. package/modern/Component.modal.mobile.js +10 -68
  78. package/modern/Component.responsive.d.ts +3 -46
  79. package/modern/Component.responsive.js +8 -11
  80. package/modern/autocomplete-field/Component.d.ts +3 -3
  81. package/modern/autocomplete-field/Component.js +1 -1
  82. package/modern/autocomplete-field/index.css +2 -2
  83. package/modern/autocomplete-mobile-field/Component.d.ts +2 -2
  84. package/modern/autocomplete-mobile-field/Component.js +5 -2
  85. package/modern/autocomplete-mobile-field/index.css +10 -10
  86. package/modern/desktop/index.d.ts +2 -0
  87. package/modern/{desktop.js → desktop/index.js} +3 -2
  88. package/modern/index.d.ts +2 -2
  89. package/modern/index.js +5 -5
  90. package/modern/mobile/index.d.ts +3 -0
  91. package/modern/mobile/index.js +13 -0
  92. package/modern/mobile.css +4 -11
  93. package/modern/types.d.ts +58 -0
  94. package/modern/types.js +1 -0
  95. package/modern/utils.d.ts +2 -0
  96. package/modern/utils.js +5 -0
  97. package/package.json +7 -6
  98. package/src/Component.desktop.tsx +6 -44
  99. package/src/Component.mobile.tsx +90 -188
  100. package/src/Component.modal.mobile.tsx +5 -223
  101. package/src/Component.responsive.tsx +10 -30
  102. package/src/autocomplete-field/Component.tsx +2 -2
  103. package/src/autocomplete-mobile-field/Component.tsx +5 -1
  104. package/src/desktop/index.ts +2 -0
  105. package/src/desktop/package.json +3 -0
  106. package/src/index.ts +2 -4
  107. package/src/mobile/index.ts +4 -0
  108. package/src/mobile/package.json +3 -0
  109. package/src/mobile.module.css +2 -11
  110. package/src/types.ts +77 -0
  111. package/src/utils.ts +3 -0
  112. package/types.d.ts +58 -0
  113. package/types.js +2 -0
  114. package/utils.d.ts +2 -0
  115. package/utils.js +9 -0
  116. package/Component-0f4b9bed.d.ts +0 -72
  117. package/Component-69921c40.d.ts +0 -184
  118. package/Component-89f0cb07.d.ts +0 -38
  119. package/Component-bdb4c6b9.d.ts +0 -12
  120. package/Component-c76d6398.d.ts +0 -5
  121. package/Component-ebda875c.d.ts +0 -12
  122. package/Component.desktop-ebda875c.d.ts +0 -6
  123. package/Component.mobile-f1f15074.d.ts +0 -34
  124. package/Component.mobile-f28cbba0.d.ts +0 -41
  125. package/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  126. package/Context-bdb4c6b9.d.ts +0 -4
  127. package/ResponsiveContext-baf4875b.d.ts +0 -5
  128. package/consts-f777ba1a.d.ts +0 -2
  129. package/cssm/Component-0f4b9bed.d.ts +0 -72
  130. package/cssm/Component-69921c40.d.ts +0 -184
  131. package/cssm/Component-89f0cb07.d.ts +0 -38
  132. package/cssm/Component-bdb4c6b9.d.ts +0 -12
  133. package/cssm/Component-c76d6398.d.ts +0 -5
  134. package/cssm/Component-ebda875c.d.ts +0 -12
  135. package/cssm/Component.desktop-ebda875c.d.ts +0 -6
  136. package/cssm/Component.mobile-f1f15074.d.ts +0 -34
  137. package/cssm/Component.mobile-f28cbba0.d.ts +0 -41
  138. package/cssm/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  139. package/cssm/Context-bdb4c6b9.d.ts +0 -4
  140. package/cssm/ResponsiveContext-baf4875b.d.ts +0 -5
  141. package/cssm/consts-f777ba1a.d.ts +0 -2
  142. package/cssm/desktop-69921c40.d.ts +0 -6
  143. package/cssm/desktop.d.ts +0 -2
  144. package/cssm/hook-8abfea97.d.ts +0 -90
  145. package/cssm/index-136acbb1.d.ts +0 -28
  146. package/cssm/index-72dda473.d.ts +0 -12
  147. package/cssm/index-bdb4c6b9.d.ts +0 -2
  148. package/cssm/index-c76d6398.d.ts +0 -185
  149. package/cssm/index-ebda875c.d.ts +0 -146
  150. package/cssm/index-f12ee135.d.ts +0 -52
  151. package/cssm/mobile-89f0cb07.d.ts +0 -6
  152. package/cssm/mobile-96988a65.d.ts +0 -6
  153. package/cssm/mobile-f28cbba0.d.ts +0 -5
  154. package/cssm/mobile.d.ts +0 -3
  155. package/cssm/shared-4cd3936b.d.ts +0 -65
  156. package/cssm/types-1b036d4b.d.ts +0 -13
  157. package/cssm/types-72dda473.d.ts +0 -276
  158. package/cssm/typings-0f4b9bed.d.ts +0 -576
  159. package/cssm/typings-89f0cb07.d.ts +0 -93
  160. package/cssm/typings-bdb4c6b9.d.ts +0 -52
  161. package/cssm/useSkeleton-ebda875c.d.ts +0 -12
  162. package/cssm/utils-0f4b9bed.d.ts +0 -41
  163. package/cssm/utils-1574ad8b.d.ts +0 -29
  164. package/desktop-69921c40.d.ts +0 -6
  165. package/desktop.d.ts +0 -2
  166. package/esm/Component-0f4b9bed.d.ts +0 -72
  167. package/esm/Component-69921c40.d.ts +0 -184
  168. package/esm/Component-89f0cb07.d.ts +0 -38
  169. package/esm/Component-bdb4c6b9.d.ts +0 -12
  170. package/esm/Component-c76d6398.d.ts +0 -5
  171. package/esm/Component-ebda875c.d.ts +0 -12
  172. package/esm/Component.desktop-ebda875c.d.ts +0 -6
  173. package/esm/Component.mobile-f1f15074.d.ts +0 -34
  174. package/esm/Component.mobile-f28cbba0.d.ts +0 -41
  175. package/esm/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  176. package/esm/Context-bdb4c6b9.d.ts +0 -4
  177. package/esm/ResponsiveContext-baf4875b.d.ts +0 -5
  178. package/esm/consts-f777ba1a.d.ts +0 -2
  179. package/esm/desktop-69921c40.d.ts +0 -6
  180. package/esm/desktop.d.ts +0 -2
  181. package/esm/hook-8abfea97.d.ts +0 -90
  182. package/esm/index-136acbb1.d.ts +0 -28
  183. package/esm/index-72dda473.d.ts +0 -12
  184. package/esm/index-bdb4c6b9.d.ts +0 -2
  185. package/esm/index-c76d6398.d.ts +0 -185
  186. package/esm/index-ebda875c.d.ts +0 -146
  187. package/esm/index-f12ee135.d.ts +0 -52
  188. package/esm/mobile-89f0cb07.d.ts +0 -6
  189. package/esm/mobile-96988a65.d.ts +0 -6
  190. package/esm/mobile-f28cbba0.d.ts +0 -5
  191. package/esm/mobile.d.ts +0 -3
  192. package/esm/mobile.js +0 -15
  193. package/esm/mobile.module-c5b1b036.js +0 -4
  194. package/esm/shared-4cd3936b.d.ts +0 -65
  195. package/esm/types-1b036d4b.d.ts +0 -13
  196. package/esm/types-72dda473.d.ts +0 -276
  197. package/esm/typings-0f4b9bed.d.ts +0 -576
  198. package/esm/typings-89f0cb07.d.ts +0 -93
  199. package/esm/typings-bdb4c6b9.d.ts +0 -52
  200. package/esm/useSkeleton-ebda875c.d.ts +0 -12
  201. package/esm/utils-0f4b9bed.d.ts +0 -41
  202. package/esm/utils-1574ad8b.d.ts +0 -29
  203. package/hook-8abfea97.d.ts +0 -90
  204. package/index-136acbb1.d.ts +0 -28
  205. package/index-72dda473.d.ts +0 -12
  206. package/index-bdb4c6b9.d.ts +0 -2
  207. package/index-c76d6398.d.ts +0 -185
  208. package/index-ebda875c.d.ts +0 -146
  209. package/index-f12ee135.d.ts +0 -52
  210. package/mobile-89f0cb07.d.ts +0 -6
  211. package/mobile-96988a65.d.ts +0 -6
  212. package/mobile-f28cbba0.d.ts +0 -5
  213. package/mobile.d.ts +0 -3
  214. package/mobile.module-c08975ff.js +0 -6
  215. package/modern/Component-0f4b9bed.d.ts +0 -72
  216. package/modern/Component-69921c40.d.ts +0 -184
  217. package/modern/Component-89f0cb07.d.ts +0 -38
  218. package/modern/Component-bdb4c6b9.d.ts +0 -12
  219. package/modern/Component-c76d6398.d.ts +0 -5
  220. package/modern/Component-ebda875c.d.ts +0 -12
  221. package/modern/Component.desktop-ebda875c.d.ts +0 -6
  222. package/modern/Component.mobile-f1f15074.d.ts +0 -34
  223. package/modern/Component.mobile-f28cbba0.d.ts +0 -41
  224. package/modern/Component.modal.mobile-0f4b9bed.d.ts +0 -60
  225. package/modern/Context-bdb4c6b9.d.ts +0 -4
  226. package/modern/ResponsiveContext-baf4875b.d.ts +0 -5
  227. package/modern/consts-f777ba1a.d.ts +0 -2
  228. package/modern/desktop-69921c40.d.ts +0 -6
  229. package/modern/desktop.d.ts +0 -2
  230. package/modern/hook-8abfea97.d.ts +0 -90
  231. package/modern/index-136acbb1.d.ts +0 -28
  232. package/modern/index-72dda473.d.ts +0 -12
  233. package/modern/index-bdb4c6b9.d.ts +0 -2
  234. package/modern/index-c76d6398.d.ts +0 -185
  235. package/modern/index-ebda875c.d.ts +0 -146
  236. package/modern/index-f12ee135.d.ts +0 -52
  237. package/modern/mobile-89f0cb07.d.ts +0 -6
  238. package/modern/mobile-96988a65.d.ts +0 -6
  239. package/modern/mobile-f28cbba0.d.ts +0 -5
  240. package/modern/mobile.d.ts +0 -3
  241. package/modern/mobile.js +0 -14
  242. package/modern/mobile.module-1bc0502b.js +0 -4
  243. package/modern/shared-4cd3936b.d.ts +0 -65
  244. package/modern/types-1b036d4b.d.ts +0 -13
  245. package/modern/types-72dda473.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-0f4b9bed.d.ts +0 -41
  251. package/modern/utils-1574ad8b.d.ts +0 -29
  252. package/shared-4cd3936b.d.ts +0 -65
  253. package/src/desktop.ts +0 -1
  254. package/src/mobile.ts +0 -5
  255. package/types-1b036d4b.d.ts +0 -13
  256. package/types-72dda473.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-0f4b9bed.d.ts +0 -41
  262. package/utils-1574ad8b.d.ts +0 -29
@@ -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,41 +0,0 @@
1
- import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
3
- declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
- declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
- declare const joinOptions: ({ selected, selectedMultiple, }: {
6
- selected?: OptionShape | undefined;
7
- selectedMultiple?: OptionShape[] | undefined;
8
- }) => ReactNode[] | null;
9
- declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape) => boolean): {
10
- filteredOptions: (OptionShape | GroupShape)[];
11
- flatOptions: OptionShape[];
12
- selectedOptions: OptionShape[];
13
- };
14
- type useVisibleOptionsArgs = {
15
- /**
16
- * Количество видимых пунктов
17
- */
18
- visibleOptions: number;
19
- /**
20
- * Реф на контейнер с пунтами меню
21
- */
22
- listRef: RefObject<HTMLElement>;
23
- /**
24
- * Реф на контейнер, которому нужно установить высоту
25
- */
26
- styleTargetRef?: RefObject<HTMLElement>;
27
- /**
28
- * Флаг открытия меню
29
- */
30
- open?: boolean;
31
- /**
32
- * Позволяет вызвать пересчет высоты
33
- */
34
- invalidate?: unknown;
35
- };
36
- declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
37
- declare function defaultFilterFn(optionText: string, search: string): boolean;
38
- declare function defaultAccessor(option: OptionShape): string;
39
- declare function usePrevious<T>(value: T): T | undefined;
40
- declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
41
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf };
@@ -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,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/src/desktop.ts DELETED
@@ -1 +0,0 @@
1
- export { InputAutocompleteDesktop, InputAutocompleteDesktopProps } from './Component.desktop';
package/src/mobile.ts DELETED
@@ -1,5 +0,0 @@
1
- export { InputAutocompleteMobile, InputAutocompleteMobileProps } from './Component.mobile';
2
- export {
3
- InputAutocompleteModalMobile,
4
- InputAutocompleteModalMobileProps,
5
- } from './Component.modal.mobile';
@@ -1,13 +0,0 @@
1
- type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
2
- type WidthUnit = number | string;
3
- type TextSkeletonProps = {
4
- /**
5
- * Кол-во строк текста
6
- */
7
- rows?: number;
8
- /**
9
- * Ширина строки
10
- */
11
- width?: WidthUnit | WidthUnit[];
12
- };
13
- export { TextElementType, TextSkeletonProps };
@@ -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 };