@alfalab/core-components-input-autocomplete 7.2.7 → 7.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 (96) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/Component-7ca84eff.d.ts +227 -0
  3. package/dist/Component.d.ts +3 -3
  4. package/dist/Component.js +6 -5
  5. package/dist/Component.mobile.d.ts +96 -0
  6. package/dist/Component.mobile.js +82 -0
  7. package/dist/autocomplete-field/Component.d.ts +6 -0
  8. package/dist/autocomplete-field/Component.js +39 -6
  9. package/dist/autocomplete-field/index.css +2 -2
  10. package/dist/autocomplete-field/index.d.ts +1 -1
  11. package/dist/autocomplete-field/index.js +4 -3
  12. package/dist/autocomplete-mobile-field/Component.d.ts +7 -0
  13. package/dist/autocomplete-mobile-field/Component.js +37 -0
  14. package/dist/autocomplete-mobile-field/index.css +49 -0
  15. package/dist/autocomplete-mobile-field/index.d.ts +1 -0
  16. package/dist/autocomplete-mobile-field/index.js +14 -0
  17. package/dist/cssm/Component-7ca84eff.d.ts +227 -0
  18. package/dist/cssm/Component.d.ts +3 -3
  19. package/dist/cssm/Component.js +6 -5
  20. package/dist/cssm/Component.mobile.d.ts +96 -0
  21. package/dist/cssm/Component.mobile.js +82 -0
  22. package/dist/cssm/autocomplete-field/Component.d.ts +6 -0
  23. package/dist/cssm/autocomplete-field/Component.js +38 -7
  24. package/dist/cssm/autocomplete-field/index.d.ts +1 -1
  25. package/dist/cssm/autocomplete-field/index.js +4 -3
  26. package/dist/cssm/autocomplete-mobile-field/Component.d.ts +7 -0
  27. package/dist/cssm/autocomplete-mobile-field/Component.js +36 -0
  28. package/dist/cssm/autocomplete-mobile-field/index.d.ts +1 -0
  29. package/dist/cssm/autocomplete-mobile-field/index.js +15 -0
  30. package/dist/cssm/autocomplete-mobile-field/index.module.css +48 -0
  31. package/dist/cssm/index-7ca84eff.d.ts +178 -0
  32. package/dist/cssm/index-bdb4c6b9.d.ts +193 -0
  33. package/dist/cssm/index-ebda875c.d.ts +36 -0
  34. package/dist/cssm/index.js +4 -3
  35. package/dist/cssm/mobile.d.ts +1 -0
  36. package/dist/cssm/mobile.js +22 -0
  37. package/dist/cssm/mobile.module.css +18 -0
  38. package/dist/{Component-7d703cac.d.ts → cssm/tslib.es6-ce870b46.d.ts} +1 -6
  39. package/dist/cssm/tslib.es6-ce870b46.js +42 -0
  40. package/dist/esm/Component-7ca84eff.d.ts +227 -0
  41. package/dist/esm/Component.d.ts +3 -3
  42. package/dist/esm/Component.js +4 -3
  43. package/dist/esm/Component.mobile.d.ts +96 -0
  44. package/dist/esm/Component.mobile.js +71 -0
  45. package/dist/esm/autocomplete-field/Component.d.ts +6 -0
  46. package/dist/esm/autocomplete-field/Component.js +36 -5
  47. package/dist/esm/autocomplete-field/index.css +2 -2
  48. package/dist/esm/autocomplete-field/index.d.ts +1 -1
  49. package/dist/esm/autocomplete-field/index.js +4 -3
  50. package/dist/esm/autocomplete-mobile-field/Component.d.ts +7 -0
  51. package/dist/esm/autocomplete-mobile-field/Component.js +28 -0
  52. package/dist/esm/autocomplete-mobile-field/index.css +49 -0
  53. package/dist/esm/autocomplete-mobile-field/index.d.ts +1 -0
  54. package/dist/esm/autocomplete-mobile-field/index.js +6 -0
  55. package/dist/esm/index-7ca84eff.d.ts +178 -0
  56. package/dist/esm/index-bdb4c6b9.d.ts +193 -0
  57. package/dist/esm/index-ebda875c.d.ts +36 -0
  58. package/dist/esm/index.js +4 -3
  59. package/dist/esm/mobile.css +19 -0
  60. package/dist/esm/mobile.d.ts +1 -0
  61. package/dist/esm/mobile.js +12 -0
  62. package/dist/esm/{Component-077ac41e.d.ts → tslib.es6-675ade68.d.ts} +1 -6
  63. package/dist/esm/tslib.es6-675ade68.js +40 -0
  64. package/dist/index-7ca84eff.d.ts +178 -0
  65. package/dist/index-bdb4c6b9.d.ts +193 -0
  66. package/dist/index-ebda875c.d.ts +36 -0
  67. package/dist/index.js +4 -3
  68. package/dist/mobile.css +19 -0
  69. package/dist/mobile.d.ts +1 -0
  70. package/dist/mobile.js +20 -0
  71. package/dist/modern/Component-7ca84eff.d.ts +227 -0
  72. package/dist/modern/Component.d.ts +3 -3
  73. package/dist/modern/Component.js +2 -2
  74. package/dist/modern/Component.mobile.d.ts +96 -0
  75. package/dist/modern/Component.mobile.js +80 -0
  76. package/dist/modern/autocomplete-field/Component.js +3 -3
  77. package/dist/modern/autocomplete-field/index.css +2 -2
  78. package/dist/modern/autocomplete-field/index.js +2 -2
  79. package/dist/modern/autocomplete-mobile-field/Component.d.ts +7 -0
  80. package/dist/modern/autocomplete-mobile-field/Component.js +25 -0
  81. package/dist/modern/autocomplete-mobile-field/index.css +49 -0
  82. package/dist/modern/autocomplete-mobile-field/index.d.ts +1 -0
  83. package/dist/modern/autocomplete-mobile-field/index.js +5 -0
  84. package/dist/modern/index-7ca84eff.d.ts +178 -0
  85. package/dist/modern/index-bdb4c6b9.d.ts +193 -0
  86. package/dist/modern/index-ebda875c.d.ts +36 -0
  87. package/dist/modern/index.js +2 -2
  88. package/dist/modern/mobile.css +19 -0
  89. package/dist/modern/mobile.d.ts +1 -0
  90. package/dist/modern/mobile.js +11 -0
  91. package/dist/{cssm/Component-a04a9434.d.ts → tslib.es6-2cf95ef9.d.ts} +1 -6
  92. package/dist/tslib.es6-2cf95ef9.js +42 -0
  93. package/package.json +12 -4
  94. package/dist/Component-7d703cac.js +0 -83
  95. package/dist/cssm/Component-a04a9434.js +0 -82
  96. package/dist/esm/Component-077ac41e.js +0 -74
@@ -1,6 +1,3 @@
1
- /// <reference types="react" />
2
- import { FieldProps } from "@alfalab/core-components-select";
3
- import { InputAutocompleteProps } from "./Component";
4
1
  declare function __extends(d: any, b: any): void;
5
2
  declare function __rest(s: any, e: any): {};
6
3
  declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
@@ -32,6 +29,4 @@ declare function __classPrivateFieldGet(receiver: any, privateMap: any): any;
32
29
  declare function __classPrivateFieldSet(receiver: any, privateMap: any, value: any): any;
33
30
  declare function __assign(...args: any[]): any;
34
31
  declare function __createBinding(o: any, m: any, k: any, k2: any): void;
35
- type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
36
- declare const AutocompleteField: ({ label, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
37
- export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, AutocompleteFieldProps, AutocompleteField };
32
+ export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding };
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ /*! *****************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
+
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */
17
+ exports.__assign = function () {
18
+ exports.__assign = Object.assign || function __assign(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s)
22
+ if (Object.prototype.hasOwnProperty.call(s, p))
23
+ t[p] = s[p];
24
+ }
25
+ return t;
26
+ };
27
+ return exports.__assign.apply(this, arguments);
28
+ };
29
+ function __rest(s, e) {
30
+ var t = {};
31
+ for (var p in s)
32
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
33
+ t[p] = s[p];
34
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
35
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
36
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
37
+ t[p[i]] = s[p[i]];
38
+ }
39
+ return t;
40
+ }
41
+
42
+ exports.__rest = __rest;
@@ -0,0 +1,227 @@
1
+ import React from "react";
2
+ import { ButtonHTMLAttributes, ElementType, AnchorHTMLAttributes, FC, HTMLAttributes, ReactNode } from "react";
3
+ import { ButtonProps } from "@alfalab/core-components-button";
4
+ import { BottomSheetTitleAlign } from "./index-7ca84eff";
5
+ type IconButtonProps = {
6
+ /**
7
+ * Компонент иконки
8
+ */
9
+ icon: ElementType<{
10
+ className?: string;
11
+ }>;
12
+ /**
13
+ * Тип кнопки
14
+ */
15
+ view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
16
+ /**
17
+ * Размер компонента
18
+ */
19
+ size?: "xxs" | "xs" | "s";
20
+ /**
21
+ * Дополнительный класс
22
+ */
23
+ className?: string;
24
+ /**
25
+ * Идентификатор для систем автоматизированного тестирования
26
+ */
27
+ dataTestId?: string;
28
+ /**
29
+ * Набор цветов для компонента
30
+ */
31
+ colors?: "default" | "inverted";
32
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
33
+ type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
34
+ /**
35
+ * Дополнительный класс
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Размер кнопки
40
+ */
41
+ size?: IconButtonProps["size"];
42
+ /**
43
+ * Иконка
44
+ */
45
+ icon?: ElementType;
46
+ };
47
+ declare const Closer: React.FC<CloserProps>;
48
+ declare const colors: readonly ["tertiary", "disabled", "accent", "primary", "attention", "positive", "secondary", "tertiary-inverted", "primary-inverted", "secondary-inverted", "link", "negative"];
49
+ type Color = typeof colors[number];
50
+ type NativeProps = HTMLAttributes<HTMLHeadingElement>;
51
+ type TitleProps = Omit<NativeProps, "color"> & {
52
+ /**
53
+ * HTML тег
54
+ */
55
+ tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
56
+ /**
57
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
58
+ */
59
+ view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
60
+ /**
61
+ * Цвет текста
62
+ */
63
+ color?: Color;
64
+ /**
65
+ * Толщина шрифта
66
+ */
67
+ weight?: "regular" | "medium" | "bold";
68
+ /**
69
+ * Шрифт текста
70
+ */
71
+ font?: "styrene" | "system";
72
+ /**
73
+ * Добавляет отступы
74
+ */
75
+ defaultMargins?: boolean;
76
+ /**
77
+ * Css-класс для стилизации (native prop)
78
+ */
79
+ className?: string;
80
+ /**
81
+ * Id компонента для тестов
82
+ */
83
+ dataTestId?: string;
84
+ /**
85
+ * Контент (native prop)
86
+ */
87
+ children?: React.ReactNode;
88
+ };
89
+ type NativeProps$0 = HTMLAttributes<HTMLSpanElement>;
90
+ type TextProps = Omit<NativeProps$0, "color"> & {
91
+ /**
92
+ * [Вариант начертания](https://alfa-laboratory.github.io/core-components/master/?path=/docs/гайдлайны-типографика--page)
93
+ */
94
+ view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
95
+ /**
96
+ * Цвет текста
97
+ */
98
+ color?: Color;
99
+ /**
100
+ * Толщина шрифта
101
+ */
102
+ weight?: "regular" | "medium" | "bold";
103
+ /**
104
+ * Делает цифры моноширинными
105
+ */
106
+ monospaceNumbers?: boolean;
107
+ /**
108
+ * HTML тег
109
+ */
110
+ tag?: "p" | "span" | "div";
111
+ /**
112
+ * Css-класс для стилизации (native prop)
113
+ */
114
+ className?: string;
115
+ /**
116
+ * Id компонента для тестов
117
+ */
118
+ dataTestId?: string;
119
+ /**
120
+ * Контент (native prop)
121
+ */
122
+ children?: React.ReactNode;
123
+ };
124
+ type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
125
+ declare const Typography: {
126
+ Title: FC<TitleProps>;
127
+ Text: FC<TextProps>;
128
+ TitleResponsive: FC<TitleProps>;
129
+ TitleMobile: FC<TitleMobileProps>;
130
+ };
131
+ declare const typographyPresets: {
132
+ mobile: {
133
+ list: {
134
+ text: {
135
+ primary: {
136
+ tag: string;
137
+ view: string;
138
+ };
139
+ secondary: {
140
+ tag: string;
141
+ color: string;
142
+ view: string;
143
+ };
144
+ };
145
+ };
146
+ };
147
+ };
148
+ type BackerProps = ButtonHTMLAttributes<HTMLButtonElement> & {
149
+ /**
150
+ * Дополнительный класс
151
+ */
152
+ className?: string;
153
+ /**
154
+ * Размер кнопки
155
+ */
156
+ size?: IconButtonProps["size"];
157
+ /**
158
+ * Иконка
159
+ */
160
+ icon?: ElementType;
161
+ /**
162
+ * Обработчик нажатия
163
+ */
164
+ onClick?: () => void;
165
+ };
166
+ declare const Backer: React.FC<BackerProps>;
167
+ declare const TitleResponsive: FC<TitleProps>;
168
+ type HeaderProps = {
169
+ /**
170
+ * Заголовок
171
+ */
172
+ title?: ReactNode;
173
+ /**
174
+ * Дополнительный класс
175
+ */
176
+ headerClassName?: string;
177
+ /**
178
+ * Дополнительный класс для аддонов
179
+ */
180
+ addonClassName?: string;
181
+ /**
182
+ * Дополнительный класс для компонента крестика
183
+ */
184
+ closerClassName?: string;
185
+ /**
186
+ * Дополнительный класс для компонента стрелки назад
187
+ */
188
+ backerClassName?: string;
189
+ /**
190
+ * Слот слева
191
+ */
192
+ leftAddons?: ReactNode;
193
+ /**
194
+ * Слот справа
195
+ */
196
+ rightAddons?: ReactNode;
197
+ /**
198
+ * Слот снизу
199
+ */
200
+ bottomAddons?: ReactNode;
201
+ /**
202
+ * Наличие компонента крестика
203
+ */
204
+ hasCloser?: boolean;
205
+ /**
206
+ * Наличие компонента стрелки назад
207
+ */
208
+ hasBacker?: boolean;
209
+ /**
210
+ * Выравнивание заголовка
211
+ */
212
+ titleAlign?: BottomSheetTitleAlign;
213
+ /**
214
+ * Будет ли обрезан заголовок
215
+ */
216
+ trimTitle?: boolean;
217
+ /**
218
+ * Фиксирует шапку
219
+ */
220
+ sticky?: boolean;
221
+ /**
222
+ * Обработчик нажатия на стрелку назад
223
+ */
224
+ onBack?: () => void;
225
+ };
226
+ declare const Header: FC<HeaderProps>;
227
+ export { CloserProps, Closer, Typography, typographyPresets, TitleProps, TextProps, BackerProps, Backer, TitleResponsive, HeaderProps, Header };
@@ -33,11 +33,11 @@ type InputAutocompleteProps = Omit<BaseSelectProps, 'Field' | 'nativeSelect'> &
33
33
  */
34
34
  updatePopover?: BaseSelectProps['updatePopover'];
35
35
  };
36
- declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "className" | "dataTestId" | "label" | "size" | "block" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "disabled" | "name" | "fieldClassName" | "error" | "hint" | "multiple" | "preventFlip" | "popperClassName" | "open" | "options" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
36
+ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
37
37
  /**
38
38
  * Компонент ввода значения
39
39
  */
40
- Input?: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
40
+ Input?: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "disabled" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "pattern" | "list" | "step" | "height" | "name" | "width" | "multiple" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src"> & {
41
41
  value?: string | undefined;
42
42
  defaultValue?: string | undefined;
43
43
  block?: boolean | undefined;
@@ -72,7 +72,7 @@ declare const InputAutocomplete: React.ForwardRefExoticComponent<Pick<BaseSelect
72
72
  /**
73
73
  * Пропсы, которые будут прокинуты в инпут
74
74
  */
75
- inputProps?: (Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "form" | "slot" | "style" | "title" | "pattern" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "required" | "src" | "width"> & {
75
+ inputProps?: (Pick<React.InputHTMLAttributes<HTMLInputElement>, "className" | "disabled" | "children" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "form" | "pattern" | "list" | "step" | "height" | "name" | "width" | "multiple" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "max" | "maxLength" | "min" | "minLength" | "readOnly" | "required" | "src"> & {
76
76
  value?: string | undefined;
77
77
  defaultValue?: string | undefined;
78
78
  block?: boolean | undefined;
@@ -1,9 +1,10 @@
1
- import { _ as __rest, a as __assign, A as AutocompleteField } from './Component-077ac41e.js';
1
+ import { _ as __rest, a as __assign } from './tslib.es6-675ade68.js';
2
+ import 'classnames';
2
3
  import React, { forwardRef } from 'react';
4
+ import 'react-merge-refs';
3
5
  import { BaseSelect, OptionsList, Optgroup, Option } from '@alfalab/core-components-select/dist/esm';
4
- import 'classnames';
5
6
  import '@alfalab/core-components-input/dist/esm';
6
- import 'react-merge-refs';
7
+ import { AutocompleteField } from './autocomplete-field/Component.js';
7
8
 
8
9
  var InputAutocomplete = forwardRef(function (_a, ref) {
9
10
  var _b = _a.OptionsList, OptionsList$1 = _b === void 0 ? OptionsList : _b, _c = _a.Optgroup, Optgroup$1 = _c === void 0 ? Optgroup : _c, _d = _a.Option, Option$1 = _d === void 0 ? Option : _d, Input = _a.Input, _e = _a.inputProps, inputProps = _e === void 0 ? {} : _e, onInput = _a.onInput, value = _a.value, success = _a.success, readOnly = _a.readOnly, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? false : _f, options = _a.options, restProps = __rest(_a, ["OptionsList", "Optgroup", "Option", "Input", "inputProps", "onInput", "value", "success", "readOnly", "closeOnSelect", "options"]);
@@ -0,0 +1,96 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ChangeEvent } from "react";
4
+ import { BaseSelectProps } from "@alfalab/core-components-select";
5
+ import { ButtonProps } from "@alfalab/core-components-button";
6
+ import { BottomSheetProps } from "./index-7ca84eff";
7
+ type InputAutocompleteMobileProps = Omit<BaseSelectProps, 'OptionsList' | 'Checkmark' | 'onScroll' | 'selected' | 'nativeSelect' | 'multiple' | 'autocomplete' | 'valueRenderer' | 'allowUnselect'> & {
8
+ /**
9
+ * Значение поля ввода
10
+ */
11
+ value: string;
12
+ /**
13
+ * Значение фильтра.
14
+ */
15
+ filter: string;
16
+ /**
17
+ * Обработчик выбора
18
+ */
19
+ onChange: (payload: string | BaseSelectProps['onChange']) => void;
20
+ /**
21
+ * Обработчик ввода фильтра.
22
+ */
23
+ onFilter: (event: ChangeEvent<HTMLInputElement>) => void;
24
+ /**
25
+ * Обработчик нажатия на кнопку "Отмена".
26
+ */
27
+ onCancel?: () => void;
28
+ /**
29
+ * Обработчик нажатия на крестик в инпуте фильтра.
30
+ */
31
+ onClearFilter?: () => void;
32
+ /**
33
+ * Дополнительные пропсы компонента BottomSheet
34
+ */
35
+ bottomSheetProps?: Partial<BottomSheetProps>;
36
+ /**
37
+ * Дополнительные пропсы на слот под заголовком компонента BottomSheet
38
+ */
39
+ bottomSheetHeaderAddonsProps?: Record<string, unknown>;
40
+ /**
41
+ * Дополнительные пропсы на кнопку "продолжить"
42
+ */
43
+ continueButtonProps?: ButtonProps;
44
+ /**
45
+ * Дополнительные пропсы на кнопку "отмена"
46
+ */
47
+ cancelButtonProps?: ButtonProps;
48
+ };
49
+ declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "Optgroup" | "optionsListWidth" | "visibleOptions" | "Arrow" | "optionGroupClassName" | "Option" | "optionsListClassName" | "optionClassName" | "closeOnSelect" | "circularNavigation" | "defaultOpen" | "popoverPosition" | "optionsSize" | "fieldProps" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
50
+ /**
51
+ * Значение поля ввода
52
+ */
53
+ value: string;
54
+ /**
55
+ * Значение фильтра.
56
+ */
57
+ filter: string;
58
+ /**
59
+ * Обработчик выбора
60
+ */
61
+ onChange: (payload: string | ((payload: {
62
+ selected: import("@alfalab/core-components-select").OptionShape | null;
63
+ selectedMultiple: import("@alfalab/core-components-select").OptionShape[];
64
+ initiator: import("@alfalab/core-components-select").OptionShape | null;
65
+ name?: string | undefined;
66
+ }) => void) | undefined) => void;
67
+ /**
68
+ * Обработчик ввода фильтра.
69
+ */
70
+ onFilter: (event: React.ChangeEvent<HTMLInputElement>) => void;
71
+ /**
72
+ * Обработчик нажатия на кнопку "Отмена".
73
+ */
74
+ onCancel?: (() => void) | undefined;
75
+ /**
76
+ * Обработчик нажатия на крестик в инпуте фильтра.
77
+ */
78
+ onClearFilter?: (() => void) | undefined;
79
+ /**
80
+ * Дополнительные пропсы компонента BottomSheet
81
+ */
82
+ bottomSheetProps?: Partial<BottomSheetProps> | undefined;
83
+ /**
84
+ * Дополнительные пропсы на слот под заголовком компонента BottomSheet
85
+ */
86
+ bottomSheetHeaderAddonsProps?: Record<string, unknown> | undefined;
87
+ /**
88
+ * Дополнительные пропсы на кнопку "продолжить"
89
+ */
90
+ continueButtonProps?: Partial<import("@alfalab/core-components-button").ComponentProps & React.AnchorHTMLAttributes<HTMLAnchorElement>> | Partial<import("@alfalab/core-components-button").ComponentProps & React.ButtonHTMLAttributes<HTMLButtonElement>> | undefined;
91
+ /**
92
+ * Дополнительные пропсы на кнопку "отмена"
93
+ */
94
+ cancelButtonProps?: Partial<import("@alfalab/core-components-button").ComponentProps & React.AnchorHTMLAttributes<HTMLAnchorElement>> | Partial<import("@alfalab/core-components-button").ComponentProps & React.ButtonHTMLAttributes<HTMLButtonElement>> | undefined;
95
+ } & React.RefAttributes<unknown>>;
96
+ export { InputAutocompleteMobileProps, InputAutocompleteMobile };
@@ -0,0 +1,71 @@
1
+ import { _ as __rest, a as __assign } from './tslib.es6-675ade68.js';
2
+ import cn from 'classnames';
3
+ import React, { useState, useRef, useMemo } from 'react';
4
+ import mergeRefs from 'react-merge-refs';
5
+ import throttle from 'lodash.throttle';
6
+ import { SelectMobile } from '@alfalab/core-components-select/dist/esm';
7
+ import { Button } from '@alfalab/core-components-button/dist/esm';
8
+ import { Input } from '@alfalab/core-components-input/dist/esm';
9
+ import '@alfalab/hooks';
10
+ import '@alfalab/core-components-form-control/dist/esm';
11
+ import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
12
+
13
+ var styles = {"bottomSheetInput":"input-autocomplete__bottomSheetInput_16le9","footer":"input-autocomplete__footer_16le9"};
14
+ require('./mobile.css')
15
+
16
+ var SELECTED = [];
17
+ var InputAutocompleteMobile = React.forwardRef(function (_a, ref) {
18
+ var _b = _a.bottomSheetProps, bottomSheetProps = _b === void 0 ? {} : _b, _c = _a.bottomSheetHeaderAddonsProps, bottomSheetHeaderAddonsProps = _c === void 0 ? {} : _c, _d = _a.value, value = _d === void 0 ? '' : _d, name = _a.name, _e = _a.Arrow, Arrow = _e === void 0 ? null : _e, filter = _a.filter, label = _a.label, placeholder = _a.placeholder, _f = _a.size, size = _f === void 0 ? 's' : _f, openProp = _a.open, onFilter = _a.onFilter, onChange = _a.onChange, onOpen = _a.onOpen, onCancel = _a.onCancel, onClearFilter = _a.onClearFilter, continueButtonProps = _a.continueButtonProps, cancelButtonProps = _a.cancelButtonProps, restProps = __rest(_a, ["bottomSheetProps", "bottomSheetHeaderAddonsProps", "value", "name", "Arrow", "filter", "label", "placeholder", "size", "open", "onFilter", "onChange", "onOpen", "onCancel", "onClearFilter", "continueButtonProps", "cancelButtonProps"]);
19
+ var _g = useState(false), open = _g[0], setOpen = _g[1];
20
+ var bottomSheetInputRef = useRef(null);
21
+ var targetRef = useRef(null);
22
+ var setBottomSheetVisibility = function (isOpen) {
23
+ if (openProp === undefined) {
24
+ setOpen(isOpen);
25
+ }
26
+ if (onOpen) {
27
+ onOpen({ open: isOpen, name: name });
28
+ }
29
+ };
30
+ var handleOpen = function (payload) {
31
+ setBottomSheetVisibility(Boolean(payload.open));
32
+ };
33
+ var handleOptionsListTouchMove = useMemo(function () {
34
+ return throttle(function () {
35
+ var input = bottomSheetInputRef.current;
36
+ if (input && document.activeElement === input) {
37
+ input.blur();
38
+ }
39
+ }, 300);
40
+ }, []);
41
+ var handleChange = function () {
42
+ setBottomSheetVisibility(false);
43
+ onChange(filter);
44
+ };
45
+ var handleCancel = function () {
46
+ setBottomSheetVisibility(false);
47
+ if (onCancel) {
48
+ onCancel();
49
+ }
50
+ };
51
+ var handleInputFocus = function (event) {
52
+ var input = bottomSheetInputRef.current;
53
+ // Перед закрытием шторки снимаем фокус с инпута, чтобы предотвратить скачок шторки.
54
+ if (event.relatedTarget === targetRef.current &&
55
+ input &&
56
+ input === document.activeElement) {
57
+ input.blur();
58
+ }
59
+ };
60
+ var getBottomSheetProps = function () {
61
+ return __assign(__assign({ actionButton: (React.createElement("div", { className: styles.footer },
62
+ React.createElement(Button, __assign({ block: true, view: 'primary', size: 's', onClick: handleChange }, continueButtonProps), "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"),
63
+ React.createElement(Button, __assign({ block: true, view: 'secondary', size: 's', onClick: handleCancel }, cancelButtonProps), "\u041E\u0442\u043C\u0435\u043D\u0430"))), title: label || placeholder, bottomAddons: (React.createElement(Input, __assign({ block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus }, bottomSheetHeaderAddonsProps, { className: cn(styles.bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs([
64
+ bottomSheetInputRef,
65
+ bottomSheetHeaderAddonsProps.ref,
66
+ ]) }))), initialHeight: 'full', ignoreScreenChange: true }, bottomSheetProps), { containerProps: __assign({ onTouchMove: handleOptionsListTouchMove }, bottomSheetProps.containerProps) });
67
+ };
68
+ return (React.createElement(SelectMobile, __assign({ ref: mergeRefs([targetRef, ref]), selected: SELECTED, open: Boolean(open || openProp), onOpen: handleOpen, onChange: onChange, Arrow: Arrow, Field: AutocompleteMobileField, fieldProps: { value: value }, placeholder: placeholder, label: label, size: size, name: name, bottomSheetProps: getBottomSheetProps() }, restProps)));
69
+ });
70
+
71
+ export { InputAutocompleteMobile };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { FieldProps } from "@alfalab/core-components-select";
3
+ import { InputAutocompleteProps } from "../Component";
4
+ type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
5
+ declare const AutocompleteField: ({ label, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
6
+ export { AutocompleteFieldProps, AutocompleteField };
@@ -1,5 +1,36 @@
1
- export { A as AutocompleteField } from '../Component-077ac41e.js';
2
- import 'react';
3
- import 'classnames';
4
- import '@alfalab/core-components-input/dist/esm';
5
- import 'react-merge-refs';
1
+ import { a as __assign } from '../tslib.es6-675ade68.js';
2
+ import cn from 'classnames';
3
+ import React, { useRef, useCallback } from 'react';
4
+ import mergeRefs from 'react-merge-refs';
5
+ import { Input } from '@alfalab/core-components-input/dist/esm';
6
+
7
+ var styles = {"arrow":"input-autocomplete__arrow_144q3","error":"input-autocomplete__error_144q3"};
8
+ require('./index.css')
9
+
10
+ var AutocompleteField = function (_a) {
11
+ var _b;
12
+ var label = _a.label, placeholder = _a.placeholder, size = _a.size, Arrow = _a.Arrow, _c = _a.Input, Input$1 = _c === void 0 ? Input : _c, value = _a.value, error = _a.error, success = _a.success, hint = _a.hint, disabled = _a.disabled, readOnly = _a.readOnly, onInput = _a.onInput, _d = _a.inputProps, inputProps = _d === void 0 ? {} : _d, innerProps = _a.innerProps;
13
+ var inputRef = useRef(null);
14
+ var onClick = innerProps.onClick, onFocus = innerProps.onFocus;
15
+ var inputDisabled = disabled || readOnly;
16
+ var handleClick = useCallback(function (event) {
17
+ if (onClick)
18
+ onClick(event);
19
+ if (inputRef.current) {
20
+ inputRef.current.focus();
21
+ }
22
+ }, [onClick]);
23
+ return (React.createElement(Input$1, __assign({}, inputProps, innerProps, {
24
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
25
+ // @ts-ignore
26
+ wrapperRef: mergeRefs([innerProps.ref, inputProps.wrapperRef]),
27
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
28
+ // @ts-ignore
29
+ ref: mergeRefs([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: onInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React.createElement(React.Fragment, null,
30
+ inputProps.rightAddons,
31
+ Arrow && (React.createElement("span", { className: cn(styles.arrow, (_b = {},
32
+ _b[styles.error] = error,
33
+ _b)) }, Arrow)))) })));
34
+ };
35
+
36
+ export { AutocompleteField };
@@ -1,4 +1,4 @@
1
- /* hash: 1h3oc */
2
- .input-autocomplete__arrow_1h5uf.input-autocomplete__error_1h5uf ~ * {
1
+ /* hash: u06lh */
2
+ .input-autocomplete__arrow_144q3.input-autocomplete__error_144q3 ~ * {
3
3
  display: none;
4
4
  }
@@ -1 +1 @@
1
- export * from "../Component-077ac41e";
1
+ export * from "./Component";
@@ -1,5 +1,6 @@
1
- export { A as AutocompleteField } from '../Component-077ac41e.js';
2
- import 'react';
1
+ import '../tslib.es6-675ade68.js';
3
2
  import 'classnames';
4
- import '@alfalab/core-components-input/dist/esm';
3
+ import 'react';
5
4
  import 'react-merge-refs';
5
+ import '@alfalab/core-components-input/dist/esm';
6
+ export { AutocompleteField } from './Component.js';