@alfalab/core-components-picker-button 11.1.7 → 11.1.9

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 (126) hide show
  1. package/{Component-f12ee135.d.ts → Component-0f4b9bed.d.ts} +1 -1
  2. package/{esm/Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
  3. package/Component-ebda875c.d.ts +9 -98
  4. package/Component.desktop-785df74d.d.ts +1 -1
  5. package/Component.desktop.d.ts +2 -2
  6. package/Component.desktop.js +1 -1
  7. package/Component.mobile-d7e9f69d.d.ts +1 -1
  8. package/{esm/Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
  9. package/Component.mobile.d.ts +1 -1
  10. package/{esm/Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  11. package/{Component.responsive-d7e9f69d.d.ts → Component.responsive-3109f463.d.ts} +1 -1
  12. package/Component.responsive.d.ts +1 -1
  13. package/{modern/Component-dd8ca091.d.ts → cssm/Component-0f4b9bed.d.ts} +1 -1
  14. package/cssm/{Component-72308007.d.ts → Component-10db897e.d.ts} +1 -1
  15. package/cssm/Component.desktop.d.ts +2 -2
  16. package/cssm/{Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
  17. package/cssm/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  18. package/cssm/Component.responsive-3109f463.d.ts +1 -1
  19. package/cssm/Component.responsive.d.ts +1 -1
  20. package/cssm/desktop-69921c40.d.ts +6 -0
  21. package/cssm/field/Component.d.ts +1 -1
  22. package/cssm/hook-8abfea97.d.ts +8 -8
  23. package/{modern/index-72308007.d.ts → cssm/index-10db897e.d.ts} +1 -5
  24. package/cssm/index-c76d6398.d.ts +1 -1
  25. package/cssm/index-f12ee135.d.ts +1 -1
  26. package/cssm/mobile-89f0cb07.d.ts +6 -0
  27. package/cssm/shared-4cd3936b.d.ts +5 -5
  28. package/{typings-dd8ca091.d.ts → cssm/typings-0f4b9bed.d.ts} +4 -0
  29. package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
  30. package/{modern/utils-dd8ca091.d.ts → cssm/utils-0f4b9bed.d.ts} +1 -1
  31. package/desktop-69921c40.d.ts +6 -0
  32. package/esm/{Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
  33. package/{modern/Component-72308007.d.ts → esm/Component-10db897e.d.ts} +1 -1
  34. package/esm/Component.desktop.d.ts +2 -2
  35. package/esm/Component.desktop.js +1 -1
  36. package/{Component.mobile-ade26e99.d.ts → esm/Component.mobile-f28cbba0.d.ts} +1 -1
  37. package/{modern/Component.modal.mobile-dd8ca091.d.ts → esm/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
  38. package/esm/Component.responsive-3109f463.d.ts +1 -1
  39. package/esm/Component.responsive.d.ts +1 -1
  40. package/esm/desktop-69921c40.d.ts +6 -0
  41. package/esm/field/Component.d.ts +1 -1
  42. package/esm/field/Component.js +1 -1
  43. package/esm/field/index.css +6 -6
  44. package/esm/hook-8abfea97.d.ts +8 -8
  45. package/esm/{index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  46. package/esm/index-c76d6398.d.ts +1 -1
  47. package/esm/index-f12ee135.d.ts +1 -1
  48. package/esm/index.css +5 -5
  49. package/esm/mobile-89f0cb07.d.ts +6 -0
  50. package/esm/option/Component.js +1 -1
  51. package/esm/option/index.css +4 -4
  52. package/esm/shared-4cd3936b.d.ts +5 -5
  53. package/{cssm/typings-dd8ca091.d.ts → esm/typings-0f4b9bed.d.ts} +4 -0
  54. package/{typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
  55. package/{cssm/utils-dd8ca091.d.ts → esm/utils-0f4b9bed.d.ts} +1 -1
  56. package/field/Component.d.ts +1 -1
  57. package/field/Component.js +1 -1
  58. package/field/index.css +6 -6
  59. package/hook-8abfea97.d.ts +10 -10
  60. package/{cssm/index-72308007.d.ts → index-10db897e.d.ts} +1 -5
  61. package/index-bdb4c6b9.d.ts +2 -180
  62. package/index-c44170fe.d.ts +1 -1
  63. package/index-c76d6398.d.ts +1 -1
  64. package/index-ebda875c.d.ts +53 -191
  65. package/index-f12ee135.d.ts +3 -324
  66. package/index.css +5 -5
  67. package/mobile-89f0cb07.d.ts +6 -0
  68. package/{cssm/Component-dd8ca091.d.ts → modern/Component-0f4b9bed.d.ts} +1 -1
  69. package/modern/Component-10db897e.d.ts +6 -0
  70. package/modern/Component-69921c40.d.ts +184 -0
  71. package/modern/Component.desktop.d.ts +2 -2
  72. package/modern/Component.desktop.js +1 -1
  73. package/modern/{Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
  74. package/modern/Component.modal.mobile-0f4b9bed.d.ts +60 -0
  75. package/modern/Component.responsive-3109f463.d.ts +1 -1
  76. package/modern/Component.responsive.d.ts +1 -1
  77. package/modern/component-10db897e.d.ts +44 -0
  78. package/modern/desktop-69921c40.d.ts +6 -0
  79. package/modern/field/Component.d.ts +1 -1
  80. package/modern/field/Component.js +1 -1
  81. package/modern/field/index.css +6 -6
  82. package/modern/hook-8abfea97.d.ts +8 -8
  83. package/{index-72308007.d.ts → modern/index-10db897e.d.ts} +2 -6
  84. package/modern/index-c76d6398.d.ts +1 -1
  85. package/modern/index-f12ee135.d.ts +1 -1
  86. package/modern/index.css +5 -5
  87. package/modern/mobile-89f0cb07.d.ts +6 -0
  88. package/modern/option/Component.js +1 -1
  89. package/modern/option/index.css +4 -4
  90. package/modern/shared-4cd3936b.d.ts +5 -5
  91. package/{esm/typings-dd8ca091.d.ts → modern/typings-0f4b9bed.d.ts} +4 -0
  92. package/modern/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
  93. package/{esm/utils-dd8ca091.d.ts → modern/utils-0f4b9bed.d.ts} +1 -1
  94. package/option/Component.js +1 -1
  95. package/option/index.css +4 -4
  96. package/package.json +3 -3
  97. package/shared-4cd3936b.d.ts +63 -5
  98. package/src/Component.desktop.tsx +3 -0
  99. package/types-67a2d8af.d.ts +276 -0
  100. package/{modern/typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
  101. package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
  102. package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
  103. package/utils-1574ad8b.d.ts +29 -0
  104. package/utils-49cc3c24.d.ts +8 -0
  105. package/Component-72308007.d.ts +0 -296
  106. package/Component-72dda473.d.ts +0 -53
  107. package/Component-aed0af6e.d.ts +0 -11
  108. package/Component-dd8ca091.d.ts +0 -5
  109. package/Component.mobile-96988a65.d.ts +0 -6
  110. package/Component.mobile-ebda875c.d.ts +0 -6
  111. package/cssm/Component.mobile-ebda875c.d.ts +0 -6
  112. package/cssm/desktop-63dec22f.d.ts +0 -6
  113. package/desktop-63dec22f.d.ts +0 -6
  114. package/esm/Component.mobile-ebda875c.d.ts +0 -6
  115. package/esm/desktop-63dec22f.d.ts +0 -6
  116. package/hook-ebda875c.d.ts +0 -48
  117. package/modern/Component.mobile-ebda875c.d.ts +0 -6
  118. package/modern/desktop-63dec22f.d.ts +0 -6
  119. /package/{cssm/Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
  120. /package/{cssm/component-72308007.d.ts → component-10db897e.d.ts} +0 -0
  121. /package/{esm/Component-63dec22f.d.ts → cssm/Component-69921c40.d.ts} +0 -0
  122. /package/{esm/component-72308007.d.ts → cssm/component-10db897e.d.ts} +0 -0
  123. /package/{modern/Component-63dec22f.d.ts → esm/Component-69921c40.d.ts} +0 -0
  124. /package/{modern/component-72308007.d.ts → esm/component-10db897e.d.ts} +0 -0
  125. /package/{mobile-96988a65.d.ts → mobile-d7e9f69d.d.ts} +0 -0
  126. /package/{useSkeleton-1b036d4b.d.ts → useSkeleton-ebda875c.d.ts} +0 -0
@@ -10,7 +10,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
10
10
 
11
11
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
12
12
 
13
- var styles = {"container":"picker-button__container_vso5b","icon":"picker-button__icon_vso5b","content":"picker-button__content_vso5b"};
13
+ var styles = {"container":"picker-button__container_1tf41","icon":"picker-button__icon_1tf41","content":"picker-button__content_1tf41"};
14
14
  require('./index.css')
15
15
 
16
16
  var Option = function (_a) {
package/option/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: qobkl */
1
+ /* hash: 938l2 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -15,13 +15,13 @@
15
15
  --gap-s: 12px;
16
16
  } :root {
17
17
  } :root {
18
- } .picker-button__container_vso5b {
18
+ } .picker-button__container_1tf41 {
19
19
  display: flex;
20
20
  align-items: center;
21
- } .picker-button__icon_vso5b {
21
+ } .picker-button__icon_1tf41 {
22
22
  display: flex;
23
23
  margin-right: var(--gap-s);
24
- } .picker-button__content_vso5b {
24
+ } .picker-button__content_1tf41 {
25
25
  overflow: hidden;
26
26
  flex: 1;
27
27
  text-overflow: ellipsis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-picker-button",
3
- "version": "11.1.7",
3
+ "version": "11.1.9",
4
4
  "description": "Picker button component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -39,8 +39,8 @@
39
39
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@alfalab/core-components-button": "^9.0.5",
43
- "@alfalab/core-components-select": "^15.2.0",
42
+ "@alfalab/core-components-button": "^9.0.6",
43
+ "@alfalab/core-components-select": "^15.2.2",
44
44
  "@alfalab/hooks": "^1.13.0",
45
45
  "@alfalab/icons-glyph": "^2.108.0",
46
46
  "classnames": "^2.3.1",
@@ -1,7 +1,65 @@
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
+ };
1
59
  export * from "./index-ebda875c";
2
- export * from "./Component-dd8ca091";
3
- export * from "./hook-ebda875c";
60
+ export * from "./Component-0f4b9bed";
61
+ export { useSelectWithLoading, useLazyLoading };
4
62
  export * from "./hook-8abfea97";
5
- export * from "./typings-dd8ca091";
6
- export * from "./utils-dd8ca091";
7
- export type { AdditionalMobileProps } from "./Component.mobile-ade26e99";
63
+ export * from "./typings-0f4b9bed";
64
+ export * from "./utils-0f4b9bed";
65
+ export type { AdditionalMobileProps } from "./Component.mobile-f28cbba0";
@@ -30,6 +30,9 @@ export type PickerButtonDesktopProps = Omit<
30
30
  | 'hint'
31
31
  | 'allowUnselect'
32
32
  | 'options'
33
+ | 'searchProps'
34
+ | 'showSearch'
35
+ | 'Search'
33
36
  > &
34
37
  Pick<ButtonProps, 'view' | 'loading' | 'leftAddons' | 'rightAddons'> & {
35
38
  options: Array<
@@ -0,0 +1,276 @@
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 };
@@ -459,6 +459,10 @@ type OptionsListProps = {
459
459
  * Обработчик отмены изменений
460
460
  */
461
461
  onClear?: () => void;
462
+ /**
463
+ * Указать индекс пункта для hover состояния
464
+ */
465
+ setHighlightedIndex?: (index: number) => void;
462
466
  };
463
467
  type OptgroupProps = {
464
468
  /**
@@ -69,6 +69,8 @@ type ComponentProps = {
69
69
  * Дочерние элементы.
70
70
  */
71
71
  children?: ReactNode;
72
+ };
73
+ type PrivateButtonProps = {
72
74
  /**
73
75
  * Основные стили компонента.
74
76
  */
@@ -80,16 +82,12 @@ type ComponentProps = {
80
82
  */
81
83
  colorStylesMap: StyleColors;
82
84
  };
83
- type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
- type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
- type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
- type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
- type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
- type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
85
+ type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
86
+ type ButtonProps = CommonButtonProps & {
89
87
  /**
90
88
  * Контрольная точка, с нее начинается desktop версия
91
89
  * @default 1024
92
90
  */
93
91
  breakpoint?: number;
94
92
  };
95
- export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
93
+ export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-dd8ca091";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
3
3
  declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  declare const joinOptions: ({ selected, selectedMultiple, }: {
@@ -0,0 +1,29 @@
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 };
@@ -0,0 +1,8 @@
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 };