@cloud-ru/uikit-product-fields-predefined 2.1.6 → 2.1.7-preview-968572fb.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.
package/README.md CHANGED
@@ -14,42 +14,8 @@
14
14
  ### Props
15
15
  | name | type | default value | description |
16
16
  |------|------|---------------|-------------|
17
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
18
- | value | `string` | - | Значение input |
19
- | onChange | `((value: string, e?: ChangeEvent<HTMLInputElement>) => void) & ((value: string) => void)` | - | Колбек смены значения |
20
- | id | `string` | - | Значение html-атрибута id |
21
- | name | `string` | - | Значение html-атрибута name |
22
- | disabled | `boolean` | false | Является ли поле деактивированным |
23
- | readonly | `boolean` | false | Является ли поле доступным только для чтения |
24
- | onFocus | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки получения фокуса |
25
- | onBlur | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки потери фокуса |
26
- | autoComplete | `string \| boolean` | false | Включен ли автокомплит для поля |
27
- | autoFocus | `boolean` | false | Включен ли авто-фокус для поля |
28
- | onPaste | `ClipboardEventHandler<HTMLInputElement>` | - | Колбек обработки вставки значения |
29
- | spellCheck | `boolean` | true | Значение атрибута spellcheck (проверка орфографии) |
30
- | pattern | `string` | - | Регулярное выражение валидного инпута |
31
- | className | `string` | - | CSS-класс |
32
- | label | `string` | - | Лейбл |
33
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
34
- | required | `boolean` | - | Является ли поле обязательным |
35
- | caption | `string` | - | Подпись справа от лейбла |
36
- | hint | `string` | - | Подсказка внизу |
37
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
38
- | size | enum Size: `"s"`, `"m"`, `"l"` | - | Размер |
39
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
40
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
41
- | error | `string` | - | |
42
- | type | "text" \| "tel" \| "email" | - | |
43
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
44
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
45
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
46
- | onClearButtonClick | `() => void` | - | Колбек клика по кнопке очистки поля |
47
- | scrollList | `boolean` | - | Включить скролл для основной части списка стран |
48
- | searchPlaceholder | `string` | - | |
49
- | onChangeCountry | `(country: FieldPhoneOptionsProps) => void` | - | |
50
- | options | `CountrySettings` | - | options — объект конфигурации для изменения стандартного списка стран |
51
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
52
- | key | `Key` | - | |
17
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
18
+ | key | `any` | - | |
53
19
  ## useCountries
54
20
  ### Props
55
21
  | name | type | default value | description |
@@ -61,296 +27,54 @@
61
27
  ### Props
62
28
  | name | type | default value | description |
63
29
  |------|------|---------------|-------------|
64
- | selectProps* | `FieldSelectProps` | - | Пропсы прокидываемые в селект |
65
- | submitHandler* | `() => Promise<string \| void>` | - | Коллбек создания новой опции, при успешном выполнении возвращает value новой опции |
66
- | entityName* | `EntityName` | - | Тип объекта для создания новой опции (в единственном числе вин.падеже для кнопки Создать <entityName> и множественном числе) |
67
- | createLayoutProps* | `CreateLayoutModalProps \| CreateLayoutDrawerProps` | - | Пропсы передаваемые в модалку или дровер создания новой опции |
68
- | createLayoutType* | "modal" \| "drawer" | - | По клику на кнопку создания открывать модальное окно или дровер |
69
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
70
- | onRefetch | `VoidFunction` | - | Коллбек рефетча запроса на получение списка опций в случае ошибки (при передаче dataError в selectProps). |
71
- | className | `string` | - | CSS-класс |
72
- | afterClose | `VoidFunction` | - | Коллбек после закрытия модального окна/дровера |
73
- | entityIcon | `JSXElementConstructor<{ size?: number; className?: string; }>` | - | Иконка сервиса |
74
- | permission | "none" \| "canRead" \| "canCreate" | - | Управление состоянием компонента в зависимости от прав пользователя (по дефолту permission = 'canCreate') |
75
30
  ## FieldAi
76
31
  ### Props
77
32
  | name | type | default value | description |
78
33
  |------|------|---------------|-------------|
79
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
80
- | onSubmit* | `(value: string) => void` | - | Колбек действия при отправке |
81
- | value | `string` | - | HTML-аттрибут value |
82
- | onChange | `(value: string, e?: ChangeEvent<HTMLTextAreaElement>) => void` | - | Колбек смены значения |
83
- | inputMode | enum InputMode: `"search"`, `"none"`, `"text"`, `"tel"`, `"email"`, `"decimal"`, `"numeric"`, `"url"` | - | Режим работы экранной клавиатуры |
84
- | id | `string` | - | HTML-аттрибут id |
85
- | name | `string` | - | HTML-аттрибут name |
86
- | maxLength | `number` | - | Максимальное кол-во символов |
87
- | disabled | `boolean` | - | Является ли поле деактивированным |
88
- | readonly | `boolean` | - | Является ли поле доступным только на чтение |
89
- | onFocus | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек получения фокуса |
90
- | onBlur | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек потери фокуса |
91
- | autoFocus | `boolean` | - | Включен ли авто-фокус |
92
- | onKeyDown | `KeyboardEventHandler<HTMLTextAreaElement>` | - | Колбек нажатия клавиши клавиатуры |
93
- | className | `string` | - | CSS-класс |
94
- | caption | `string` | - | Подпись справа от лейбла |
95
- | hint | `string` | - | Подсказка внизу |
96
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
97
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
98
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
99
- | error | `string` | - | |
100
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
101
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
102
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
103
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
104
- | minRows | `number` | 3 | Минимальное кол-во строк, до которого размер поля может быть увеличен |
105
- | maxRows | `number` | 1000 | Максимальное кол-во строк, до которого размер поля может быть увеличен |
106
- | resizable | `boolean` | - | Может ли ли пользователь изменять размеры поля (если св-во не включено, поле автоматически меняет свой размер) |
107
- | secure | `boolean \| "password"` | - | Режим ввода sensitive данных (пароля, API ключей, токенов, etc) |
108
- | onResetContextClick | `() => void` | - | Действие при клике по кнопке сброса контекста |
109
- | onCancelSecure | `() => void` | - | Действие для отмены секьюрности поля |
110
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
111
- | key | `Key` | - | |
34
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
35
+ | key | `any` | - | |
112
36
  ## FieldChat
113
37
  ### Props
114
38
  | name | type | default value | description |
115
39
  |------|------|---------------|-------------|
116
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
117
- | handleSubmit* | `(value: string) => void` | - | Колбек действия при отправке |
118
- | value | `string` | - | HTML-аттрибут value |
119
- | onChange | `(value: string, e?: ChangeEvent<HTMLTextAreaElement>) => void` | - | Колбек смены значения |
120
- | inputMode | enum InputMode: `"search"`, `"none"`, `"text"`, `"tel"`, `"email"`, `"decimal"`, `"numeric"`, `"url"` | - | Режим работы экранной клавиатуры |
121
- | id | `string` | - | HTML-аттрибут id |
122
- | name | `string` | - | HTML-аттрибут name |
123
- | maxLength | `number` | - | Максимальное кол-во символов |
124
- | disabled | `boolean` | - | Является ли поле деактивированным |
125
- | readonly | `boolean` | - | Является ли поле доступным только на чтение |
126
- | onFocus | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек получения фокуса |
127
- | onBlur | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек потери фокуса |
128
- | autoFocus | `boolean` | - | Включен ли авто-фокус |
129
- | onKeyDown | `KeyboardEventHandler<HTMLTextAreaElement>` | - | Колбек нажатия клавиши клавиатуры |
130
- | className | `string` | - | CSS-класс |
131
- | caption | `string` | - | Подпись справа от лейбла |
132
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
133
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
134
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
135
- | error | `string` | - | |
136
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
137
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
138
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
139
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
140
- | minRows | `number` | 3 | Минимальное кол-во строк, до которого размер поля может быть увеличен |
141
- | maxRows | `number` | 1000 | Максимальное кол-во строк, до которого размер поля может быть увеличен |
142
- | resizable | `boolean` | - | Может ли ли пользователь изменять размеры поля (если св-во не включено, поле автоматически меняет свой размер) |
143
- | attachment | `Pick<FileUploadProps, "onFilesUpload" \| "accept"> & { files?: File[]; onFileDelete: (file?: File) => void; }` | - | |
144
40
  ## AIDisclaimer
145
41
  ### Props
146
42
  | name | type | default value | description |
147
43
  |------|------|---------------|-------------|
148
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
149
44
  ## FieldName
150
45
  Поле имя c локальным стейтом и валидацией
151
46
  ### Props
152
47
  | name | type | default value | description |
153
48
  |------|------|---------------|-------------|
154
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
155
- | value | `string` | - | Значение input |
156
- | onChange | `(value: string, e?: ChangeEvent<HTMLInputElement>) => void` | - | Колбек смены значения |
157
- | id | `string` | - | Значение html-атрибута id |
158
- | name | `string` | - | Значение html-атрибута name |
159
- | maxLength | `number` | - | Максимальная длина вводимого значения |
160
- | disabled | `boolean` | false | Является ли поле деактивированным |
161
- | readonly | `boolean` | false | Является ли поле доступным только для чтения |
162
- | onFocus | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки получения фокуса |
163
- | onBlur | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки потери фокуса |
164
- | autoComplete | `string \| boolean` | false | Включен ли автокомплит для поля |
165
- | autoFocus | `boolean` | false | Включен ли авто-фокус для поля |
166
- | onPaste | `ClipboardEventHandler<HTMLInputElement>` | - | Колбек обработки вставки значения |
167
- | onKeyDown | `KeyboardEventHandler<HTMLInputElement>` | - | Колбек обработки начала нажатия клавиши клавиатуры |
168
- | spellCheck | `boolean` | true | Значение атрибута spellcheck (проверка орфографии) |
169
- | pattern | `string` | - | Регулярное выражение валидного инпута |
170
- | className | `string` | - | CSS-класс |
171
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
172
- | required | `boolean` | - | Является ли поле обязательным |
173
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
174
- | size | enum Size: `"s"`, `"m"`, `"l"` | - | Размер |
175
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
176
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
177
- | error | `string` | - | |
178
- | prefix | `ReactNode` | - | Произвольный префикс для поля |
179
- | prefixIcon | `ReactElement<any, string \| JSXElementConstructor<any>>` | - | Иконка-префикс для поля |
180
- | postfix | `ReactNode` | - | Произвольный постфикс для поля |
181
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
182
- | button | `Button` | - | Кнопка действия внутри поля |
183
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
184
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
185
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
186
- | onClearButtonClick | `() => void` | - | Колбек клика по кнопке очистки поля |
187
- | showLabel | `boolean` | - | |
188
- | customSchema | `StringSchema<string, AnyObject, undefined, "">` | - | |
189
- | onValidationError | `(error: ValidationError) => void` | - | Колбэк, вызываемый при изменении ошибки валидации |
190
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
191
- | key | `Key` | - | |
49
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
50
+ | key | `any` | - | |
192
51
  ## FieldNameRHF
193
52
  Поле имя c оберткой для React Hook Form
194
53
  ### Props
195
54
  | name | type | default value | description |
196
55
  |------|------|---------------|-------------|
197
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
198
- | controllerProps* | `Omit<ControllerProps<FieldValues>, "disabled" \| "render" \| "rules">` | - | Режим контроллера с использованием react-hook-form |
199
- | value | `string` | - | Значение input |
200
- | onChange | `(value: string, e?: ChangeEvent<HTMLInputElement>) => void` | - | Колбек смены значения |
201
- | id | `string` | - | Значение html-атрибута id |
202
- | name | `string` | - | Значение html-атрибута name |
203
- | maxLength | `number` | - | Максимальная длина вводимого значения |
204
- | disabled | `boolean` | false | Является ли поле деактивированным |
205
- | readonly | `boolean` | false | Является ли поле доступным только для чтения |
206
- | onFocus | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки получения фокуса |
207
- | onBlur | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки потери фокуса |
208
- | autoComplete | `string \| boolean` | false | Включен ли автокомплит для поля |
209
- | autoFocus | `boolean` | false | Включен ли авто-фокус для поля |
210
- | onPaste | `ClipboardEventHandler<HTMLInputElement>` | - | Колбек обработки вставки значения |
211
- | onKeyDown | `KeyboardEventHandler<HTMLInputElement>` | - | Колбек обработки начала нажатия клавиши клавиатуры |
212
- | spellCheck | `boolean` | true | Значение атрибута spellcheck (проверка орфографии) |
213
- | pattern | `string` | - | Регулярное выражение валидного инпута |
214
- | className | `string` | - | CSS-класс |
215
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
216
- | required | `boolean` | - | Является ли поле обязательным |
217
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
218
- | size | enum Size: `"s"`, `"m"`, `"l"` | - | Размер |
219
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
220
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
221
- | error | `string` | - | |
222
- | prefix | `ReactNode` | - | Произвольный префикс для поля |
223
- | prefixIcon | `ReactElement<any, string \| JSXElementConstructor<any>>` | - | Иконка-префикс для поля |
224
- | postfix | `ReactNode` | - | Произвольный постфикс для поля |
225
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
226
- | button | `Button` | - | Кнопка действия внутри поля |
227
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
228
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
229
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
230
- | onClearButtonClick | `() => void` | - | Колбек клика по кнопке очистки поля |
231
- | showLabel | `boolean` | - | |
232
- | customSchema | `StringSchema<string, AnyObject, undefined, "">` | - | |
233
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
234
- | key | `Key` | - | |
56
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
57
+ | key | `any` | - | |
235
58
  ## FieldDescription
236
59
  Поле описание c локальным стейтом и валидацией
237
60
  ### Props
238
61
  | name | type | default value | description |
239
62
  |------|------|---------------|-------------|
240
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
241
- | value | `string` | - | HTML-аттрибут value |
242
- | onChange | `(value: string, e?: ChangeEvent<HTMLTextAreaElement>) => void` | - | Колбек смены значения |
243
- | id | `string` | - | HTML-аттрибут id |
244
- | maxLength | `number` | 255 | Максимальное кол-во символов |
245
- | disabled | `boolean` | - | Является ли поле деактивированным |
246
- | readonly | `boolean` | - | Является ли поле доступным только на чтение |
247
- | onFocus | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек получения фокуса |
248
- | onBlur | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек потери фокуса |
249
- | autoFocus | `boolean` | - | Включен ли авто-фокус |
250
- | onKeyDown | `KeyboardEventHandler<HTMLTextAreaElement>` | - | Колбек нажатия клавиши клавиатуры |
251
- | spellCheck | `boolean` | true | Включение проверки орфографии |
252
- | className | `string` | - | CSS-класс |
253
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
254
- | required | `boolean` | - | Является ли поле обязательным |
255
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
256
- | size | enum Size: `"s"`, `"m"`, `"l"` | m | Размер |
257
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
258
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
259
- | error | `string` | - | |
260
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
261
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
262
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
263
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
264
- | minRows | `number` | 3 | Минимальное кол-во строк, до которого размер поля может быть увеличен |
265
- | maxRows | `number` | 1000 | Максимальное кол-во строк, до которого размер поля может быть увеличен |
266
- | resizable | `boolean` | true | Может ли ли пользователь изменять размеры поля (если св-во не включено, поле автоматически меняет свой размер) |
267
- | customSchema | `StringSchema<string, AnyObject, undefined, "">` | - | |
268
- | addButton | `boolean` | - | Поле появляется по кнопке "Добавить описание" (только для опционального поля) |
269
- | onValidationError | `(error: ValidationError) => void` | - | Колбэк, вызываемый при изменении ошибки валидации (только в standalone режиме) |
270
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
271
- | key | `Key` | - | |
63
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
64
+ | key | `any` | - | |
272
65
  ## FieldDescriptionRHF
273
66
  Поле описание c оберткой для React Hook Form
274
67
  ### Props
275
68
  | name | type | default value | description |
276
69
  |------|------|---------------|-------------|
277
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
278
- | controllerProps* | `Omit<ControllerProps<FieldValues>, "disabled" \| "render" \| "rules">` | - | Режим контроллера с использованием react-hook-form |
279
- | value | `string` | - | HTML-аттрибут value |
280
- | onChange | `(value: string, e?: ChangeEvent<HTMLTextAreaElement>) => void` | - | Колбек смены значения |
281
- | id | `string` | - | HTML-аттрибут id |
282
- | maxLength | `number` | 255 | Максимальное кол-во символов |
283
- | disabled | `boolean` | - | Является ли поле деактивированным |
284
- | readonly | `boolean` | - | Является ли поле доступным только на чтение |
285
- | onFocus | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек получения фокуса |
286
- | onBlur | `FocusEventHandler<HTMLTextAreaElement>` | - | Колбек потери фокуса |
287
- | autoFocus | `boolean` | - | Включен ли авто-фокус |
288
- | onKeyDown | `KeyboardEventHandler<HTMLTextAreaElement>` | - | Колбек нажатия клавиши клавиатуры |
289
- | spellCheck | `boolean` | true | Включение проверки орфографии |
290
- | className | `string` | - | CSS-класс |
291
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
292
- | required | `boolean` | - | Является ли поле обязательным |
293
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
294
- | size | enum Size: `"s"`, `"m"`, `"l"` | m | Размер |
295
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
296
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
297
- | error | `string` | - | |
298
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
299
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
300
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
301
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
302
- | minRows | `number` | 3 | Минимальное кол-во строк, до которого размер поля может быть увеличен |
303
- | maxRows | `number` | 1000 | Максимальное кол-во строк, до которого размер поля может быть увеличен |
304
- | resizable | `boolean` | true | Может ли ли пользователь изменять размеры поля (если св-во не включено, поле автоматически меняет свой размер) |
305
- | customSchema | `StringSchema<string, AnyObject, undefined, "">` | - | |
306
- | addButton | `boolean` | - | Поле появляется по кнопке "Добавить описание" (только для опционального поля) |
307
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
308
- | key | `Key` | - | |
70
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
71
+ | key | `any` | - | |
309
72
  ## FieldMask
310
73
  ### Props
311
74
  | name | type | default value | description |
312
75
  |------|------|---------------|-------------|
313
- | layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
314
- | mask* | enum Mask: `"code"`, `"uuid"`, `"passport"`, `"snils"`, `"ip-v4-address"`, `"ip-v4-address-with-mask"` | - | |
315
- | id | `string` | - | Значение html-атрибута id |
316
- | name | `string` | - | Значение html-атрибута name |
317
- | placeholder | `string` | - | Значение плейсхолдера |
318
- | maxLength | `number` | - | Максимальная длина вводимого значения |
319
- | disabled | `boolean` | false | Является ли поле деактивированным |
320
- | readonly | `boolean` | false | Является ли поле доступным только для чтения |
321
- | onFocus | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки получения фокуса |
322
- | onBlur | `FocusEventHandler<HTMLInputElement>` | - | Колбек обработки потери фокуса |
323
- | autoComplete | `string \| boolean` | false | Включен ли автокомплит для поля |
324
- | autoFocus | `boolean` | false | Включен ли авто-фокус для поля |
325
- | onPaste | `ClipboardEventHandler<HTMLInputElement>` | - | Колбек обработки вставки значения |
326
- | onKeyDown | `KeyboardEventHandler<HTMLInputElement>` | - | Колбек обработки начала нажатия клавиши клавиатуры |
327
- | spellCheck | `boolean` | true | Значение атрибута spellcheck (проверка орфографии) |
328
- | pattern | `string` | - | Регулярное выражение валидного инпута |
329
- | className | `string` | - | CSS-класс |
330
- | label | `string` | - | Лейбл |
331
- | labelTooltip | `ReactNode` | - | Всплывающая подсказка лейбла |
332
- | required | `boolean` | - | Является ли поле обязательным |
333
- | caption | `string` | - | Подпись справа от лейбла |
334
- | hint | `string` | - | Подсказка внизу |
335
- | showHintIcon | `boolean` | - | Отображать иконку подсказки |
336
- | size | enum Size: `"s"`, `"m"`, `"l"` | - | Размер |
337
- | validationState | enum ValidationState: `"error"`, `"default"`, `"warning"`, `"success"` | - | Состояние валидации |
338
- | labelTooltipPlacement | enum Placement: `"left"`, `"left-start"`, `"left-end"`, `"right"`, `"right-start"`, `"right-end"`, `"top"`, `"top-start"`, `"top-end"`, `"bottom"`, `"bottom-start"`, `"bottom-end"` | top | Расположение подсказки лейбла |
339
- | error | `string` | - | |
340
- | prefix | `ReactNode` | - | Произвольный префикс для поля |
341
- | prefixIcon | `ReactElement<any, string \| JSXElementConstructor<any>>` | - | Иконка-префикс для поля |
342
- | postfix | `ReactNode` | - | Произвольный постфикс для поля |
343
- | allowMoreThanMaxLength | `boolean` | - | Можно ли вводить больше разрешённого кол-ва символов |
344
- | button | `Button` | - | Кнопка действия внутри поля |
345
- | type | "text" \| "tel" \| "email" | - | |
346
- | showCopyButton | `boolean` | - | Отображение кнопки Копировать для поля (актуально только для `readonly = true`) |
347
- | onCopyButtonClick | `() => void` | - | Колбек клика по кнопке Копировать для поля |
348
- | showClearButton | `boolean` | true | Отображение кнопки очистки поля |
349
- | onClearButtonClick | `() => void` | - | Колбек клика по кнопке очистки поля |
350
- | value | `string` | - | |
351
- | onChange | `(value: string, mask: InputMask<Record<string, unknown>>) => void` | - | |
352
- | ref | `LegacyRef<HTMLInputElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
353
- | key | `Key` | - | |
76
+ | ref | `any` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
77
+ | key | `any` | - | |
354
78
 
355
79
 
356
80
  [//]: DOCUMENTATION_SECTION_END